aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/game/sweet_bowl.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2016-08-28 11:29:23 -0400
committerPaul Gilbert2016-08-28 11:29:23 -0400
commit56c2ef9efc966286eefa451eba6f5acb1f58886f (patch)
tree6f856e9e387c9e61c53ad3df71fd2e808cc6306e /engines/titanic/game/sweet_bowl.cpp
parent1dcfe25808164c5f2540662028862ac8a0e56831 (diff)
downloadscummvm-rg350-56c2ef9efc966286eefa451eba6f5acb1f58886f.tar.gz
scummvm-rg350-56c2ef9efc966286eefa451eba6f5acb1f58886f.tar.bz2
scummvm-rg350-56c2ef9efc966286eefa451eba6f5acb1f58886f.zip
TITANIC: Implemented more game classes
Diffstat (limited to 'engines/titanic/game/sweet_bowl.cpp')
-rw-r--r--engines/titanic/game/sweet_bowl.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/engines/titanic/game/sweet_bowl.cpp b/engines/titanic/game/sweet_bowl.cpp
index e14f900e77..d0a2525bc4 100644
--- a/engines/titanic/game/sweet_bowl.cpp
+++ b/engines/titanic/game/sweet_bowl.cpp
@@ -24,6 +24,12 @@
namespace Titanic {
+BEGIN_MESSAGE_MAP(CSweetBowl, CGameObject)
+ ON_MESSAGE(MovieEndMsg)
+ ON_MESSAGE(EnterViewMsg)
+ ON_MESSAGE(ActMsg)
+END_MESSAGE_MAP()
+
void CSweetBowl::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
CGameObject::save(file, indent);
@@ -34,4 +40,28 @@ void CSweetBowl::load(SimpleFile *file) {
CGameObject::load(file);
}
+bool CSweetBowl::MovieEndMsg(CMovieEndMsg *msg) {
+ setVisible(false);
+ return true;
+}
+
+bool CSweetBowl::EnterViewMsg(CEnterViewMsg *msg) {
+ setVisible(false);
+ loadSound("b#43.wav");
+ playSound("b#42.wav");
+ return true;
+}
+
+bool CSweetBowl::ActMsg(CActMsg *msg) {
+ if (msg->_action == "Jiggle") {
+ setVisible(true);
+ playMovie(MOVIE_GAMESTATE | MOVIE_NOTIFY_OBJECT);
+ playSound(getRandomNumber(1) == 1 ? "b#42.wav" : "b#43.wav");
+ }
+
+ petDisplayMessage(isEquals("BowlNutsRustler") ?
+ "A bowl of pistachio nuts." : "Not a bowl of pistachio nuts.");
+ return true;
+}
+
} // End of namespace Titanic