diff options
author | Paul Gilbert | 2016-12-07 19:48:35 -0500 |
---|---|---|
committer | Paul Gilbert | 2016-12-07 19:48:35 -0500 |
commit | de9e04d75fad2e0d893ba38315f0361ae58bc3e6 (patch) | |
tree | f36a3289063f0094da3a96f3bec9f0b4a0f7f1db /engines | |
parent | 203a239ee3dff5d7e671e65805e3e3780681466d (diff) | |
download | scummvm-rg350-de9e04d75fad2e0d893ba38315f0361ae58bc3e6.tar.gz scummvm-rg350-de9e04d75fad2e0d893ba38315f0361ae58bc3e6.tar.bz2 scummvm-rg350-de9e04d75fad2e0d893ba38315f0361ae58bc3e6.zip |
TITANIC: Cleanup and fixes for CTurnOnTurnOff class
Diffstat (limited to 'engines')
-rw-r--r-- | engines/titanic/core/background.cpp | 8 | ||||
-rw-r--r-- | engines/titanic/core/background.h | 2 | ||||
-rw-r--r-- | engines/titanic/core/turn_on_turn_off.cpp | 18 | ||||
-rw-r--r-- | engines/titanic/core/turn_on_turn_off.h | 2 |
4 files changed, 15 insertions, 15 deletions
diff --git a/engines/titanic/core/background.cpp b/engines/titanic/core/background.cpp index 792cd28346..e9e8aa0bdf 100644 --- a/engines/titanic/core/background.cpp +++ b/engines/titanic/core/background.cpp @@ -30,7 +30,7 @@ BEGIN_MESSAGE_MAP(CBackground, CGameObject) ON_MESSAGE(VisibleMsg) END_MESSAGE_MAP() -CBackground::CBackground() : CGameObject(), _startFrame(0), _endFrame(0), _fieldDC(0) { +CBackground::CBackground() : CGameObject(), _startFrame(0), _endFrame(0), _isBlocking(false) { } void CBackground::save(SimpleFile *file, int indent) { @@ -39,7 +39,7 @@ void CBackground::save(SimpleFile *file, int indent) { file->writeNumberLine(_endFrame, indent); file->writeQuotedLine(_string1, indent); file->writeQuotedLine(_string2, indent); - file->writeNumberLine(_fieldDC, indent); + file->writeNumberLine(_isBlocking, indent); CGameObject::save(file, indent); } @@ -50,14 +50,14 @@ void CBackground::load(SimpleFile *file) { _endFrame = file->readNumber(); _string1 = file->readString(); _string2 = file->readString(); - _fieldDC = file->readNumber(); + _isBlocking = file->readNumber(); CGameObject::load(file); } bool CBackground::StatusChangeMsg(CStatusChangeMsg *msg) { setVisible(true); - if (_fieldDC) { + if (_isBlocking) { playMovie(_startFrame, _endFrame, MOVIE_GAMESTATE); } else { playMovie(_startFrame, _endFrame, 0); diff --git a/engines/titanic/core/background.h b/engines/titanic/core/background.h index b7f160db28..6a1e4fd103 100644 --- a/engines/titanic/core/background.h +++ b/engines/titanic/core/background.h @@ -38,7 +38,7 @@ protected: int _endFrame; CString _string1; CString _string2; - int _fieldDC; + bool _isBlocking; public: CLASSDEF; CBackground(); diff --git a/engines/titanic/core/turn_on_turn_off.cpp b/engines/titanic/core/turn_on_turn_off.cpp index 6498c226a0..191f7050c9 100644 --- a/engines/titanic/core/turn_on_turn_off.cpp +++ b/engines/titanic/core/turn_on_turn_off.cpp @@ -30,7 +30,7 @@ BEGIN_MESSAGE_MAP(CTurnOnTurnOff, CBackground) END_MESSAGE_MAP() CTurnOnTurnOff::CTurnOnTurnOff() : CBackground(), _startFrameOn(0), - _endFrameOn(0), _startFrameOff(0), _endFrameOff(0), _fieldF0(false) { + _endFrameOn(0), _startFrameOff(0), _endFrameOff(0), _isOn(false) { } void CTurnOnTurnOff::save(SimpleFile *file, int indent) { @@ -39,7 +39,7 @@ void CTurnOnTurnOff::save(SimpleFile *file, int indent) { file->writeNumberLine(_endFrameOn, indent); file->writeNumberLine(_startFrameOff, indent); file->writeNumberLine(_endFrameOff, indent); - file->writeNumberLine(_fieldF0, indent); + file->writeNumberLine(_isOn, indent); CBackground::save(file, indent); } @@ -50,30 +50,30 @@ void CTurnOnTurnOff::load(SimpleFile *file) { _endFrameOn = file->readNumber(); _startFrameOff = file->readNumber(); _endFrameOff = file->readNumber(); - _fieldF0 = file->readNumber(); + _isOn = file->readNumber(); CBackground::load(file); } bool CTurnOnTurnOff::TurnOn(CTurnOn *msg) { - if (!_fieldF0) { - if (_fieldDC) + if (!_isOn) { + if (_isBlocking) playMovie(_startFrameOn, _endFrameOn, MOVIE_GAMESTATE); else playMovie(_startFrameOn, _endFrameOn, MOVIE_NOTIFY_OBJECT); - _fieldF0 = true; + _isOn = true; } return true; } bool CTurnOnTurnOff::TurnOff(CTurnOff *msg) { - if (!_fieldF0) { - if (_fieldDC) + if (!_isOn) { + if (_isBlocking) playMovie(_startFrameOff, _endFrameOff, MOVIE_GAMESTATE); else playMovie(_startFrameOff, _endFrameOff, MOVIE_NOTIFY_OBJECT); - _fieldF0 = true; + _isOn = false; } return true; diff --git a/engines/titanic/core/turn_on_turn_off.h b/engines/titanic/core/turn_on_turn_off.h index c09f0e0d7d..1749394819 100644 --- a/engines/titanic/core/turn_on_turn_off.h +++ b/engines/titanic/core/turn_on_turn_off.h @@ -36,7 +36,7 @@ private: int _endFrameOn; int _startFrameOff; int _endFrameOff; - bool _fieldF0; + bool _isOn; public: CLASSDEF; CTurnOnTurnOff(); |