aboutsummaryrefslogtreecommitdiff
path: root/engines/hdb/map-loader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/hdb/map-loader.cpp')
-rw-r--r--engines/hdb/map-loader.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/engines/hdb/map-loader.cpp b/engines/hdb/map-loader.cpp
index c8a31f5364..04a5ee6c2f 100644
--- a/engines/hdb/map-loader.cpp
+++ b/engines/hdb/map-loader.cpp
@@ -942,6 +942,14 @@ void Map::centerMapXY(int x, int y) {
setMapXY(x, y);
}
+bool Map::checkEntOnScreen(AIEntity *e) {
+ return ((e->x > _mapX - 32) && (e->x < _mapX + kScreenXTiles * kTileWidth) && (e->y > _mapY - 32) && (e->y < kScreenYTiles * kTileHeight));
+}
+
+bool Map::checkXYOnScreen(int x, int y) {
+ return ((x > _mapX - 32) && (x < _mapX + kScreenXTiles * kTileWidth) && (y > _mapY - 32) && (y < kScreenYTiles * kTileHeight));
+}
+
bool Map::checkOneTileExistInRange(int tileIndex, int count) {
for (int i = 0; i < _width*_height; i++) {
if (_background[i] >= tileIndex && _background[i] < tileIndex + count)