aboutsummaryrefslogtreecommitdiff
path: root/engines/hdb
diff options
context:
space:
mode:
authorNipun Garg2019-06-21 09:32:11 +0530
committerEugene Sandulenko2019-09-03 17:16:54 +0200
commit4d22df8037f6e7da6c3df5ca342b631b67fe40d9 (patch)
tree3d5616cf5cefc207709f11dfed03d9bb089aa2c6 /engines/hdb
parent60b4c33a9c5643322f093b62e2df8985705bbbb6 (diff)
downloadscummvm-rg350-4d22df8037f6e7da6c3df5ca342b631b67fe40d9.tar.gz
scummvm-rg350-4d22df8037f6e7da6c3df5ca342b631b67fe40d9.tar.bz2
scummvm-rg350-4d22df8037f6e7da6c3df5ca342b631b67fe40d9.zip
HDB: Add drawForegrounds() and drawGratings()
Diffstat (limited to 'engines/hdb')
-rw-r--r--engines/hdb/map-loader.cpp16
-rw-r--r--engines/hdb/map-loader.h2
2 files changed, 18 insertions, 0 deletions
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);