diff options
Diffstat (limited to 'engines')
-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 0d105d8085..f5e2fded8a 100644 --- a/engines/hdb/map-loader.cpp +++ b/engines/hdb/map-loader.cpp @@ -642,6 +642,20 @@ uint16 Map::getMapFGTileIndex(int x, int y) { return _foreground[y * _width + x]; } +void Map::setMapBGTileIndex(int x, int y, int index) { + if (x < 0 || x >= _width || y < 0 || y >= _height) { + return; + } + _background[y * _width + x] = index; +} + +void Map::setMapFGTileIndex(int x, int y, int index) { + if (x < 0 || x >= _width || y < 0 || y >= _height) { + return; + } + _foreground[y * _width + x] = index; +} + 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 12c481fa53..0e2f3d0c50 100644 --- a/engines/hdb/map-loader.h +++ b/engines/hdb/map-loader.h @@ -67,6 +67,9 @@ public: uint32 getMapFGTileFlags(int x, int y); uint16 getMapBGTileIndex(int x, int y); uint16 getMapFGTileIndex(int x, int y); + void setMapBGTileIndex(int x, int y, int index); + void setMapFGTileIndex(int x, int y, int index); + void getMapXY(int *x, int *y); void setMapXY(int x, int y); void centerMapXY(int x, int y); |