aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2017-02-17 22:32:08 -0500
committerPaul Gilbert2017-02-17 22:32:08 -0500
commite72a56e4436ce10857b7e3601052a7bcc461367a (patch)
treef8be73ab340e2302502977cab9fa5b3fc5de60ea /engines
parentc8c96e953073a0505fd4c7d1cf4754b443ce7c38 (diff)
downloadscummvm-rg350-e72a56e4436ce10857b7e3601052a7bcc461367a.tar.gz
scummvm-rg350-e72a56e4436ce10857b7e3601052a7bcc461367a.tar.bz2
scummvm-rg350-e72a56e4436ce10857b7e3601052a7bcc461367a.zip
TITANIC: Renamings for CArm class
Diffstat (limited to 'engines')
-rw-r--r--engines/titanic/carry/arm.cpp64
-rw-r--r--engines/titanic/carry/arm.h12
2 files changed, 38 insertions, 38 deletions
diff --git a/engines/titanic/carry/arm.cpp b/engines/titanic/carry/arm.cpp
index 5105ea81b4..a843b5bb33 100644
--- a/engines/titanic/carry/arm.cpp
+++ b/engines/titanic/carry/arm.cpp
@@ -35,55 +35,55 @@ BEGIN_MESSAGE_MAP(CArm, CCarry)
ON_MESSAGE(MouseDragMoveMsg)
END_MESSAGE_MAP()
-CArm::CArm() : CCarry(), _string6("Key"),
- _field138(0), _field158(0), _field16C(3), _field170(0),
+CArm::CArm() : CCarry(), _heldItemName("Key"),
+ _puzzleUnused(0), _armUnlocked(false), _arboretumFrame(3), _unlockedFrame(0),
_armRect(220, 208, 409, 350) {
}
void CArm::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
- file->writeQuotedLine(_string6, indent);
- file->writeNumberLine(_field138, indent);
+ file->writeQuotedLine(_heldItemName, indent);
+ file->writeNumberLine(_puzzleUnused, indent);
file->writeNumberLine(_hookedRect.left, indent);
file->writeNumberLine(_hookedRect.top, indent);
file->writeNumberLine(_hookedRect.right, indent);
file->writeNumberLine(_hookedRect.bottom, indent);
- file->writeQuotedLine(_string7, indent);
- file->writeNumberLine(_field158, indent);
+ file->writeQuotedLine(_hookedTarget, indent);
+ file->writeNumberLine(_armUnlocked, indent);
file->writeNumberLine(_armRect.left, indent);
file->writeNumberLine(_armRect.top, indent);
file->writeNumberLine(_armRect.right, indent);
file->writeNumberLine(_armRect.bottom, indent);
- file->writeNumberLine(_field16C, indent);
- file->writeNumberLine(_field170, indent);
+ file->writeNumberLine(_arboretumFrame, indent);
+ file->writeNumberLine(_unlockedFrame, indent);
CCarry::save(file, indent);
}
void CArm::load(SimpleFile *file) {
file->readNumber();
- _string6 = file->readString();
- _field138 = file->readNumber();
+ _heldItemName = file->readString();
+ _puzzleUnused = file->readNumber();
_hookedRect.left = file->readNumber();
_hookedRect.top = file->readNumber();
_hookedRect.right = file->readNumber();
_hookedRect.bottom = file->readNumber();
- _string7 = file->readString();
- _field158 = file->readNumber();
+ _hookedTarget = file->readString();
+ _armUnlocked = file->readNumber();
_armRect.left = file->readNumber();
_armRect.top = file->readNumber();
_armRect.right = file->readNumber();
_armRect.bottom = file->readNumber();
- _field16C = file->readNumber();
- _field170 = file->readNumber();
+ _arboretumFrame = file->readNumber();
+ _unlockedFrame = file->readNumber();
CCarry::load(file);
}
bool CArm::PuzzleSolvedMsg(CPuzzleSolvedMsg *msg) {
- _field138 = 0;
+ _puzzleUnused = 0;
_canTake = true;
CString name = getName();
@@ -107,7 +107,7 @@ bool CArm::TranslateObjectMsg(CTranslateObjectMsg *msg) {
}
bool CArm::UseWithOtherMsg(CUseWithOtherMsg *msg) {
- if (_string6 != "None") {
+ if (_heldItemName != "None") {
CShowTextMsg textMsg(ARM_ALREADY_HOLDING);
textMsg.execute("PET");
return false;
@@ -117,7 +117,7 @@ bool CArm::UseWithOtherMsg(CUseWithOtherMsg *msg) {
hookedMsg.execute("GondolierLeftLever");
if (hookedMsg._result) {
- _string7 = "GondolierLeftLever";
+ _hookedTarget = "GondolierLeftLever";
} else {
petAddToInventory();
}
@@ -127,7 +127,7 @@ bool CArm::UseWithOtherMsg(CUseWithOtherMsg *msg) {
hookedMsg.execute("GondolierRightLever");
if (hookedMsg._result) {
- _string7 = "GondolierRightLever";
+ _hookedTarget = "GondolierRightLever";
} else {
petAddToInventory();
}
@@ -145,10 +145,10 @@ bool CArm::MouseDragStartMsg(CMouseDragStartMsg *msg) {
_tempPos = msg->_mousePos - _bounds;
setPosition(msg->_mousePos - _tempPos);
- if (!_string7.empty()) {
+ if (!_hookedTarget.empty()) {
CActMsg actMsg("Unhook");
- actMsg.execute(_string7);
- _string7.clear();
+ actMsg.execute(_hookedTarget);
+ _hookedTarget.clear();
}
loadFrame(_visibleFrame);
@@ -161,39 +161,39 @@ bool CArm::MouseDragStartMsg(CMouseDragStartMsg *msg) {
bool CArm::MaitreDHappyMsg(CMaitreDHappyMsg *msg) {
CGameObject *petItem;
if (find(getName(), &petItem, FIND_PET)) {
- if (!_field158)
+ if (!_armUnlocked)
playSound("z#47.wav");
- if (_string6 == "Key" || _string6 == "AuditoryCentre") {
+ if (_heldItemName == "Key" || _heldItemName == "AuditoryCentre") {
CGameObject *child = dynamic_cast<CGameObject *>(getFirstChild());
if (child) {
child->setVisible(true);
petAddToInventory();
}
- _visibleFrame = _field170;
+ _visibleFrame = _unlockedFrame;
loadFrame(_visibleFrame);
- _string6 = "None";
+ _heldItemName = "None";
petInvChange();
}
}
- _field158 = 1;
+ _armUnlocked = true;
_canTake = true;
return true;
}
bool CArm::PETGainedObjectMsg(CPETGainedObjectMsg *msg) {
- if (_field158) {
- if (_string6 == "Key" || _string6 == "AuditoryCentre") {
+ if (_armUnlocked) {
+ if (_heldItemName == "Key" || _heldItemName == "AuditoryCentre") {
CCarry *child = dynamic_cast<CCarry *>(getFirstChild());
if (child) {
- _visibleFrame = _field170;
+ _visibleFrame = _unlockedFrame;
loadFrame(_visibleFrame);
child->setVisible(true);
child->petAddToInventory();
}
- _string6 = "None";
+ _heldItemName = "None";
}
}
@@ -203,9 +203,9 @@ bool CArm::PETGainedObjectMsg(CPETGainedObjectMsg *msg) {
bool CArm::MouseDragMoveMsg(CMouseDragMoveMsg *msg) {
setPosition(msg->_mousePos - _tempPos);
- if (_string6 != "None" && compareViewNameTo("FrozenArboretum.Node 5.S")) {
+ if (_heldItemName != "None" && compareViewNameTo("FrozenArboretum.Node 5.S")) {
loadFrame(_armRect.contains(msg->_mousePos) ?
- _field16C : _visibleFrame);
+ _arboretumFrame : _visibleFrame);
}
return true;
diff --git a/engines/titanic/carry/arm.h b/engines/titanic/carry/arm.h
index fc8bba1f08..3eec4b6995 100644
--- a/engines/titanic/carry/arm.h
+++ b/engines/titanic/carry/arm.h
@@ -40,14 +40,14 @@ class CArm : public CCarry {
bool PETGainedObjectMsg(CPETGainedObjectMsg *msg);
bool MouseDragMoveMsg(CMouseDragMoveMsg *msg);
private:
- CString _string6;
- int _field138;
+ CString _heldItemName;
+ int _puzzleUnused;
Rect _hookedRect;
- CString _string7;
- int _field158;
+ CString _hookedTarget;
+ bool _armUnlocked;
Rect _armRect;
- int _field16C;
- int _field170;
+ int _arboretumFrame;
+ int _unlockedFrame;
public:
CLASSDEF;
CArm();