diff options
-rw-r--r-- | engines/hdb/gfx.cpp | 4 | ||||
-rw-r--r-- | engines/hdb/gfx.h | 11 | ||||
-rw-r--r-- | engines/hdb/hdb.h | 2 |
3 files changed, 17 insertions, 0 deletions
diff --git a/engines/hdb/gfx.cpp b/engines/hdb/gfx.cpp index 3303a5bed1..ddee59fcb9 100644 --- a/engines/hdb/gfx.cpp +++ b/engines/hdb/gfx.cpp @@ -29,11 +29,15 @@ Gfx::Gfx() { _gfxCache = new Common::Array<GfxCache *>; _globalSurface.create(kScreenWidth, kScreenHeight, g_hdb->_format); _pointerDisplayable = 1; + _sines = new Common::SineTable(360); + _cosines = new Common::CosineTable(360); _systemInit = false; } Gfx::~Gfx() { delete _gfxCache; + delete _sines; + delete _cosines; _globalSurface.free(); } diff --git a/engines/hdb/gfx.h b/engines/hdb/gfx.h index e49b0c56bf..d057caeca7 100644 --- a/engines/hdb/gfx.h +++ b/engines/hdb/gfx.h @@ -151,6 +151,15 @@ public: void setCursor(int x, int y); void getCursor(int *x, int *y); + // Trig Functions + + double getSin(int index) { + return _sines->at(index); + } + double getCos(int index) { + return _cosines->at(index); + } + private: int _numTiles; TileLookup *_tLookupArray; @@ -211,6 +220,8 @@ private: bool _systemInit; + Common::SineTable *_sines; + Common::CosineTable *_cosines; }; class Picture { diff --git a/engines/hdb/hdb.h b/engines/hdb/hdb.h index a690be2400..c6ea5182d1 100644 --- a/engines/hdb/hdb.h +++ b/engines/hdb/hdb.h @@ -31,6 +31,8 @@ #include "common/str.h" #include "common/random.h" #include "common/savefile.h" +#include "common/sinetables.h" +#include "common/cosinetables.h" #include "common/config-manager.h" #include "graphics/surface.h" #include "graphics/thumbnail.h" |