diff options
author | Eugene Sandulenko | 2019-08-04 23:40:17 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:17:31 +0200 |
commit | 08d486981c4146e816cfecb3c74bed59a21c8f38 (patch) | |
tree | ce275c7c6e8b111310cb5de500ac63a728833d13 | |
parent | d4f1d41275d687d800e8cffb96643c58d0e6e9e8 (diff) | |
download | scummvm-rg350-08d486981c4146e816cfecb3c74bed59a21c8f38.tar.gz scummvm-rg350-08d486981c4146e816cfecb3c74bed59a21c8f38.tar.bz2 scummvm-rg350-08d486981c4146e816cfecb3c74bed59a21c8f38.zip |
HDB: Check map hitting code
-rw-r--r-- | engines/hdb/map.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/hdb/map.cpp b/engines/hdb/map.cpp index 898a2c777d..cd605a984b 100644 --- a/engines/hdb/map.cpp +++ b/engines/hdb/map.cpp @@ -1188,11 +1188,11 @@ void Map::centerMapXY(int x, int y) { } bool Map::checkEntOnScreen(AIEntity *e) { - return ((e->x > _mapX - 32) && (e->x < _mapX + g_hdb->_map->_screenXTiles * kTileWidth) && (e->y > _mapY - 32) && (e->y < g_hdb->_map->_screenYTiles * kTileHeight)); + return ((e->x > _mapX - 32) && (e->x < _mapX + g_hdb->_map->_screenXTiles * kTileWidth) && (e->y > _mapY - 32) && (e->y < _mapY + g_hdb->_map->_screenYTiles * kTileHeight)); } bool Map::checkXYOnScreen(int x, int y) { - return ((x > _mapX - 32) && (x < _mapX + g_hdb->_map->_screenXTiles * kTileWidth) && (y > _mapY - 32) && (y < g_hdb->_map->_screenYTiles * kTileHeight)); + return ((x > _mapX - 32) && (x < _mapX + g_hdb->_map->_screenXTiles * kTileWidth) && (y > _mapY - 32) && (y < _mapY + g_hdb->_map->_screenYTiles * kTileHeight)); } bool Map::checkOneTileExistInRange(int tileIndex, int count) { |