diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/hdb/map-loader.cpp | 32 | ||||
-rw-r--r-- | engines/hdb/map-loader.h | 2 |
2 files changed, 34 insertions, 0 deletions
diff --git a/engines/hdb/map-loader.cpp b/engines/hdb/map-loader.cpp index f5e2fded8a..431ef6cfe7 100644 --- a/engines/hdb/map-loader.cpp +++ b/engines/hdb/map-loader.cpp @@ -656,6 +656,38 @@ void Map::setMapFGTileIndex(int x, int y, int index) { _foreground[y * _width + x] = index; } +void Map::addBGTileAnimation(int x, int y) { + + int i = y * _width + x; + + uint32 flags = g_hdb->_drawMan->getTile(_background[i])->_flags; + + // BACKGROUND + if (flags & kFlagAnimFast) { + _listBGAnimFast.push_back(i); + } else if (flags & kFlagAnimSlow) { + _listBGAnimSlow.push_back(i); + } else if (flags & kFlagAnimMedium) { + _listBGAnimMedium.push_back(i); + } +} + +void Map::addFGTileAnimation(int x, int y) { + + int i = y * _width + x; + + uint32 flags = g_hdb->_drawMan->getTile(_foreground[i])->_flags; + + // FOREGROUND + if (flags & kFlagAnimFast) { + _listFGAnimFast.push_back(i); + } else if (flags & kFlagAnimSlow) { + _listFGAnimSlow.push_back(i); + } else if (flags & kFlagAnimMedium) { + _listFGAnimMedium.push_back(i); + } +} + void Map::getMapXY(int *x, int *y) { *x = _mapX; *y = _mapY; diff --git a/engines/hdb/map-loader.h b/engines/hdb/map-loader.h index dd1353560d..158b5f9131 100644 --- a/engines/hdb/map-loader.h +++ b/engines/hdb/map-loader.h @@ -69,6 +69,8 @@ public: uint16 getMapFGTileIndex(int x, int y); void setMapBGTileIndex(int x, int y, int index); void setMapFGTileIndex(int x, int y, int index); + void addBGTileAnimation(int x, int y); + void addFGTileAnimation(int x, int y); void getMapXY(int *x, int *y); void setMapXY(int x, int y); |