diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/hdb/map-loader.cpp | 14 | ||||
-rw-r--r-- | engines/hdb/map-loader.h | 2 |
2 files changed, 16 insertions, 0 deletions
diff --git a/engines/hdb/map-loader.cpp b/engines/hdb/map-loader.cpp index 090dbf3abb..c5d682c03a 100644 --- a/engines/hdb/map-loader.cpp +++ b/engines/hdb/map-loader.cpp @@ -228,6 +228,20 @@ void Map::draw() { */ } +uint16 Map::getMapBGTileIndex(int x, int y) { + if (x < 0 || x >= _width || y < 0 || y >= _height) { + return 0; + } + return _background[y * _width + x]; +} + +uint16 Map::getMapFGTileIndex(int x, int y) { + if (x < 0 || x >= _width || y < 0 || y >= _height) { + return 0; + } + return _foreground[y * _width + x]; +} + void Map::getMapXY(int *x, int *y) { *x = _mapX; *y = _mapY; diff --git a/engines/hdb/map-loader.h b/engines/hdb/map-loader.h index cdae918f37..35f1357ec3 100644 --- a/engines/hdb/map-loader.h +++ b/engines/hdb/map-loader.h @@ -58,6 +58,8 @@ public: int loadTiles(); bool load(Common::SeekableReadStream *stream); void draw(); + uint16 getMapBGTileIndex(int x, int y); + uint16 getMapFGTileIndex(int x, int y); void getMapXY(int *x, int *y); void setMapXY(int x, int y); |