aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNipun Garg2019-06-21 08:34:00 +0530
committerEugene Sandulenko2019-09-03 17:16:54 +0200
commit76e4758b2b1551a7354f72f416f6a23ab49eb754 (patch)
treee018301a4d0d9c89af36c73fb979992a72c85d8d
parent4d57cefb6c0dec864434750f0931ddc6752a30d0 (diff)
downloadscummvm-rg350-76e4758b2b1551a7354f72f416f6a23ab49eb754.tar.gz
scummvm-rg350-76e4758b2b1551a7354f72f416f6a23ab49eb754.tar.bz2
scummvm-rg350-76e4758b2b1551a7354f72f416f6a23ab49eb754.zip
HDB: Unstub Animated Map Tiles
-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() {