diff options
author | Paul Gilbert | 2016-08-14 22:19:06 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-08-14 22:19:06 -0400 |
commit | 440f0927570d30ab61fb640df22394296efbb265 (patch) | |
tree | 5ae2fa3d16228a79b995c8ebb21e5e20b4ff040d /engines/titanic/game/sgt/basin.cpp | |
parent | 3dfd4ba296f407cec7533afee941be42ca5f61f1 (diff) | |
download | scummvm-rg350-440f0927570d30ab61fb640df22394296efbb265.tar.gz scummvm-rg350-440f0927570d30ab61fb640df22394296efbb265.tar.bz2 scummvm-rg350-440f0927570d30ab61fb640df22394296efbb265.zip |
TITANIC: Implemented more game classes
Diffstat (limited to 'engines/titanic/game/sgt/basin.cpp')
-rw-r--r-- | engines/titanic/game/sgt/basin.cpp | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/engines/titanic/game/sgt/basin.cpp b/engines/titanic/game/sgt/basin.cpp index 1eb1d161c9..3f85edc4ca 100644 --- a/engines/titanic/game/sgt/basin.cpp +++ b/engines/titanic/game/sgt/basin.cpp @@ -24,6 +24,12 @@ namespace Titanic { +BEGIN_MESSAGE_MAP(CBasin, CSGTStateRoom) + ON_MESSAGE(TurnOn) + ON_MESSAGE(TurnOff) + ON_MESSAGE(MovieEndMsg) +END_MESSAGE_MAP() + void CBasin::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); CSGTStateRoom::save(file, indent); @@ -34,4 +40,39 @@ void CBasin::load(SimpleFile *file) { CSGTStateRoom::load(file); } +bool CBasin::TurnOn(CTurnOn *msg) { + if (_statics->_v10 == "Open" && _statics->_v11 == "Closed" + || _statics->_v2 == "Closed") { + setVisible(true); + _statics->_v11 = "Open"; + _fieldE0 = 0; + _startFrame = 0; + _endFrame = 6; + playMovie(0, 6, MOVIE_GAMESTATE); + playSound("b#13.wav"); + } + + return true; +} + +bool CBasin::TurnOff(CTurnOff *msg) { + if (_statics->_v11 == "Open") { + _statics->_v11 = "Closed"; + _fieldE0 = 1; + _startFrame = 8; + _endFrame = 14; + playMovie(8, 14, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE); + playSound("b#13.wav"); + } + + return true; +} + +bool CBasin::MovieEndMsg(CMovieEndMsg *msg) { + if (_statics->_v11 == "Closed") + setVisible(false); + + return true; +} + } // End of namespace Titanic |