aboutsummaryrefslogtreecommitdiff
path: root/engines/hdb
diff options
context:
space:
mode:
authorNipun Garg2019-06-19 22:15:43 +0530
committerEugene Sandulenko2019-09-03 17:16:50 +0200
commiteddad225235ff92306eabaee74204ffd05c606bc (patch)
tree50cea82af0a380f42bb6da6900cf4c2c47555887 /engines/hdb
parent838bebc0b7f1e0ad34e463e2badd44bc642abf0b (diff)
downloadscummvm-rg350-eddad225235ff92306eabaee74204ffd05c606bc.tar.gz
scummvm-rg350-eddad225235ff92306eabaee74204ffd05c606bc.tar.bz2
scummvm-rg350-eddad225235ff92306eabaee74204ffd05c606bc.zip
HDB: Add getter-setters for _player
Diffstat (limited to 'engines/hdb')
-rw-r--r--engines/hdb/ai.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/engines/hdb/ai.h b/engines/hdb/ai.h
index 426d772043..808a62c399 100644
--- a/engines/hdb/ai.h
+++ b/engines/hdb/ai.h
@@ -403,6 +403,30 @@ public:
AIEntity *locateEntity(const char *luaName);
// Player Functions
+ AIEntity *getPlayer() {
+ warning("STUB: AI::getPlayer: dummyplayer not supported");
+ return _player;
+ }
+
+ void getPlayerXY(int *x, int *y) {
+ if (_player) {
+ *x = _player->x;
+ *y = _player->y;
+ } else {
+ *x = *y = 0;
+ }
+ }
+
+ void setPlayerXY(int x, int y) {
+ if (_player) {
+ _player->x = x;
+ _player->tileX = x / kTileWidth;
+ _player->y = y;
+ _player->tileY = y / kTileHeight;
+ _player->xVel = _player->yVel = 0;
+ }
+ }
+
void assignPlayer(AIEntity *p) {
_player = p;
}