aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorNipun Garg2019-07-02 04:22:50 +0530
committerEugene Sandulenko2019-09-03 17:17:07 +0200
commit3b35cb5aa73088459ec223a2ed0f01355eaf1b2f (patch)
treee4be3fb116fc2f189994a72d484c43053984fd9e /engines
parentea8e108cb6ac5aaf9c42904a15f807435c6713b0 (diff)
downloadscummvm-rg350-3b35cb5aa73088459ec223a2ed0f01355eaf1b2f.tar.gz
scummvm-rg350-3b35cb5aa73088459ec223a2ed0f01355eaf1b2f.tar.bz2
scummvm-rg350-3b35cb5aa73088459ec223a2ed0f01355eaf1b2f.zip
HDB: Add Heavy Barrel related functions
Diffstat (limited to 'engines')
-rw-r--r--engines/hdb/ai-player.cpp24
1 files changed, 21 insertions, 3 deletions
diff --git a/engines/hdb/ai-player.cpp b/engines/hdb/ai-player.cpp
index e12831fc0e..da2ccd75af 100644
--- a/engines/hdb/ai-player.cpp
+++ b/engines/hdb/ai-player.cpp
@@ -630,15 +630,33 @@ void aiBarrelLightInit(AIEntity *e) {
}
void aiBarrelHeavyAction(AIEntity *e) {
- warning("STUB: AI: aiBarrelHeavyAction required");
+ if (!e->goalX) {
+ if (e->state == STATE_FLOATING)
+ g_hdb->_ai->animEntFrames(e);
+ return;
+ }
+
+ g_hdb->_ai->animateEntity(e);
}
void aiBarrelHeavyInit2(AIEntity *e) {
- warning("STUB: AI: aiBarrelHeavyInit2 required");
+ // point all heavy 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 aiBarrelHeavyInit(AIEntity *e) {
- warning("STUB: AI: aiBarrelHeavyInit required");
+ e->moveSpeed = kPushMoveSpeed;
+ e->aiAction = aiBarrelHeavyAction;
}
void aiBarrelExplosionEnd(AIEntity *e) {