diff options
-rw-r--r-- | engines/titanic/game/end_explode_ship.cpp | 16 | ||||
-rw-r--r-- | engines/titanic/game/end_explode_ship.h | 5 | ||||
-rw-r--r-- | engines/titanic/game/end_game_credits.cpp | 2 |
3 files changed, 12 insertions, 11 deletions
diff --git a/engines/titanic/game/end_explode_ship.cpp b/engines/titanic/game/end_explode_ship.cpp index 10c80f5863..6253a4df02 100644 --- a/engines/titanic/game/end_explode_ship.cpp +++ b/engines/titanic/game/end_explode_ship.cpp @@ -33,25 +33,25 @@ END_MESSAGE_MAP() void CEndExplodeShip::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); - file->writeNumberLine(_value1, indent); - file->writeNumberLine(_value2, indent); + file->writeNumberLine(_isExploding, indent); + file->writeNumberLine(_unused5, indent); CGameObject::save(file, indent); } void CEndExplodeShip::load(SimpleFile *file) { file->readNumber(); - _value1 = file->readNumber(); - _value2 = file->readNumber(); + _isExploding = file->readNumber(); + _unused5 = file->readNumber(); CGameObject::load(file); } bool CEndExplodeShip::ActMsg(CActMsg *msg) { if (msg->_action == "Arm Bomb") { - _value1 = 1; + _isExploding = true; } else if (msg->_action == "Disarm Bomb") { - _value1 = 0; + _isExploding = false; } else if (msg->_action == "TakeOff") { loadSound("a#31.wav"); loadSound("a#14.wav"); @@ -67,12 +67,12 @@ bool CEndExplodeShip::TimerMsg(CTimerMsg *msg) { setVisible(true); playMovie(0, 449, 0); movieEvent(58); - playMovie(516, _value1 ? 550 : 551, MOVIE_NOTIFY_OBJECT); + playMovie(516, _isExploding ? 550 : 551, MOVIE_NOTIFY_OBJECT); } if (msg->_actionVal == 3) { setGlobalSoundVolume(-4, 2, -1); - CActMsg actMsg(_value1 ? "ExplodeCredits" : "Credits"); + CActMsg actMsg(_isExploding ? "ExplodeCredits" : "Credits"); actMsg.execute("EndGameCredits"); } diff --git a/engines/titanic/game/end_explode_ship.h b/engines/titanic/game/end_explode_ship.h index c48f822af8..592741e5c0 100644 --- a/engines/titanic/game/end_explode_ship.h +++ b/engines/titanic/game/end_explode_ship.h @@ -34,10 +34,11 @@ class CEndExplodeShip : public CGameObject { bool MovieEndMsg(CMovieEndMsg *msg); bool MovieFrameMsg(CMovieFrameMsg *msg); public: - int _value1, _value2; + bool _isExploding; + int _unused5; public: CLASSDEF; - CEndExplodeShip() : CGameObject(), _value1(0), _value2(0) {} + CEndExplodeShip() : CGameObject(), _isExploding(false), _unused5(0) {} /** * Save the data for the class to file diff --git a/engines/titanic/game/end_game_credits.cpp b/engines/titanic/game/end_game_credits.cpp index 79ddcce411..c816f22706 100644 --- a/engines/titanic/game/end_game_credits.cpp +++ b/engines/titanic/game/end_game_credits.cpp @@ -31,7 +31,7 @@ BEGIN_MESSAGE_MAP(CEndGameCredits, CGameObject) ON_MESSAGE(TimerMsg) END_MESSAGE_MAP() -CEndGameCredits::CEndGameCredits() : CGameObject(), _flag(0), +CEndGameCredits::CEndGameCredits() : CGameObject(), _flag(false), _frameRange(0, 28) { } |