diff options
Diffstat (limited to 'engines')
-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 | ||||
-rw-r--r-- | engines/titanic/messages/messages.h | 2 |
6 files changed, 44 insertions, 44 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; diff --git a/engines/titanic/messages/messages.h b/engines/titanic/messages/messages.h index 0cbb4b0e76..123003fee5 100644 --- a/engines/titanic/messages/messages.h +++ b/engines/titanic/messages/messages.h @@ -280,7 +280,7 @@ MESSAGE2(CLeaveNodeMsg, CNodeItem *, oldNode, nullptr, CNodeItem *, newNode, nul MESSAGE2(CLeaveRoomMsg, CRoomItem *, oldRoom, nullptr, CRoomItem *, newRoom, nullptr); MESSAGE2(CLeaveViewMsg, CViewItem *, oldView, nullptr, CViewItem *, newView, nullptr); MESSAGE1(CLemonFallsFromTreeMsg, Point, pt, Point()); -MESSAGE4(CLightsMsg, bool, flag1, false, bool, flag2, false, bool, flag3, false, bool, flag4, false); +MESSAGE4(CLightsMsg, bool, upRight, false, bool, upLeft, false, bool, downLeft, false, bool, downRight, false); MESSAGE1(CLoadSuccessMsg, int, ticks, 0); MESSAGE1(CLockPhonographMsg, int, value, 0); MESSAGE0(CMaitreDDefeatedMsg); |