mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-11 05:36:12 +00:00
HDB: Add getter-setter for _mapX and _mapY
This commit is contained in:
parent
f9b71cf660
commit
bb9aeb4248
@ -228,4 +228,26 @@ void Map::draw() {
|
||||
*/
|
||||
}
|
||||
|
||||
void Map::getMapXY(int *x, int *y) {
|
||||
*x = _mapX;
|
||||
*y = _mapY;
|
||||
}
|
||||
|
||||
void Map::setMapXY(int x, int y) {
|
||||
if (x < 0) {
|
||||
x = 0;
|
||||
} else if (x > (_width * kTileWidth - 480)) {
|
||||
x = _width * kTileWidth - 480;
|
||||
}
|
||||
|
||||
if (y < 0) {
|
||||
y = 0;
|
||||
} else if (y > (_height * kTileHeight - 480)) {
|
||||
y = _height * kTileHeight - 480;
|
||||
}
|
||||
|
||||
_mapX = x;
|
||||
_mapY = y;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -58,6 +58,8 @@ public:
|
||||
int loadTiles();
|
||||
bool load(Common::SeekableReadStream *stream);
|
||||
void draw();
|
||||
void getMapXY(int *x, int *y);
|
||||
void setMapXY(int x, int y);
|
||||
|
||||
int _mapX, _mapY; // Coordinates of Map
|
||||
int _mapTileX, _mapTileY; // Tile Coordinates of Map
|
||||
|
Loading…
x
Reference in New Issue
Block a user