diff options
author | Paul Gilbert | 2017-02-18 22:56:00 -0500 |
---|---|---|
committer | Paul Gilbert | 2017-02-18 22:56:00 -0500 |
commit | 66f3458a2be4a9a490b406a4e9a100be43849725 (patch) | |
tree | c1c7cdbf58d9b4db615faa536e61a68fcde14767 | |
parent | cc169fc5754af814c8e91e970eae384f3c4c4074 (diff) | |
download | scummvm-rg350-66f3458a2be4a9a490b406a4e9a100be43849725.tar.gz scummvm-rg350-66f3458a2be4a9a490b406a4e9a100be43849725.tar.bz2 scummvm-rg350-66f3458a2be4a9a490b406a4e9a100be43849725.zip |
TITANIC: Renamings for CCarry class
-rw-r--r-- | engines/titanic/carry/arm.cpp | 6 | ||||
-rw-r--r-- | engines/titanic/carry/carry.cpp | 63 | ||||
-rw-r--r-- | engines/titanic/carry/carry.h | 17 | ||||
-rw-r--r-- | engines/titanic/game/cdrom.cpp | 10 | ||||
-rw-r--r-- | engines/titanic/game/cdrom.h | 2 | ||||
-rw-r--r-- | engines/titanic/npcs/bellbot.cpp | 2 |
6 files changed, 48 insertions, 52 deletions
diff --git a/engines/titanic/carry/arm.cpp b/engines/titanic/carry/arm.cpp index c026bd04a9..129704cb83 100644 --- a/engines/titanic/carry/arm.cpp +++ b/engines/titanic/carry/arm.cpp @@ -130,8 +130,8 @@ bool CArm::MouseDragStartMsg(CMouseDragStartMsg *msg) { textMsg.execute("PET"); } else if (checkStartDragging(msg)) { hideMouse(); - _tempPos = msg->_mousePos - _bounds; - setPosition(msg->_mousePos - _tempPos); + _centroid = msg->_mousePos - _bounds; + setPosition(msg->_mousePos - _centroid); if (!_hookedTarget.empty()) { CActMsg actMsg("Unhook"); @@ -189,7 +189,7 @@ bool CArm::PETGainedObjectMsg(CPETGainedObjectMsg *msg) { } bool CArm::MouseDragMoveMsg(CMouseDragMoveMsg *msg) { - setPosition(msg->_mousePos - _tempPos); + setPosition(msg->_mousePos - _centroid); if (_heldItemName == "None" && compareViewNameTo("FrozenArboretum.Node 5.S")) { loadFrame(_armRect.contains(msg->_mousePos) ? diff --git a/engines/titanic/carry/carry.cpp b/engines/titanic/carry/carry.cpp index f6403b18b9..fd5b593fa3 100644 --- a/engines/titanic/carry/carry.cpp +++ b/engines/titanic/carry/carry.cpp @@ -44,30 +44,29 @@ BEGIN_MESSAGE_MAP(CCarry, CGameObject) ON_MESSAGE(PassOnDragStartMsg) END_MESSAGE_MAP() -CCarry::CCarry() : CGameObject(), _fieldDC(0), _canTake(true), - _field100(0), _field104(0), _field108(0), _field10C(0), - _itemFrame(0), _enterFrame(0), _enterFrameSet(false), _visibleFrame(0), - _string1("None"), - _fullViewName("NULL"), - _string3(g_vm->_strings[DOESNT_DO_ANYTHING]), - _string4(g_vm->_strings[DOESNT_WANT_THIS]) { +CCarry::CCarry() : CGameObject(), _unused5(0), _canTake(true), + _unusedR(0), _unusedG(0), _unusedB(0), _itemFrame(0), + _enterFrame(0), _enterFrameSet(false), _visibleFrame(0), + _npcUse("None"), _fullViewName("NULL"), + _doesNothingMsg(g_vm->_strings[DOESNT_DO_ANYTHING]), + _doesntWantMsg(g_vm->_strings[DOESNT_WANT_THIS]) { } void CCarry::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); - file->writeQuotedLine(_string1, indent); + file->writeQuotedLine(_npcUse, indent); file->writePoint(_origPos, indent); file->writeQuotedLine(_fullViewName, indent); - file->writeNumberLine(_fieldDC, indent); + file->writeNumberLine(_unused5, indent); file->writeNumberLine(_canTake, indent); - file->writeQuotedLine(_string3, indent); - file->writeQuotedLine(_string4, indent); - file->writePoint(_tempPos, indent); - file->writeNumberLine(_field104, indent); - file->writeNumberLine(_field108, indent); - file->writeNumberLine(_field10C, indent); + file->writeQuotedLine(_doesNothingMsg, indent); + file->writeQuotedLine(_doesntWantMsg, indent); + file->writePoint(_centroid, indent); + file->writeNumberLine(_unusedR, indent); + file->writeNumberLine(_unusedG, indent); + file->writeNumberLine(_unusedB, indent); file->writeNumberLine(_itemFrame, indent); - file->writeQuotedLine(_string5, indent); + file->writeQuotedLine(_unused6, indent); file->writeNumberLine(_enterFrame, indent); file->writeNumberLine(_enterFrameSet, indent); file->writeNumberLine(_visibleFrame, indent); @@ -77,19 +76,19 @@ void CCarry::save(SimpleFile *file, int indent) { void CCarry::load(SimpleFile *file) { file->readNumber(); - _string1 = file->readString(); + _npcUse = file->readString(); _origPos = file->readPoint(); _fullViewName = file->readString(); - _fieldDC = file->readNumber(); + _unused5 = file->readNumber(); _canTake = file->readNumber(); - _string3 = file->readString(); - _string4 = file->readString(); - _tempPos = file->readPoint(); - _field104 = file->readNumber(); - _field108 = file->readNumber(); - _field10C = file->readNumber(); + _doesNothingMsg = file->readString(); + _doesntWantMsg = file->readString(); + _centroid = file->readPoint(); + _unusedR = file->readNumber(); + _unusedG = file->readNumber(); + _unusedB = file->readNumber(); _itemFrame = file->readNumber(); - _string5 = file->readString(); + _unused6 = file->readString(); _enterFrame = file->readNumber(); _enterFrameSet = file->readNumber(); _visibleFrame = file->readNumber(); @@ -118,7 +117,7 @@ bool CCarry::MouseDragStartMsg(CMouseDragStartMsg *msg) { } bool CCarry::MouseDragMoveMsg(CMouseDragMoveMsg *msg) { - setPosition(msg->_mousePos - _tempPos); + setPosition(msg->_mousePos - _centroid); return true; } @@ -167,7 +166,7 @@ bool CCarry::UseWithCharMsg(CUseWithCharMsg *msg) { carryMsg._item = this; carryMsg.execute(succubus); } else { - CShowTextMsg textMsg(_string4); + CShowTextMsg textMsg(_doesntWantMsg); textMsg.execute("PET"); petAddToInventory(); } @@ -180,7 +179,7 @@ bool CCarry::LeaveViewMsg(CLeaveViewMsg *msg) { } bool CCarry::UseWithOtherMsg(CUseWithOtherMsg *msg) { - CShowTextMsg textMsg(_string3); + CShowTextMsg textMsg(_doesNothingMsg); textMsg.execute("PET"); if (!compareViewNameTo(_fullViewName) || _bounds.top >= 360) { @@ -233,13 +232,13 @@ bool CCarry::PassOnDragStartMsg(CPassOnDragStartMsg *msg) { loadFrame(_visibleFrame); if (msg->_value3) { - _tempPos.x = _bounds.width() / 2; - _tempPos.y = _bounds.height() / 2; + _centroid.x = _bounds.width() / 2; + _centroid.y = _bounds.height() / 2; } else { - _tempPos = msg->_mousePos - _bounds; + _centroid = msg->_mousePos - _bounds; } - setPosition(getMousePos() - _tempPos); + setPosition(getMousePos() - _centroid); return true; } diff --git a/engines/titanic/carry/carry.h b/engines/titanic/carry/carry.h index cb53df47a5..edfc8a7533 100644 --- a/engines/titanic/carry/carry.h +++ b/engines/titanic/carry/carry.h @@ -44,21 +44,18 @@ class CCarry : public CGameObject { bool EnterViewMsg(CEnterViewMsg *msg); bool PassOnDragStartMsg(CPassOnDragStartMsg *msg); protected: - int _fieldDC; - CString _string3; - CString _string4; - Point _tempPos; - int _field100; - int _field104; - int _field108; - int _field10C; + int _unused5; + CString _doesNothingMsg; + CString _doesntWantMsg; + Point _centroid; + int _unusedR, _unusedG, _unusedB; int _itemFrame; - CString _string5; + CString _unused6; int _enterFrame; bool _enterFrameSet; int _visibleFrame; public: - CString _string1; + CString _npcUse; bool _canTake; Point _origPos; CString _fullViewName; diff --git a/engines/titanic/game/cdrom.cpp b/engines/titanic/game/cdrom.cpp index 0d1cd3a6f2..d8d31ecc1a 100644 --- a/engines/titanic/game/cdrom.cpp +++ b/engines/titanic/game/cdrom.cpp @@ -38,21 +38,21 @@ CCDROM::CCDROM() : CGameObject() { void CCDROM::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); - file->writePoint(_tempPos, indent); + file->writePoint(_centroid, indent); CGameObject::save(file, indent); } void CCDROM::load(SimpleFile *file) { file->readNumber(); - _tempPos = file->readPoint(); + _centroid = file->readPoint(); CGameObject::load(file); } bool CCDROM::MouseDragStartMsg(CMouseDragStartMsg *msg) { if (checkStartDragging(msg)) { hideMouse(); - _tempPos = msg->_mousePos - _bounds; - setPosition(msg->_mousePos - _tempPos); + _centroid = msg->_mousePos - _bounds; + setPosition(msg->_mousePos - _centroid); return true; } else { return false; @@ -77,7 +77,7 @@ bool CCDROM::MouseDragEndMsg(CMouseDragEndMsg *msg) { } bool CCDROM::MouseDragMoveMsg(CMouseDragMoveMsg *msg) { - setPosition(msg->_mousePos - _tempPos); + setPosition(msg->_mousePos - _centroid); return true; } diff --git a/engines/titanic/game/cdrom.h b/engines/titanic/game/cdrom.h index 017914830c..12175f6450 100644 --- a/engines/titanic/game/cdrom.h +++ b/engines/titanic/game/cdrom.h @@ -36,7 +36,7 @@ class CCDROM : public CGameObject { bool MouseDragMoveMsg(CMouseDragMoveMsg *msg); bool ActMsg(CActMsg *msg); private: - Point _tempPos; + Point _centroid; public: CLASSDEF; CCDROM(); diff --git a/engines/titanic/npcs/bellbot.cpp b/engines/titanic/npcs/bellbot.cpp index 378112039b..36c57fe467 100644 --- a/engines/titanic/npcs/bellbot.cpp +++ b/engines/titanic/npcs/bellbot.cpp @@ -135,7 +135,7 @@ bool CBellBot::MovieEndMsg(CMovieEndMsg *msg) { } bool CBellBot::Use(CUse *msg) { - dynamic_cast<CCarry *>(msg->_item)->_string1 = "Bellbot"; + dynamic_cast<CCarry *>(msg->_item)->_npcUse = "Bellbot"; return true; } |