From 4d22df8037f6e7da6c3df5ca342b631b67fe40d9 Mon Sep 17 00:00:00 2001 From: Nipun Garg Date: Fri, 21 Jun 2019 09:32:11 +0530 Subject: HDB: Add drawForegrounds() and drawGratings() --- engines/hdb/map-loader.cpp | 16 ++++++++++++++++ engines/hdb/map-loader.h | 2 ++ 2 files changed, 18 insertions(+) (limited to 'engines/hdb') diff --git a/engines/hdb/map-loader.cpp b/engines/hdb/map-loader.cpp index dfbd1a82ce..0e18a71ed9 100644 --- a/engines/hdb/map-loader.cpp +++ b/engines/hdb/map-loader.cpp @@ -671,6 +671,22 @@ void Map::drawEnts() { g_hdb->_ai->drawEnts(_mapX, _mapY, kScreenXTiles * kTileWidth, kScreenYTiles * kTileHeight); } +void Map::drawGratings() { + for (int i = 0; i < kMaxGratings;i++) { + g_hdb->_drawMan->getTile(_gratings[i]->tile)->drawMasked(_gratings[i]->x, _gratings[i]->y); + } + + debug(1, "Gratings Count: %d", _numGratings); +} + +void Map::drawForegrounds() { + for (int i = 0; i < kMaxForegrounds;i++) { + g_hdb->_drawMan->getTile(_foregrounds[i]->tile)->drawMasked(_foregrounds[i]->x, _foregrounds[i]->y); + } + + debug(1, "Foregrounds Count: %d", _numForegrounds); +} + uint32 Map::getMapBGTileFlags(int x, int y) { if (x < 0 || x >= _width || y < 0 || y >= _height) { return 0; diff --git a/engines/hdb/map-loader.h b/engines/hdb/map-loader.h index 8ee0760643..da8b7d6713 100644 --- a/engines/hdb/map-loader.h +++ b/engines/hdb/map-loader.h @@ -74,6 +74,8 @@ public: bool load(Common::SeekableReadStream *stream); void draw(); void drawEnts(); + void drawGratings(); + void drawForegrounds(); uint32 getMapBGTileFlags(int x, int y); uint32 getMapFGTileFlags(int x, int y); -- cgit v1.2.3