diff options
author | Nipun Garg | 2019-06-21 08:33:20 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:16:54 +0200 |
commit | 4d57cefb6c0dec864434750f0931ddc6752a30d0 (patch) | |
tree | 107eef1ef4884e056c2eff35cd3e174bbc93ea7a /engines/hdb | |
parent | e4edb7dc507e579484d1ad5abdb9edf59e2379fc (diff) | |
download | scummvm-rg350-4d57cefb6c0dec864434750f0931ddc6752a30d0.tar.gz scummvm-rg350-4d57cefb6c0dec864434750f0931ddc6752a30d0.tar.bz2 scummvm-rg350-4d57cefb6c0dec864434750f0931ddc6752a30d0.zip |
HDB: Unstub Gratings and Foregrounds check
Diffstat (limited to 'engines/hdb')
-rw-r--r-- | engines/hdb/map-loader.cpp | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/engines/hdb/map-loader.cpp b/engines/hdb/map-loader.cpp index b54953efdd..837597ec34 100644 --- a/engines/hdb/map-loader.cpp +++ b/engines/hdb/map-loader.cpp @@ -578,6 +578,8 @@ void Map::draw() { return; } + _numForegrounds = _numGratings = 0; + for (int j = 0; j < maxTileY; j++) { screenX = _mapTileXOff; for (int i = 0; i < maxTileX; i++) { @@ -599,21 +601,22 @@ void Map::draw() { Tile *fTile = g_hdb->_drawMan->getTile(tileIndex); if (fTile && !(fTile->_flags & kFlagInvisible)) { - if ((fTile->_flags & kFlagGrating)) { - /* - TODO: Implement Gratings Check - */ - debug(9, "STUB: Map::draw: Gratings Check not found"); + if ((fTile->_flags & kFlagGrating) && (_numGratings < kMaxGratings)) { + // Check for Gratings Flag + _gratings[_numGratings]->x = screenX; + _gratings[_numGratings]->y = screenY; + _gratings[_numGratings]->tile = tileIndex; + if (_numGratings < kMaxGratings) + _numGratings++; } else if ((fTile->_flags & kFlagForeground)) { - /* - TODO: Implement Gratings Check - */ - debug(9, "STUB: Map::draw: Foreground Check not found"); + // Check for Foregrounds Flag + _foregrounds[_numForegrounds]->x = screenX; + _foregrounds[_numForegrounds]->y = screenY; + _foregrounds[_numForegrounds]->tile = tileIndex; + if (_numForegrounds < kMaxForegrounds) + _numForegrounds++; } else { if (fTile->_flags & kFlagMasked) { - /* - TODO: Implement MaskedMapTile drawing - */ fTile->drawMasked(screenX, screenY); } else { fTile->draw(screenX, screenY); |