aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/game/end_sequence_control.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2016-08-19 23:41:19 -0400
committerPaul Gilbert2016-08-19 23:41:19 -0400
commit3c2c82fcd593e7b358f359de69070b6dd0e92150 (patch)
tree53251f5642b35626c606633cfe7baa1ce87b1fea /engines/titanic/game/end_sequence_control.cpp
parent449d8a02e05754e889e13ff721ff2c0cb995c486 (diff)
downloadscummvm-rg350-3c2c82fcd593e7b358f359de69070b6dd0e92150.tar.gz
scummvm-rg350-3c2c82fcd593e7b358f359de69070b6dd0e92150.tar.bz2
scummvm-rg350-3c2c82fcd593e7b358f359de69070b6dd0e92150.zip
TITANIC: Implemented more game classes
Diffstat (limited to 'engines/titanic/game/end_sequence_control.cpp')
-rw-r--r--engines/titanic/game/end_sequence_control.cpp44
1 files changed, 43 insertions, 1 deletions
diff --git a/engines/titanic/game/end_sequence_control.cpp b/engines/titanic/game/end_sequence_control.cpp
index d32b3d1713..033a7752a3 100644
--- a/engines/titanic/game/end_sequence_control.cpp
+++ b/engines/titanic/game/end_sequence_control.cpp
@@ -24,6 +24,13 @@
namespace Titanic {
+BEGIN_MESSAGE_MAP(CEndSequenceControl, CGameObject)
+ ON_MESSAGE(TimerMsg)
+ ON_MESSAGE(MovieEndMsg)
+ ON_MESSAGE(EnterRoomMsg)
+ ON_MESSAGE(EnterViewMsg)
+END_MESSAGE_MAP()
+
void CEndSequenceControl::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
CGameObject::save(file, indent);
@@ -34,8 +41,43 @@ void CEndSequenceControl::load(SimpleFile *file) {
CGameObject::load(file);
}
+bool CEndSequenceControl::TimerMsg(CTimerMsg *msg) {
+ switch (msg->_actionVal) {
+ case 1:
+ changeView("TheEnd.Node 2.N");
+ break;
+ case 2: {
+ playSound("ShipFlyingMusic.wav");
+ CActMsg actMsg("TakeOff");
+ actMsg.execute("EndExplodeShip");
+ break;
+ }
+
+ default:
+ break;
+ }
+
+ return true;
+}
+
+bool CEndSequenceControl::MovieEndMsg(CMovieEndMsg *msg) {
+ setGlobalSoundVolume(-4, 2, -1);
+ changeView("TheEnd.Node 3.N");
+ addTimer(2, 1000, 0);
+ return true;
+}
+
bool CEndSequenceControl::EnterRoomMsg(CEnterRoomMsg *msg) {
- warning("TODO: CEndSequenceControl::handleEvent");
+ petHide();
+ disableMouse();
+ addTimer(1, 1000, 0);
+ playGlobalSound("a#15.wav", -1, true, true, 0);
+ return true;
+}
+
+bool CEndSequenceControl::EnterViewMsg(CEnterViewMsg *msg) {
+ movieSetAudioTiming(true);
+ playMovie(MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
return true;
}