diff options
-rw-r--r-- | engines/hdb/map-loader.cpp | 14 | ||||
-rw-r--r-- | engines/hdb/map-loader.h | 3 |
2 files changed, 17 insertions, 0 deletions
diff --git a/engines/hdb/map-loader.cpp b/engines/hdb/map-loader.cpp index e7db677049..459cb64f59 100644 --- a/engines/hdb/map-loader.cpp +++ b/engines/hdb/map-loader.cpp @@ -226,6 +226,20 @@ void Map::draw() { */ } +uint32 Map::getMapBGTileFlags(int x, int y) { + if (x < 0 || x >= _width || y < 0 || y >= _height) { + return 0; + } + return g_hdb->_drawMan->getTile(_background[y * _width + x])->_flags; +} + +uint32 Map::getMapFGTileFlags(int x, int y) { + if (x < 0 || x >= _width || y < 0 || y >= _height) { + return 0; + } + return g_hdb->_drawMan->getTile(_foreground[y * _width + x])->_flags; +} + uint16 Map::getMapBGTileIndex(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 d2266818b3..9a1883707a 100644 --- a/engines/hdb/map-loader.h +++ b/engines/hdb/map-loader.h @@ -58,6 +58,9 @@ public: int loadTiles(); bool load(Common::SeekableReadStream *stream); void draw(); + + uint32 getMapBGTileFlags(int x, int y); + uint32 getMapFGTileFlags(int x, int y); uint16 getMapBGTileIndex(int x, int y); uint16 getMapFGTileIndex(int x, int y); void getMapXY(int *x, int *y); |