diff options
author | Paul Gilbert | 2016-08-28 11:29:23 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-08-28 11:29:23 -0400 |
commit | 56c2ef9efc966286eefa451eba6f5acb1f58886f (patch) | |
tree | 6f856e9e387c9e61c53ad3df71fd2e808cc6306e /engines/titanic/game/starling_puret.cpp | |
parent | 1dcfe25808164c5f2540662028862ac8a0e56831 (diff) | |
download | scummvm-rg350-56c2ef9efc966286eefa451eba6f5acb1f58886f.tar.gz scummvm-rg350-56c2ef9efc966286eefa451eba6f5acb1f58886f.tar.bz2 scummvm-rg350-56c2ef9efc966286eefa451eba6f5acb1f58886f.zip |
TITANIC: Implemented more game classes
Diffstat (limited to 'engines/titanic/game/starling_puret.cpp')
-rw-r--r-- | engines/titanic/game/starling_puret.cpp | 44 |
1 files changed, 42 insertions, 2 deletions
diff --git a/engines/titanic/game/starling_puret.cpp b/engines/titanic/game/starling_puret.cpp index 359ad774df..2f1909d963 100644 --- a/engines/titanic/game/starling_puret.cpp +++ b/engines/titanic/game/starling_puret.cpp @@ -24,16 +24,56 @@ namespace Titanic { +BEGIN_MESSAGE_MAP(CStarlingPuret, CGameObject) + ON_MESSAGE(StatusChangeMsg) + ON_MESSAGE(EnterViewMsg) + ON_MESSAGE(MovieEndMsg) +END_MESSAGE_MAP() + void CStarlingPuret::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); - file->writeNumberLine(_value, indent); + file->writeNumberLine(_flag, indent); CGameObject::save(file, indent); } void CStarlingPuret::load(SimpleFile *file) { file->readNumber(); - _value = file->readNumber(); + _flag = file->readNumber(); CGameObject::load(file); } +bool CStarlingPuret::StatusChangeMsg(CStatusChangeMsg *msg) { + _flag = msg->_newStatus == 1; + if (_flag) { + CStatusChangeMsg changeMsg; + changeMsg._newStatus = 1; + changeMsg.execute("StarlingLoop01"); + } + + return true; +} + +bool CStarlingPuret::EnterViewMsg(CEnterViewMsg *msg) { + if (_flag) { + CStatusChangeMsg changeMsg; + changeMsg._newStatus = 1; + changeMsg.execute("PromDeckStarlings"); + + playMovie(MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE); + CSignalObject signalMsg; + signalMsg._numValue = 4; + signalMsg.execute("PromDeckStarlings"); + _flag = false; + } + + return true; +} + +bool CStarlingPuret::MovieEndMsg(CMovieEndMsg *msg) { + CActMsg actMsg("StarlingsDead"); + actMsg.execute("FanController"); + actMsg.execute("BirdSauceDisp"); + return true; +} + } // End of namespace Titanic |