aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/game/gondolier/gondolier_face.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/gondolier/gondolier_face.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/gondolier/gondolier_face.cpp')
-rw-r--r--engines/titanic/game/gondolier/gondolier_face.cpp23
1 files changed, 21 insertions, 2 deletions
diff --git a/engines/titanic/game/gondolier/gondolier_face.cpp b/engines/titanic/game/gondolier/gondolier_face.cpp
index bdab8491ed..d7bcfa3561 100644
--- a/engines/titanic/game/gondolier/gondolier_face.cpp
+++ b/engines/titanic/game/gondolier/gondolier_face.cpp
@@ -24,16 +24,35 @@
namespace Titanic {
+BEGIN_MESSAGE_MAP(CGondolierFace, CGondolierBase)
+ ON_MESSAGE(EnterViewMsg)
+ ON_MESSAGE(StatusChangeMsg)
+END_MESSAGE_MAP()
+
void CGondolierFace::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
- file->writeNumberLine(_fieldBC, indent);
+ file->writeNumberLine(_flag, indent);
CGondolierBase::save(file, indent);
}
void CGondolierFace::load(SimpleFile *file) {
file->readNumber();
- _fieldBC = file->readNumber();
+ _flag = file->readNumber();
CGondolierBase::load(file);
}
+bool CGondolierFace::EnterViewMsg(CEnterViewMsg *msg) {
+ if (_flag)
+ playMovie(MOVIE_REPEAT);
+ else
+ setVisible(false);
+ return true;
+}
+
+bool CGondolierFace::StatusChangeMsg(CStatusChangeMsg *msg) {
+ _flag = msg->_newStatus != 1;
+ setVisible(_flag);
+ return true;
+}
+
} // End of namespace Titanic