aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/game/no_nut_bowl.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2016-08-26 07:47:31 -0400
committerPaul Gilbert2016-08-26 07:47:31 -0400
commit41ee7dd3717e8ff5451314fe62468ae64e8879c3 (patch)
treea4ccef80ac473336728b371e0e321e97213b7242 /engines/titanic/game/no_nut_bowl.cpp
parente40caf40a17e50d9cab698eb9b806302e106f179 (diff)
downloadscummvm-rg350-41ee7dd3717e8ff5451314fe62468ae64e8879c3.tar.gz
scummvm-rg350-41ee7dd3717e8ff5451314fe62468ae64e8879c3.tar.bz2
scummvm-rg350-41ee7dd3717e8ff5451314fe62468ae64e8879c3.zip
TITANIC: Implemented more game classes
Diffstat (limited to 'engines/titanic/game/no_nut_bowl.cpp')
-rw-r--r--engines/titanic/game/no_nut_bowl.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/engines/titanic/game/no_nut_bowl.cpp b/engines/titanic/game/no_nut_bowl.cpp
index 47f9d7901e..8c0a95ac9a 100644
--- a/engines/titanic/game/no_nut_bowl.cpp
+++ b/engines/titanic/game/no_nut_bowl.cpp
@@ -24,6 +24,12 @@
namespace Titanic {
+BEGIN_MESSAGE_MAP(CNoNutBowl, CBackground)
+ ON_MESSAGE(ActMsg)
+ ON_MESSAGE(ReplaceBowlAndNutsMsg)
+ ON_MESSAGE(NutPuzzleMsg)
+END_MESSAGE_MAP()
+
void CNoNutBowl::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
CBackground::save(file, indent);
@@ -34,4 +40,19 @@ void CNoNutBowl::load(SimpleFile *file) {
CBackground::load(file);
}
+bool CNoNutBowl::ActMsg(CActMsg *msg) {
+ return true;
+}
+
+bool CNoNutBowl::ReplaceBowlAndNutsMsg(CReplaceBowlAndNutsMsg *msg) {
+ setVisible(false);
+ return true;
+}
+
+bool CNoNutBowl::NutPuzzleMsg(CNutPuzzleMsg *msg) {
+ if (msg->_value == "NutsGone")
+ setVisible(true);
+ return true;
+}
+
} // End of namespace Titanic