From 44de6935533a4b0cfaa3db9a685f27a765359c0d Mon Sep 17 00:00:00 2001 From: Nipun Garg Date: Tue, 2 Jul 2019 05:35:12 +0530 Subject: HDB: Add FrogStatue related functions --- engines/hdb/ai-player.cpp | 24 +++++++++++++++++++++--- 1 file 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) { -- cgit v1.2.3