diff options
author | Paul Gilbert | 2017-01-16 09:55:00 -0500 |
---|---|---|
committer | Paul Gilbert | 2017-01-16 09:55:00 -0500 |
commit | 953e4e6d210a0d53cbeaae4ca9e17432840dc0ed (patch) | |
tree | 954f455d108f97127650fa962d3f1766ceca6c10 /engines/titanic/game | |
parent | 65d6edf829e66751636afd481a3e94c916a6dcb5 (diff) | |
download | scummvm-rg350-953e4e6d210a0d53cbeaae4ca9e17432840dc0ed.tar.gz scummvm-rg350-953e4e6d210a0d53cbeaae4ca9e17432840dc0ed.tar.bz2 scummvm-rg350-953e4e6d210a0d53cbeaae4ca9e17432840dc0ed.zip |
TITANIC: Renamings for light switches
Diffstat (limited to 'engines/titanic/game')
-rw-r--r-- | engines/titanic/game/light.cpp | 48 | ||||
-rw-r--r-- | engines/titanic/game/light.h | 16 | ||||
-rw-r--r-- | engines/titanic/game/light_switch.cpp | 18 | ||||
-rw-r--r-- | engines/titanic/game/light_switch.h | 2 | ||||
-rw-r--r-- | engines/titanic/game/television.cpp | 2 |
5 files changed, 43 insertions, 43 deletions
diff --git a/engines/titanic/game/light.cpp b/engines/titanic/game/light.cpp index bc8782a2b1..76dc9a44b0 100644 --- a/engines/titanic/game/light.cpp +++ b/engines/titanic/game/light.cpp @@ -37,35 +37,35 @@ BEGIN_MESSAGE_MAP(CLight, CBackground) ON_MESSAGE(EnterRoomMsg) END_MESSAGE_MAP() -CLight::CLight() : CBackground(), _fieldE0(0), _fieldE4(0), - _fieldE8(0), _fieldEC(0), _fieldF0(0), _fieldF4(0), - _fieldF8(0), _fieldFC(0) { +CLight::CLight() : CBackground(), _unused1(0), _upRight(false), + _upLeft(false), _downLeft(false), _downRight(false), _unused2(0), + _unused3(0), _eyePresent(false) { } void CLight::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); - file->writeNumberLine(_fieldE0, indent); - file->writeNumberLine(_fieldE4, indent); - file->writeNumberLine(_fieldE8, indent); - file->writeNumberLine(_fieldEC, indent); - file->writeNumberLine(_fieldF0, indent); - file->writeNumberLine(_fieldF4, indent); - file->writeNumberLine(_fieldF8, indent); - file->writeNumberLine(_fieldFC, indent); + file->writeNumberLine(_unused1, indent); + file->writeNumberLine(_upRight, indent); + file->writeNumberLine(_upLeft, indent); + file->writeNumberLine(_downLeft, indent); + file->writeNumberLine(_downRight, indent); + file->writeNumberLine(_unused2, indent); + file->writeNumberLine(_unused3, indent); + file->writeNumberLine(_eyePresent, indent); CBackground::save(file, indent); } void CLight::load(SimpleFile *file) { file->readNumber(); - _fieldE0 = file->readNumber(); - _fieldE4 = file->readNumber(); - _fieldE8 = file->readNumber(); - _fieldEC = file->readNumber(); - _fieldF0 = file->readNumber(); - _fieldF4 = file->readNumber(); - _fieldF8 = file->readNumber(); - _fieldFC = file->readNumber(); + _unused1 = file->readNumber(); + _upRight = file->readNumber(); + _upLeft = file->readNumber(); + _downLeft = file->readNumber(); + _downRight = file->readNumber(); + _unused2 = file->readNumber(); + _unused3 = file->readNumber(); + _eyePresent = file->readNumber(); CBackground::load(file); } @@ -76,8 +76,8 @@ bool CLight::TurnOff(CTurnOff *msg) { } bool CLight::LightsMsg(CLightsMsg *msg) { - if ((msg->_flag2 && _fieldE8) || (msg->_flag3 && _fieldEC) - || (msg->_flag1 && _fieldE4) || (msg->_flag4 && _fieldF0)) { + if ((msg->_upLeft && _upLeft) || (msg->_downLeft && _downLeft) + || (msg->_upRight && _upRight) || (msg->_downRight && _downRight)) { setVisible(true); } else { setVisible(false); @@ -100,7 +100,7 @@ bool CLight::StatusChangeMsg(CStatusChangeMsg *msg) { CPetControl *pet = getPetControl(); bool flag = pet ? pet->isRoom59706() : false; - if (_fieldFC == 1 && flag) { + if (_eyePresent && flag) { petDisplayMessage(1, LIGHT_IS_LOOSE); playSound("z#144.wav", 70); } else { @@ -115,7 +115,7 @@ bool CLight::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { CPetControl *pet = getPetControl(); bool flag = pet ? pet->isRoom59706() : false; - if (_fieldFC == 1 && flag) { + if (_eyePresent && flag) { petDisplayMessage(1, LIGHT_IS_LOOSE); playSound("z#144.wav", 70); } else { @@ -128,7 +128,7 @@ bool CLight::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { bool CLight::ActMsg(CActMsg *msg) { if (msg->_action == "Eye Removed") - _fieldFC = 0; + _eyePresent = false; return true; } diff --git a/engines/titanic/game/light.h b/engines/titanic/game/light.h index 68223275e5..12f7d88bcb 100644 --- a/engines/titanic/game/light.h +++ b/engines/titanic/game/light.h @@ -39,14 +39,14 @@ class CLight : public CBackground { bool ActMsg(CActMsg *msg); bool EnterRoomMsg(CEnterRoomMsg *msg); private: - int _fieldE0; - int _fieldE4; - int _fieldE8; - int _fieldEC; - int _fieldF0; - int _fieldF4; - int _fieldF8; - int _fieldFC; + int _unused1; + bool _upRight; + bool _upLeft; + bool _downLeft; + bool _downRight; + int _unused2; + int _unused3; + bool _eyePresent; public: CLASSDEF; CLight(); diff --git a/engines/titanic/game/light_switch.cpp b/engines/titanic/game/light_switch.cpp index 6badf63b5b..0137ff9965 100644 --- a/engines/titanic/game/light_switch.cpp +++ b/engines/titanic/game/light_switch.cpp @@ -41,7 +41,7 @@ END_MESSAGE_MAP() bool CLightSwitch::_flag; CLightSwitch::CLightSwitch() : CBackground(), - _fieldE0(0), _fieldE4(0), _fieldE8(0) { + _fieldE0(0), _fieldE4(0), _turnOnTV(false) { } void CLightSwitch::save(SimpleFile *file, int indent) { @@ -49,7 +49,7 @@ void CLightSwitch::save(SimpleFile *file, int indent) { file->writeNumberLine(_fieldE0, indent); file->writeNumberLine(_fieldE4, indent); file->writeNumberLine(_flag, indent); - file->writeNumberLine(_fieldE8, indent); + file->writeNumberLine(_turnOnTV, indent); CBackground::save(file, indent); } @@ -59,7 +59,7 @@ void CLightSwitch::load(SimpleFile *file) { _fieldE0 = file->readNumber(); _fieldE4 = file->readNumber(); _flag = file->readNumber(); - _fieldE8 = file->readNumber(); + _turnOnTV = file->readNumber(); CBackground::load(file); } @@ -69,7 +69,7 @@ bool CLightSwitch::PETUpMsg(CPETUpMsg *msg) { CLightsMsg lightsMsg(true, true, false, false); lightsMsg.execute("1stClassState", CLight::_type, MSGFLAG_SCAN); - if (_fieldE8) + if (_turnOnTV) CTelevision::_turnOn = true; } @@ -81,7 +81,7 @@ bool CLightSwitch::PETDownMsg(CPETDownMsg *msg) { CLightsMsg lightsMsg(false, false, true, true); lightsMsg.execute("1stClassState", CLight::_type, MSGFLAG_SCAN); - if (_fieldE8) + if (_turnOnTV) CTelevision::_turnOn = true; } @@ -93,7 +93,7 @@ bool CLightSwitch::PETLeftMsg(CPETLeftMsg *msg) { CLightsMsg lightsMsg(false, true, true, false); lightsMsg.execute("1stClassState", CLight::_type, MSGFLAG_SCAN); - if (_fieldE8) + if (_turnOnTV) CTelevision::_turnOn = true; } @@ -105,7 +105,7 @@ bool CLightSwitch::PETRightMsg(CPETRightMsg *msg) { CLightsMsg lightsMsg(true, false, false, true); lightsMsg.execute("1stClassState", CLight::_type, MSGFLAG_SCAN); - if (_fieldE8) + if (_turnOnTV) CTelevision::_turnOn = true; } @@ -122,7 +122,7 @@ bool CLightSwitch::PETActivateMsg(CPETActivateMsg *msg) { CTurnOn onMsg; onMsg.execute("1stClassState", CLight::_type, MSGFLAG_CLASS_DEF | MSGFLAG_SCAN); _flag = false; - if (_fieldE8) + if (_turnOnTV) CTelevision::_turnOn = false; } } @@ -144,7 +144,7 @@ bool CLightSwitch::EnterRoomMsg(CEnterRoomMsg *msg) { _flag = true; CPetControl *pet = getPetControl(); if (pet) - _fieldE8 = pet->isRoom59706(); + _turnOnTV = pet->isRoom59706(); return true; } diff --git a/engines/titanic/game/light_switch.h b/engines/titanic/game/light_switch.h index f8c01dc8b0..1cde4f064f 100644 --- a/engines/titanic/game/light_switch.h +++ b/engines/titanic/game/light_switch.h @@ -44,7 +44,7 @@ public: private: int _fieldE0; int _fieldE4; - int _fieldE8; + bool _turnOnTV; public: CLASSDEF; CLightSwitch(); diff --git a/engines/titanic/game/television.cpp b/engines/titanic/game/television.cpp index a0499f1d39..ba48d8061a 100644 --- a/engines/titanic/game/television.cpp +++ b/engines/titanic/game/television.cpp @@ -288,7 +288,7 @@ bool CTelevision::LightsMsg(CLightsMsg *msg) { if (pet) flag = pet->isRoom59706(); - if (msg->_flag2 || !flag) + if (msg->_upLeft || !flag) _turnOn = true; return true; |