diff options
| author | Paul Gilbert | 2017-01-16 07:34:52 -0500 |
|---|---|---|
| committer | Paul Gilbert | 2017-01-16 07:34:52 -0500 |
| commit | 70dc84e383bfb4a81785b30ce91f7e089a94c031 (patch) | |
| tree | 2ab742d8640708af8c5c4151b1154e97bb3488e2 /engines/titanic/carry | |
| parent | 480532c2096451cd594cdce944e2345e738039c5 (diff) | |
| download | scummvm-rg350-70dc84e383bfb4a81785b30ce91f7e089a94c031.tar.gz scummvm-rg350-70dc84e383bfb4a81785b30ce91f7e089a94c031.tar.bz2 scummvm-rg350-70dc84e383bfb4a81785b30ce91f7e089a94c031.zip | |
TITANIC: Renamings and cleanup for chicken, sauce, and dispensor
Diffstat (limited to 'engines/titanic/carry')
| -rw-r--r-- | engines/titanic/carry/chicken.cpp | 46 | ||||
| -rw-r--r-- | engines/titanic/carry/chicken.h | 6 | ||||
| -rw-r--r-- | engines/titanic/carry/glass.cpp | 2 | ||||
| -rw-r--r-- | engines/titanic/carry/napkin.cpp | 2 |
4 files changed, 29 insertions, 27 deletions
diff --git a/engines/titanic/carry/chicken.cpp b/engines/titanic/carry/chicken.cpp index e3577f2fb8..851b7b81e7 100644 --- a/engines/titanic/carry/chicken.cpp +++ b/engines/titanic/carry/chicken.cpp @@ -40,18 +40,20 @@ BEGIN_MESSAGE_MAP(CChicken, CCarry) ON_MESSAGE(PETLostObjectMsg) END_MESSAGE_MAP() -int CChicken::_v1; +int CChicken::_temperature; + +#define HOT_TEMPERATURE 120 CChicken::CChicken() : CCarry(), _condiment("None"), - _field12C(1), _field13C(0), _timerId(0) { + _greasy(true), _inactive(false), _timerId(0) { } void CChicken::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); - file->writeNumberLine(_field12C, indent); + file->writeNumberLine(_greasy, indent); file->writeQuotedLine(_condiment, indent); - file->writeNumberLine(_v1, indent); - file->writeNumberLine(_field13C, indent); + file->writeNumberLine(_temperature, indent); + file->writeNumberLine(_inactive, indent); file->writeNumberLine(_timerId, indent); CCarry::save(file, indent); @@ -59,10 +61,10 @@ void CChicken::save(SimpleFile *file, int indent) { void CChicken::load(SimpleFile *file) { file->readNumber(); - _field12C = file->readNumber(); + _greasy = file->readNumber(); _condiment = file->readString(); - _v1 = file->readNumber(); - _field13C = file->readNumber(); + _temperature = file->readNumber(); + _inactive = file->readNumber(); _timerId = file->readNumber(); CCarry::load(file); @@ -70,7 +72,7 @@ void CChicken::load(SimpleFile *file) { bool CChicken::UseWithOtherMsg(CUseWithOtherMsg *msg) { if (msg->_other->getName() == "Napkin") { - if (_field12C || _condiment == "None") { + if (_greasy || _condiment != "None") { CActMsg actMsg("Clean"); actMsg.execute(this); petAddToInventory(); @@ -129,21 +131,21 @@ bool CChicken::ActMsg(CActMsg *msg) { } else if (msg->_action == "Clean") { _condiment = "None"; loadFrame(3); - _field12C = 0; + _greasy = false; _visibleFrame = 3; } else if (msg->_action == "Dispense Chicken") { _condiment = "None"; - _field13C = 0; - _field12C = 1; + _inactive = false; + _greasy = true; loadFrame(1); _visibleFrame = 1; - _v1 = 120; + _temperature = HOT_TEMPERATURE; } else if (msg->_action == "Hot") { - _v1 = 120; + _temperature = HOT_TEMPERATURE; } else if (msg->_action == "Eaten") { setVisible(false); petMoveToHiddenRoom(); - _field13C = 1; + _inactive = true; } return true; @@ -164,10 +166,10 @@ bool CChicken::TimerMsg(CTimerMsg *msg) { bool flag = false; if (obj) { - flag = _v1; - } else if (_v1 > 0) { - --_v1; - flag = _v1; + flag = _temperature; + } else if (_temperature > 0) { + --_temperature; + flag = _temperature; } if (flag) { @@ -185,7 +187,7 @@ bool CChicken::PETGainedObjectMsg(CPETGainedObjectMsg *msg) { } bool CChicken::ParrotTriesChickenMsg(CParrotTriesChickenMsg *msg) { - if (_v1 > 0) + if (_temperature > 0) msg->_value1 = 1; if (_condiment == "Tomato") { @@ -200,7 +202,7 @@ bool CChicken::ParrotTriesChickenMsg(CParrotTriesChickenMsg *msg) { } bool CChicken::MouseDragEndMsg(CMouseDragEndMsg *msg) { - if (_field13C) { + if (_inactive) { showMouse(); return true; } else { @@ -209,7 +211,7 @@ bool CChicken::MouseDragEndMsg(CMouseDragEndMsg *msg) { } bool CChicken::PETObjectStateMsg(CPETObjectStateMsg *msg) { - if (_v1 > 0) + if (_temperature > 0) msg->_value = 2; return true; diff --git a/engines/titanic/carry/chicken.h b/engines/titanic/carry/chicken.h index 47d25b39a4..e9fd6cbc9d 100644 --- a/engines/titanic/carry/chicken.h +++ b/engines/titanic/carry/chicken.h @@ -42,11 +42,11 @@ class CChicken : public CCarry { bool PETObjectStateMsg(CPETObjectStateMsg *msg); bool PETLostObjectMsg(CPETLostObjectMsg *msg); public: - static int _v1; + static int _temperature; public: - int _field12C; + bool _greasy; CString _condiment; - int _field13C; + bool _inactive; int _timerId; public: CLASSDEF; diff --git a/engines/titanic/carry/glass.cpp b/engines/titanic/carry/glass.cpp index 6751d8456d..fe8e10dbdb 100644 --- a/engines/titanic/carry/glass.cpp +++ b/engines/titanic/carry/glass.cpp @@ -60,7 +60,7 @@ bool CGlass::UseWithOtherMsg(CUseWithOtherMsg *msg) { useMsg.execute(dispensor); } else if (msg->_other->isEquals("Chicken") && _condiment == "None") { if (chicken->_condiment != "None") { - if (!chicken->_field12C) { + if (!chicken->_greasy) { CActMsg actMsg(_condiment); actMsg.execute("Chicken"); } diff --git a/engines/titanic/carry/napkin.cpp b/engines/titanic/carry/napkin.cpp index eaafd8b34c..7b9c1e91c9 100644 --- a/engines/titanic/carry/napkin.cpp +++ b/engines/titanic/carry/napkin.cpp @@ -45,7 +45,7 @@ void CNapkin::load(SimpleFile *file) { bool CNapkin::UseWithOtherMsg(CUseWithOtherMsg *msg) { CChicken *chicken = dynamic_cast<CChicken *>(msg->_other); if (chicken) { - if (chicken->_condiment == "None" || chicken->_field12C) { + if (chicken->_condiment != "None" || chicken->_greasy) { CActMsg actMsg("Clean"); actMsg.execute("Chicken"); } else { |
