diff options
author | Paul Gilbert | 2016-08-19 20:48:05 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-08-19 20:48:05 -0400 |
commit | a5a1a08c503d9e32352f67b90650bc604959ea5a (patch) | |
tree | be608ff67f5c7150f69c61510e9ff4349ad575e2 /engines/titanic/game/ear_sweet_bowl.cpp | |
parent | 5ec6f572c1b7888b4111566fcf6727ade3f043ea (diff) | |
download | scummvm-rg350-a5a1a08c503d9e32352f67b90650bc604959ea5a.tar.gz scummvm-rg350-a5a1a08c503d9e32352f67b90650bc604959ea5a.tar.bz2 scummvm-rg350-a5a1a08c503d9e32352f67b90650bc604959ea5a.zip |
TITANIC: Implemented more game classes
Diffstat (limited to 'engines/titanic/game/ear_sweet_bowl.cpp')
-rw-r--r-- | engines/titanic/game/ear_sweet_bowl.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/engines/titanic/game/ear_sweet_bowl.cpp b/engines/titanic/game/ear_sweet_bowl.cpp index 0f7069356d..646b95f0b4 100644 --- a/engines/titanic/game/ear_sweet_bowl.cpp +++ b/engines/titanic/game/ear_sweet_bowl.cpp @@ -21,9 +21,16 @@ */ #include "titanic/game/ear_sweet_bowl.h" +#include "titanic/core/room_item.h" +#include "titanic/pet_control/pet_control.h" namespace Titanic { +BEGIN_MESSAGE_MAP(CEarSweetBowl, CSweetBowl) + ON_MESSAGE(MovieEndMsg) + ON_MESSAGE(ReplaceBowlAndNutsMsg) +END_MESSAGE_MAP() + void CEarSweetBowl::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); CSweetBowl::save(file, indent); @@ -34,4 +41,30 @@ void CEarSweetBowl::load(SimpleFile *file) { CSweetBowl::load(file); } +bool CEarSweetBowl::MovieEndMsg(CMovieEndMsg *msg) { + CIsEarBowlPuzzleDone doneMsg; + doneMsg.execute(findRoom()); + + if (!doneMsg._value) { + CPetControl *pet = getPetControl(); + if (pet) + pet->hasRoomFlags(); + + CIsParrotPresentMsg parrotMsg; + parrotMsg.execute(findRoom()); + + if (parrotMsg._value) { + CNutPuzzleMsg nutMsg("Jiggle"); + nutMsg.execute("NutsParrotPlayer"); + } + } + + return true; +} + +bool CEarSweetBowl::ReplaceBowlAndNutsMsg(CReplaceBowlAndNutsMsg *msg) { + setVisible(false); + return true; +} + } // End of namespace Titanic |