aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/hdb/map-loader.cpp37
1 files changed, 34 insertions, 3 deletions
diff --git a/engines/hdb/map-loader.cpp b/engines/hdb/map-loader.cpp
index 837597ec34..249c52a9f4 100644
--- a/engines/hdb/map-loader.cpp
+++ b/engines/hdb/map-loader.cpp
@@ -631,9 +631,40 @@ void Map::draw() {
screenY += kTileWidth;
}
- /*
- TODO: Implement animated Map Tiles
- */
+ // Animate FAST Map Tiles
+ if (!(_animCycle % kAnimFastFrames)) {
+ for (Common::Array<uint32>::iterator it = _listBGAnimFast.begin(); it != _listBGAnimFast.end(); it++) {
+ _background[(*it)] = g_hdb->_drawMan->animateTile(_background[(*it)]);
+ }
+
+ for (Common::Array<uint32>::iterator it = _listFGAnimFast.begin(); it != _listFGAnimFast.end(); it++) {
+ _foreground[(*it)] = g_hdb->_drawMan->animateTile(_foreground[(*it)]);
+ }
+ }
+
+ // Animate MEDIUM Map Tiles
+ if (!(_animCycle % kAnimFastFrames)) {
+ for (Common::Array<uint32>::iterator it = _listBGAnimMedium.begin(); it != _listBGAnimMedium.end(); it++) {
+ _background[(*it)] = g_hdb->_drawMan->animateTile(_background[(*it)]);
+ }
+
+ for (Common::Array<uint32>::iterator it = _listFGAnimMedium.begin(); it != _listFGAnimMedium.end(); it++) {
+ _foreground[(*it)] = g_hdb->_drawMan->animateTile(_foreground[(*it)]);
+ }
+ }
+
+ // Animate SLOW Map Tiles
+ if (!(_animCycle % kAnimFastFrames)) {
+ for (Common::Array<uint32>::iterator it = _listBGAnimSlow.begin(); it != _listBGAnimSlow.end(); it++) {
+ _background[(*it)] = g_hdb->_drawMan->animateTile(_background[(*it)]);
+ }
+
+ for (Common::Array<uint32>::iterator it = _listFGAnimSlow.begin(); it != _listFGAnimSlow.end(); it++) {
+ _foreground[(*it)] = g_hdb->_drawMan->animateTile(_foreground[(*it)]);
+ }
+ }
+
+ _animCycle++;
}
void Map::drawEnts() {