aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/game/ear_sweet_bowl.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2016-08-19 20:48:05 -0400
committerPaul Gilbert2016-08-19 20:48:05 -0400
commita5a1a08c503d9e32352f67b90650bc604959ea5a (patch)
treebe608ff67f5c7150f69c61510e9ff4349ad575e2 /engines/titanic/game/ear_sweet_bowl.cpp
parent5ec6f572c1b7888b4111566fcf6727ade3f043ea (diff)
downloadscummvm-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.cpp33
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