diff options
author | Nipun Garg | 2019-06-19 22:21:26 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:16:50 +0200 |
commit | a86905c32fd70a0047bb012680af5b3eaa0577db (patch) | |
tree | 11ec8bbe493bf6f6a65c930ec6985f812d46048e | |
parent | eddad225235ff92306eabaee74204ffd05c606bc (diff) | |
download | scummvm-rg350-a86905c32fd70a0047bb012680af5b3eaa0577db.tar.gz scummvm-rg350-a86905c32fd70a0047bb012680af5b3eaa0577db.tar.bz2 scummvm-rg350-a86905c32fd70a0047bb012680af5b3eaa0577db.zip |
HDB: Add getTableEnt(), walkThroughEnt()
A stubbed getItemSound() is added as well
-rw-r--r-- | engines/hdb/ai-funcs.cpp | 67 | ||||
-rw-r--r-- | engines/hdb/ai.h | 3 |
2 files changed, 70 insertions, 0 deletions
diff --git a/engines/hdb/ai-funcs.cpp b/engines/hdb/ai-funcs.cpp index 83e2daf4e1..32a473479f 100644 --- a/engines/hdb/ai-funcs.cpp +++ b/engines/hdb/ai-funcs.cpp @@ -33,4 +33,71 @@ AIEntity *AI::locateEntity(const char *luaName) { return NULL; } +// Check to see if we can get this entity +bool AI::getTableEnt(AIType type) { + switch (type) { + case ITEM_CELL: + case ITEM_ENV_WHITE: + case ITEM_ENV_RED: + case ITEM_ENV_BLUE: + case ITEM_ENV_GREEN: + case ITEM_TRANSCEIVER: + case ITEM_CLUB: + case ITEM_ROBOSTUNNER: + case ITEM_SLUGSLINGER: + case ITEM_MONKEYSTONE: + case ITEM_GOO_CUP: + case ITEM_TEACUP: + case ITEM_BURGER: + case ITEM_PDA: + case ITEM_BOOK: + case ITEM_CLIPBOARD: + case ITEM_NOTE: + case ITEM_KEYCARD_WHITE: + case ITEM_KEYCARD_BLUE: + case ITEM_KEYCARD_RED: + case ITEM_KEYCARD_GREEN: + case ITEM_KEYCARD_PURPLE: + case ITEM_KEYCARD_BLACK: + case ITEM_SEED: + case ITEM_SODA: + case ITEM_SLICER: + case ITEM_DOLLYTOOL1: + case ITEM_DOLLYTOOL2: + case ITEM_DOLLYTOOL3: + case ITEM_DOLLYTOOL4: + return true; + default: + return false; + } +} + +// Check to see if it's okay to move through this entity +bool AI::walkThroughEnt(AIType type) { + switch (type) { + case AI_VORTEXIAN: + case AI_MEERKAT: + case AI_GOODFAIRY: + case AI_BADFAIRY: + case AI_GATEPUDDLE: + case AI_BUZZFLY: + case AI_OMNIBOT: + case AI_PUSHBOT: + case AI_TURNBOT: + case AI_RIGHTBOT: + + case ITEM_GEM_WHITE: + case ITEM_GEM_BLUE: + case ITEM_GEM_RED: + case ITEM_GEM_GREEN: + return true; + default: + return getTableEnt(type); + } +} + +// Play special sound for every item you get +void AI::getItemSound(AIType type) { + warning("STUB: AI: getItemSound required"); +} } // End of Namespace diff --git a/engines/hdb/ai.h b/engines/hdb/ai.h index 808a62c399..84423dfb8a 100644 --- a/engines/hdb/ai.h +++ b/engines/hdb/ai.h @@ -401,6 +401,9 @@ public: // Entity Functions AIEntity *locateEntity(const char *luaName); + bool getTableEnt(AIType type); + bool walkThroughEnt(AIType type); + void getItemSound(AIType type); // Player Functions AIEntity *getPlayer() { |