aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/game/glass_smasher.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2016-08-21 21:41:48 -0400
committerPaul Gilbert2016-08-21 21:41:48 -0400
commite7d0047b5334bef6688a5f81c200630a58ff89c4 (patch)
tree62fb8f5e0a453d67674e304b4f8102d93d5cba02 /engines/titanic/game/glass_smasher.cpp
parent9ebd75742eb3a4fac4f6ff3ae421ec67be1f28eb (diff)
downloadscummvm-rg350-e7d0047b5334bef6688a5f81c200630a58ff89c4.tar.gz
scummvm-rg350-e7d0047b5334bef6688a5f81c200630a58ff89c4.tar.bz2
scummvm-rg350-e7d0047b5334bef6688a5f81c200630a58ff89c4.zip
TITANIC: Implemented more game classes
Diffstat (limited to 'engines/titanic/game/glass_smasher.cpp')
-rw-r--r--engines/titanic/game/glass_smasher.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/engines/titanic/game/glass_smasher.cpp b/engines/titanic/game/glass_smasher.cpp
index 8c33124a47..2123f2dfd0 100644
--- a/engines/titanic/game/glass_smasher.cpp
+++ b/engines/titanic/game/glass_smasher.cpp
@@ -24,6 +24,11 @@
namespace Titanic {
+BEGIN_MESSAGE_MAP(CGlassSmasher, CGameObject)
+ ON_MESSAGE(StatusChangeMsg)
+ ON_MESSAGE(MovieEndMsg)
+END_MESSAGE_MAP()
+
void CGlassSmasher::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
CGameObject::save(file, indent);
@@ -34,4 +39,18 @@ void CGlassSmasher::load(SimpleFile *file) {
CGameObject::load(file);
}
+bool CGlassSmasher::StatusChangeMsg(CStatusChangeMsg *msg) {
+ setVisible(true);
+ playSound("b#40.wav");
+ playMovie(MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
+ return true;
+}
+
+bool CGlassSmasher::MovieEndMsg(CMovieEndMsg *msg) {
+ setVisible(false);
+ CVisibleMsg visibleMsg(true);
+ visibleMsg.execute("LongStickDispenser");
+ return true;
+}
+
} // End of namespace Titanic