aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/game/sgt/washstand.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/titanic/game/sgt/washstand.cpp')
-rw-r--r--engines/titanic/game/sgt/washstand.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/engines/titanic/game/sgt/washstand.cpp b/engines/titanic/game/sgt/washstand.cpp
index 8127a59a59..afdc74414d 100644
--- a/engines/titanic/game/sgt/washstand.cpp
+++ b/engines/titanic/game/sgt/washstand.cpp
@@ -24,6 +24,12 @@
namespace Titanic {
+BEGIN_MESSAGE_MAP(CWashstand, CSGTStateRoom)
+ ON_MESSAGE(TurnOn)
+ ON_MESSAGE(TurnOff)
+ ON_MESSAGE(MovieEndMsg)
+END_MESSAGE_MAP()
+
void CWashstand::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
CSGTStateRoom::save(file, indent);
@@ -34,4 +40,36 @@ void CWashstand::load(SimpleFile *file) {
CSGTStateRoom::load(file);
}
+bool CWashstand::TurnOn(CTurnOn *msg) {
+ if (_statics->_v10 == "Closed" && _statics->_v2 == "NotOnWashstand") {
+ setVisible(true);
+ _statics->_v10 = "Open";
+ _fieldE0 = false;
+ _startFrame = 0;
+ _endFrame = 14;
+ playMovie(0, 14, MOVIE_GAMESTATE);
+ playSound("b#14.wav");
+ }
+
+ return true;
+}
+
+bool CWashstand::TurnOff(CTurnOff *msg) {
+ if (_statics->_v10 == "Open" && _statics->_v11 == "Closed"
+ && _statics->_v12 == "Closed" && _statics->_v2 == "Open") {
+ _statics->_v10 = "Closed";
+ _fieldE0 = true;
+ _startFrame = 14;
+ _endFrame = 28;
+ playMovie(14, 28, MOVIE_GAMESTATE | MOVIE_NOTIFY_OBJECT);
+ playSound("b#14.wav");
+ }
+
+ return true;
+}
+
+bool CWashstand::MovieEndMsg(CMovieEndMsg *msg) {
+ return true;
+}
+
} // End of namespace Titanic