diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/hdb/draw-manager.cpp | 40 | ||||
-rw-r--r-- | engines/hdb/draw-manager.h | 12 |
2 files changed, 51 insertions, 1 deletions
diff --git a/engines/hdb/draw-manager.cpp b/engines/hdb/draw-manager.cpp index 85ee4ec9aa..564e178f35 100644 --- a/engines/hdb/draw-manager.cpp +++ b/engines/hdb/draw-manager.cpp @@ -25,17 +25,55 @@ namespace HDB { DrawMan::DrawMan() { + _tLookupArray = NULL; _systemInit = false; } bool DrawMan::init() { + // Read total number of tiles in game _numTiles = g_hdb->_fileMan->getCount("t32_", TYPE_TILE32); - if (!_numTiles) { return false; } + // Setup Tile Lookup Array + _tLookupArray = new TileLookup[_numTiles]; + Common::Array<const char *> tileData = *g_hdb->_fileMan->findFiles("t32_", TYPE_TILE32); + + int index = 0, skyIndex = 0; + for (; index < _numTiles; index++) { + _tLookupArray[index].filename = tileData[index]; + _tLookupArray[index].tData = NULL; + _tLookupArray[index].skyIndex = 0; + _tLookupArray[index].animIndex = index; + // Check if the loaded Tile is a Sky Tile + if (((Common::String)tileData[index]).contains("sky") && (skyIndex < kMaxSkies)) { + _tLookupArray[index].skyIndex = skyIndex + 1; + _skyTiles[skyIndex] = index; + skyIndex++; + } + } + + /* + TODO: Add Animating Tile Info + */ + + // Init Sky Data + _currentSky = 0; + + /* + TODO: Setup Gamma Table + */ + + /* + TODO: Load Mouse Pointer and Display Cursor + */ + + /* + TODO: Load all 4 levels of star colors and the snowflake + */ + _systemInit = true; return true; } diff --git a/engines/hdb/draw-manager.h b/engines/hdb/draw-manager.h index c3e6d91eb6..2c651dd816 100644 --- a/engines/hdb/draw-manager.h +++ b/engines/hdb/draw-manager.h @@ -33,6 +33,15 @@ enum { kMaxSkies = 10, }; +class Tile; + +struct TileLookup { + const char *filename; + Tile *tData; + uint16 skyIndex; + uint16 animIndex; +}; + class DrawMan { public: @@ -42,6 +51,9 @@ public: private: int _numTiles; + TileLookup *_tLookupArray; + uint16 _skyTiles[kMaxSkies]; + int _currentSky; // 0 if no Sky, 1+ for which Sky to use bool _systemInit; }; |