aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNipun Garg2019-07-03 05:59:13 +0530
committerEugene Sandulenko2019-09-03 17:17:08 +0200
commit7871ad60076fc155d7f585eb5be0f00831edfd45 (patch)
tree87ad1b286ec16c643eef3be88fd08cacb806cdee
parent70fb0e81cc46e4e2590a434c40cfd40d0e313186 (diff)
downloadscummvm-rg350-7871ad60076fc155d7f585eb5be0f00831edfd45.tar.gz
scummvm-rg350-7871ad60076fc155d7f585eb5be0f00831edfd45.tar.bz2
scummvm-rg350-7871ad60076fc155d7f585eb5be0f00831edfd45.zip
HDB: Add IceBlock, ItemChicken and CabKey
-rw-r--r--engines/hdb/ai-player.cpp30
1 files changed, 23 insertions, 7 deletions
diff --git a/engines/hdb/ai-player.cpp b/engines/hdb/ai-player.cpp
index 80d131fd48..8713be7be5 100644
--- a/engines/hdb/ai-player.cpp
+++ b/engines/hdb/ai-player.cpp
@@ -1448,31 +1448,47 @@ void aiMagicEggUse(AIEntity *e) {
}
void aiIceBlockAction(AIEntity *e) {
- warning("STUB: AI: aiIceBlockAction required");
+ // if ice block isn't moving somewhere, don't move it
+ if (!e->goalX)
+ return;
+
+ g_hdb->_ai->animateEntity(e);
}
void aiIceBlockInit(AIEntity *e) {
- warning("STUB: AI: aiIceBlockInit required");
+ e->moveSpeed = kPushMoveSpeed;
+ e->aiAction = aiIceBlockAction;
}
void aiIceBlockInit2(AIEntity *e) {
- warning("STUB: AI: aiIceBlockInit2 required");
+ // point all ice block 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 aiCabKeyInit(AIEntity *e) {
- warning("STUB: AI: aiCabKeyInit required");
+ strcpy(e->printedName, "a Cabinet key");
}
void aiCabKeyInit2(AIEntity *e) {
- warning("STUB: AI: aiCabKeyInit2 required");
+ e->draw = e->standdownGfx[0];
}
void aiItemChickenInit(AIEntity *e) {
- warning("STUB: AI: aiItemChickenInit required");
+ strcpy(e->printedName, "Cooper's chicken");
}
void aiItemChickenInit2(AIEntity *e) {
- warning("STUB: AI: aiItemChickenInit2 required");
+ e->draw = e->standdownGfx[0];
}
void aiPdaInit(AIEntity *e) {