diff options
author | Nipun Garg | 2019-06-21 03:22:28 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:16:52 +0200 |
commit | 36613d3196a365766c03a1a998d5a9b7e70bfb27 (patch) | |
tree | e57fb7a7ccd2aa26c7b5202e5182a9d160fdfca5 /engines | |
parent | f9c21da88bbf265e38ef54d22d86f3d24fd48062 (diff) | |
download | scummvm-rg350-36613d3196a365766c03a1a998d5a9b7e70bfb27.tar.gz scummvm-rg350-36613d3196a365766c03a1a998d5a9b7e70bfb27.tar.bz2 scummvm-rg350-36613d3196a365766c03a1a998d5a9b7e70bfb27.zip |
HDB: Unstub aiPlayerInit()
Diffstat (limited to 'engines')
-rw-r--r-- | engines/hdb/ai-player.cpp | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/engines/hdb/ai-player.cpp b/engines/hdb/ai-player.cpp index 8d42d27844..7cf10f50df 100644 --- a/engines/hdb/ai-player.cpp +++ b/engines/hdb/ai-player.cpp @@ -25,7 +25,31 @@ namespace HDB { void aiPlayerInit(AIEntity *e) { - warning("STUB: AI: aiPlayerInit required"); + g_hdb->_ai->clearInventory(); + e->aiAction = aiPlayerAction; + e->draw = g_hdb->_ai->getStandFrameDir(e); + + switch (e->dir) { + case DIR_UP: + e->state = STATE_STANDUP; + break; + case DIR_DOWN: + e->state = STATE_STANDDOWN; + break; + case DIR_LEFT: + e->state = STATE_STANDLEFT; + break; + case DIR_RIGHT: + e->state = STATE_STANDRIGHT; + break; + case DIR_NONE: + warning("AI-PLAYER: aiPlayerInit: DIR_NONE found"); + break; + } + + e->moveSpeed = kPlayerMoveSpeed; + strcpy(e->entityName, "player"); + g_hdb->_ai->assignPlayer(e); } void aiPlayerInit2(AIEntity *e) { |