diff options
author | Nipun Garg | 2019-07-02 04:22:27 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:17:07 +0200 |
commit | ea8e108cb6ac5aaf9c42904a15f807435c6713b0 (patch) | |
tree | d768aa428ab183c3d0cb47a248e87c7df214e214 /engines | |
parent | 2369415b305e9b0569548049196f9baf0cf58021 (diff) | |
download | scummvm-rg350-ea8e108cb6ac5aaf9c42904a15f807435c6713b0.tar.gz scummvm-rg350-ea8e108cb6ac5aaf9c42904a15f807435c6713b0.tar.bz2 scummvm-rg350-ea8e108cb6ac5aaf9c42904a15f807435c6713b0.zip |
HDB: Add Light Barrel related functions
Diffstat (limited to 'engines')
-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 a5a3649026..e12831fc0e 100644 --- a/engines/hdb/ai-player.cpp +++ b/engines/hdb/ai-player.cpp @@ -600,15 +600,33 @@ void aiCrateInit(AIEntity *e) { } void aiBarrelLightAction(AIEntity *e) { - warning("STUB: AI: aiBarrelLightAction required"); + if (!e->goalX) { + if (e->state == STATE_FLOATING) + g_hdb->_ai->animEntFrames(e); + return; + } + + g_hdb->_ai->animateEntity(e); } void aiBarrelLightInit2(AIEntity *e) { - warning("STUB: AI: aiBarrelLightInit2 required"); + // point all light barrel move frames to the standing one + e->movedownFrames = + e->moveleftFrames = + e->moverightFrames = + e->moveupFrames = 1; + + 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 aiBarrelLightInit(AIEntity *e) { - warning("STUB: AI: aiBarrelLightInit required"); + e->moveSpeed = kPushMoveSpeed; + e->aiAction = aiBarrelLightAction; } void aiBarrelHeavyAction(AIEntity *e) { |