diff options
author | Nipun Garg | 2019-07-02 05:35:12 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:17:07 +0200 |
commit | 44de6935533a4b0cfaa3db9a685f27a765359c0d (patch) | |
tree | 0a621d25922ae25257d6b107927ec9913d54217d | |
parent | 9c7344ac30691dd57230d7d83fdf74de3318b965 (diff) | |
download | scummvm-rg350-44de6935533a4b0cfaa3db9a685f27a765359c0d.tar.gz scummvm-rg350-44de6935533a4b0cfaa3db9a685f27a765359c0d.tar.bz2 scummvm-rg350-44de6935533a4b0cfaa3db9a685f27a765359c0d.zip |
HDB: Add FrogStatue related functions
-rw-r--r-- | engines/hdb/ai-player.cpp | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/engines/hdb/ai-player.cpp b/engines/hdb/ai-player.cpp index a4547f53b7..c55c392bee 100644 --- a/engines/hdb/ai-player.cpp +++ b/engines/hdb/ai-player.cpp @@ -1002,15 +1002,33 @@ void aiAccountantInit2(AIEntity *e) { } void aiFrogStatueInit(AIEntity *e) { - warning("STUB: AI: aiFrogStatueInit required"); + e->moveSpeed = kPushMoveSpeed; + e->aiAction = aiFrogStatueAction; } void aiFrogStatueInit2(AIEntity *e) { - warning("STUB: AI: aiFrogStatueInit2 required"); + // point all frog statue MOVE frames to the standing one + e->blinkFrames = + e->movedownFrames = + e->moveleftFrames = + e->moverightFrames = + e->moveupFrames = 1; + + e->blinkGfx[0] = + e->movedownGfx[0] = + e->moveupGfx[0] = + e->moveleftGfx[0] = + e->moverightGfx[0] = e->standdownGfx[0]; + + e->draw = e->standdownGfx[0]; // standing frame - doesn't move } void aiFrogStatueAction(AIEntity *e) { - warning("STUB: AI: aiFrogStatueAction required"); + // if frog statue isn't moving somewhere, don't move it + if (!e->goalX) + return; + + g_hdb->_ai->animateEntity(e); } void aiRoboStunnerAction(AIEntity *e) { |