diff options
author | Paul Gilbert | 2017-02-20 15:37:38 -0500 |
---|---|---|
committer | Paul Gilbert | 2017-02-20 15:37:38 -0500 |
commit | 52dbc31370ad4a2d0f4ff6993ea4aeffdd23b4bd (patch) | |
tree | 5835d2ba771808b3ce4e556ab48cc6cc70a08367 | |
parent | 974f78008d59ec1638d59f6581b388da6b852987 (diff) | |
download | scummvm-rg350-52dbc31370ad4a2d0f4ff6993ea4aeffdd23b4bd.tar.gz scummvm-rg350-52dbc31370ad4a2d0f4ff6993ea4aeffdd23b4bd.tar.bz2 scummvm-rg350-52dbc31370ad4a2d0f4ff6993ea4aeffdd23b4bd.zip |
TITANIC: Cleanup and renaming for CBrain base class
-rw-r--r-- | engines/titanic/carry/brain.cpp | 24 | ||||
-rw-r--r-- | engines/titanic/carry/brain.h | 4 |
2 files changed, 14 insertions, 14 deletions
diff --git a/engines/titanic/carry/brain.cpp b/engines/titanic/carry/brain.cpp index 49178d1e10..09ebd42724 100644 --- a/engines/titanic/carry/brain.cpp +++ b/engines/titanic/carry/brain.cpp @@ -33,14 +33,14 @@ BEGIN_MESSAGE_MAP(CBrain, CCarry) ON_MESSAGE(PETGainedObjectMsg) END_MESSAGE_MAP() -CBrain::CBrain() : CCarry(), _field134(0), _field138(0) { +CBrain::CBrain() : CCarry(), _pieceAdded(false), _perchGained(false) { } void CBrain::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); file->writePoint(_pos1, indent); - file->writeNumberLine(_field134, indent); - file->writeNumberLine(_field138, indent); + file->writeNumberLine(_pieceAdded, indent); + file->writeNumberLine(_perchGained, indent); CCarry::save(file, indent); } @@ -48,8 +48,8 @@ void CBrain::save(SimpleFile *file, int indent) { void CBrain::load(SimpleFile *file) { file->readNumber(); _pos1 = file->readPoint(); - _field134 = file->readNumber(); - _field138 = file->readNumber(); + _pieceAdded = file->readNumber(); + _perchGained = file->readNumber(); CCarry::load(file); } @@ -71,7 +71,7 @@ bool CBrain::UseWithOtherMsg(CUseWithOtherMsg *msg) { playSound("z#116.wav"); setPosition(Point(0, 0)); setVisible(false); - _field134 = 1; + _pieceAdded = true; } return true; @@ -86,11 +86,11 @@ bool CBrain::MouseDragStartMsg(CMouseDragStartMsg *msg) { if (!checkStartDragging(msg)) return false; - if (_field134) { + if (_pieceAdded) { CTakeHeadPieceMsg headpieceMsg(getName()); headpieceMsg.execute("TitaniaControl"); - _field134 = 0; + _pieceAdded = false; setVisible(true); moveToView(); @@ -102,10 +102,10 @@ bool CBrain::MouseDragStartMsg(CMouseDragStartMsg *msg) { } bool CBrain::PassOnDragStartMsg(CPassOnDragStartMsg *msg) { - if (_field134) { + if (_pieceAdded) { CTakeHeadPieceMsg headpieceMsg(getName()); headpieceMsg.execute("TitaniaControl"); - _field134 = 0; + _pieceAdded = false; setVisible(true); moveToView(); @@ -117,10 +117,10 @@ bool CBrain::PassOnDragStartMsg(CPassOnDragStartMsg *msg) { } bool CBrain::PETGainedObjectMsg(CPETGainedObjectMsg *msg) { - if (!_field138) { + if (!_perchGained) { if (getName() == "Perch") { incParrotResponse(); - _field138 = 1; + _perchGained = true; } } diff --git a/engines/titanic/carry/brain.h b/engines/titanic/carry/brain.h index bcba161e27..4c41378702 100644 --- a/engines/titanic/carry/brain.h +++ b/engines/titanic/carry/brain.h @@ -39,8 +39,8 @@ class CBrain : public CCarry { bool PETGainedObjectMsg(CPETGainedObjectMsg *msg); private: Point _pos1; - int _field134; - int _field138; + bool _pieceAdded; + bool _perchGained; public: CLASSDEF; CBrain(); |