aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2016-12-18 14:32:52 -0500
committerPaul Gilbert2016-12-18 14:32:52 -0500
commita222fe152928fbcda5b8fffe152553fa4a0a6c15 (patch)
tree8e224c14fbf8f1c7f01bc802a4526fa7f4b427e7
parentac35e6138b67f2712a418370bec6652850ef67c1 (diff)
downloadscummvm-rg350-a222fe152928fbcda5b8fffe152553fa4a0a6c15.tar.gz
scummvm-rg350-a222fe152928fbcda5b8fffe152553fa4a0a6c15.tar.bz2
scummvm-rg350-a222fe152928fbcda5b8fffe152553fa4a0a6c15.zip
TITANIC: Renaming of lift fields
-rw-r--r--engines/titanic/carry/carry.cpp2
-rw-r--r--engines/titanic/carry/eye.cpp4
-rw-r--r--engines/titanic/carry/liftbot_head.cpp4
-rw-r--r--engines/titanic/game/get_lift_eye2.cpp2
-rw-r--r--engines/titanic/game/transport/lift.cpp32
-rw-r--r--engines/titanic/game/transport/lift.h4
-rw-r--r--engines/titanic/game/transport/lift_indicator.cpp2
7 files changed, 25 insertions, 25 deletions
diff --git a/engines/titanic/carry/carry.cpp b/engines/titanic/carry/carry.cpp
index 4f8df11260..670c3780d9 100644
--- a/engines/titanic/carry/carry.cpp
+++ b/engines/titanic/carry/carry.cpp
@@ -123,7 +123,7 @@ bool CCarry::MouseDragMoveMsg(CMouseDragMoveMsg *msg) {
}
bool CCarry::MouseDragEndMsg(CMouseDragEndMsg *msg) {
- debugC(ERROR_BASIC, kDebugScripts, "MosueDragEndMsg");
+ debugC(ERROR_BASIC, kDebugScripts, "MouseDragEndMsg");
showMouse();
if (msg->_dropTarget) {
diff --git a/engines/titanic/carry/eye.cpp b/engines/titanic/carry/eye.cpp
index 20e4ef3eac..fc480b8ec0 100644
--- a/engines/titanic/carry/eye.cpp
+++ b/engines/titanic/carry/eye.cpp
@@ -63,7 +63,7 @@ bool CEye::UseWithOtherMsg(CUseWithOtherMsg *msg) {
headMsg.execute(isEquals("Eye1") ? "Eye1Slot" : "Eye2Slot");
} else if (msg->_other->isEquals("LiftbotWithoutHead")) {
CPetControl *pet = getPetControl();
- if (!CLift::_v1 && pet->getRoomsElevatorNum() == 4) {
+ if (!CLift::_hasHead && pet->getRoomsElevatorNum() == 4) {
_eyeFlag = true;
setPosition(_origPos);
setVisible(false);
@@ -84,7 +84,7 @@ bool CEye::UseWithCharMsg(CUseWithCharMsg *msg) {
CLift *lift = dynamic_cast<CLift *>(msg->_character);
if (lift && lift->getName() == "Well") {
CPetControl *pet = getPetControl();
- if (!CLift::_v1 && pet->getRoomsElevatorNum() == 4) {
+ if (!CLift::_hasHead && pet->getRoomsElevatorNum() == 4) {
_eyeFlag = true;
setPosition(_origPos);
setVisible(false);
diff --git a/engines/titanic/carry/liftbot_head.cpp b/engines/titanic/carry/liftbot_head.cpp
index 5f516fcf8c..227a06a7bc 100644
--- a/engines/titanic/carry/liftbot_head.cpp
+++ b/engines/titanic/carry/liftbot_head.cpp
@@ -50,7 +50,7 @@ void CLiftbotHead::load(SimpleFile *file) {
bool CLiftbotHead::UseWithOtherMsg(CUseWithOtherMsg *msg) {
if (msg->_other->getName() == "LiftbotWithoutHead") {
CPetControl *pet = getPetControl();
- if (CLift::_v1 == 1 && pet->getRoomsElevatorNum() == 4) {
+ if (!CLift::_hasHead && pet->getRoomsElevatorNum() == 4) {
_flag = true;
CActMsg actMsg("AddRightHead");
actMsg.execute("FaultyLiftbot");
@@ -67,7 +67,7 @@ bool CLiftbotHead::UseWithCharMsg(CUseWithCharMsg *msg) {
CLift *lift = dynamic_cast<CLift *>(msg->_character);
if (lift) {
CPetControl *pet = getPetControl();
- if (lift->isEquals("Well") && !CLift::_v1 && pet->getRoomsElevatorNum() == 4) {
+ if (lift->isEquals("Well") && !CLift::_hasHead && pet->getRoomsElevatorNum() == 4) {
_flag = true;
CActMsg actMsg("AddRightHead");
actMsg.execute(lift);
diff --git a/engines/titanic/game/get_lift_eye2.cpp b/engines/titanic/game/get_lift_eye2.cpp
index 914f306f0e..f9ff0af8a6 100644
--- a/engines/titanic/game/get_lift_eye2.cpp
+++ b/engines/titanic/game/get_lift_eye2.cpp
@@ -64,7 +64,7 @@ bool CGetLiftEye2::ActMsg(CActMsg *msg) {
bool CGetLiftEye2::EnterRoomMsg(CEnterRoomMsg *msg) {
CPetControl *pet = getPetControl();
- if (pet->getRoomsElevatorNum() == 4 && CLift::_v1 == 1 && !CLift::_v6) {
+ if (pet->getRoomsElevatorNum() == 4 && CLift::_hasHead && !CLift::_hasCorrectHead) {
_cursorId = CURSOR_HAND;
setVisible(true);
} else {
diff --git a/engines/titanic/game/transport/lift.cpp b/engines/titanic/game/transport/lift.cpp
index cb5bcf92a0..091631a20c 100644
--- a/engines/titanic/game/transport/lift.cpp
+++ b/engines/titanic/game/transport/lift.cpp
@@ -35,43 +35,43 @@ BEGIN_MESSAGE_MAP(CLift, CTransport)
ON_MESSAGE(ActMsg)
END_MESSAGE_MAP()
-int CLift::_v1;
+bool CLift::_hasHead;
+bool CLift::_hasCorrectHead;
int CLift::_elevator1Floor;
int CLift::_elevator2Floor;
int CLift::_elevator3Floor;
int CLift::_elevator4Floor;
-int CLift::_v6;
void CLift::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
- file->writeNumberLine(_v1, indent);
+ file->writeNumberLine(_hasHead, indent);
file->writeNumberLine(_elevator1Floor, indent);
file->writeNumberLine(_elevator2Floor, indent);
file->writeNumberLine(_elevator3Floor, indent);
file->writeNumberLine(_elevator4Floor, indent);
file->writeNumberLine(_liftNum, indent);
- file->writeNumberLine(_v6, indent);
+ file->writeNumberLine(_hasCorrectHead, indent);
CTransport::save(file, indent);
}
void CLift::load(SimpleFile *file) {
file->readNumber();
- _v1 = file->readNumber();
+ _hasHead = file->readNumber();
_elevator1Floor = file->readNumber();
_elevator2Floor = file->readNumber();
_elevator3Floor = file->readNumber();
_elevator4Floor = file->readNumber();
_liftNum = file->readNumber();
- _v6 = file->readNumber();
+ _hasCorrectHead = file->readNumber();
CTransport::load(file);
}
bool CLift::StatusChangeMsg(CStatusChangeMsg *msg) {
CPetControl *pet = getPetControl();
- if ((!_v1 && pet->getRoomsElevatorNum() == 4) ||
- (!_v6 && pet->getRoomsElevatorNum() == 4))
+ if ((!_hasHead && pet->getRoomsElevatorNum() == 4) ||
+ (!_hasCorrectHead && pet->getRoomsElevatorNum() == 4))
return true;
int oldFloorNum = msg->_oldStatus;
@@ -245,7 +245,7 @@ bool CLift::EnterRoomMsg(CEnterRoomMsg *msg) {
loadSound("z#519.wav");
loadSound("z#518.wav");
- if (elevNum == 4 && _v1 == 1 && !_v6) {
+ if (elevNum == 4 && _hasHead && !_hasCorrectHead) {
CVisibleMsg visibleMsg;
visibleMsg.execute("GetLiftEye");
}
@@ -272,7 +272,7 @@ bool CLift::LeaveRoomMsg(CLeaveRoomMsg *msg) {
stopGlobalSound(true, -1);
CPetControl *pet = getPetControl();
- if (pet->getRoomsElevatorNum() == 4 && _v1 == 1 && !_v6) {
+ if (pet->getRoomsElevatorNum() == 4 && _hasHead && !_hasCorrectHead) {
CVisibleMsg visibleMsg(false);
visibleMsg.execute("Eye2");
}
@@ -282,24 +282,24 @@ bool CLift::LeaveRoomMsg(CLeaveRoomMsg *msg) {
bool CLift::ActMsg(CActMsg *msg) {
if (msg->_action == "LoseHead") {
- _v1 = 0;
- _v6 = 0;
+ _hasHead = false;
+ _hasCorrectHead = false;
CActMsg actMsg1("Lift.Node 2.N");
actMsg1.execute("RPanInLiftW");
CActMsg actMsg2("Lift.Node 2.S");
actMsg2.execute("LPanInLiftW");
} else if (msg->_action == "AddWrongHead") {
- _v1 = 1;
- _v6 = 0;
+ _hasHead = true;
+ _hasCorrectHead = false;
CActMsg actMsg1("Lift.Node 1.N");
actMsg1.execute("RPanInLiftW");
CActMsg actMsg2("Lift.Node 1.S");
actMsg2.execute("LPanInLiftW");
} else if (msg->_action == "AddRightHead") {
- _v1 = 1;
- _v6 = 1;
+ _hasHead = true;
+ _hasCorrectHead = true;
petSetRooms1D4(0);
CActMsg actMsg1("Lift.Node 1.N");
diff --git a/engines/titanic/game/transport/lift.h b/engines/titanic/game/transport/lift.h
index c69f7a02e6..3f2fca6c7e 100644
--- a/engines/titanic/game/transport/lift.h
+++ b/engines/titanic/game/transport/lift.h
@@ -37,12 +37,12 @@ class CLift : public CTransport {
bool LeaveRoomMsg(CLeaveRoomMsg *msg);
bool ActMsg(CActMsg *msg);
public:
- static int _v1;
+ static bool _hasHead;
+ static bool _hasCorrectHead;
static int _elevator1Floor;
static int _elevator2Floor;
static int _elevator3Floor;
static int _elevator4Floor;
- static int _v6;
int _liftNum;
public:
diff --git a/engines/titanic/game/transport/lift_indicator.cpp b/engines/titanic/game/transport/lift_indicator.cpp
index df0ff397da..563e888b3c 100644
--- a/engines/titanic/game/transport/lift_indicator.cpp
+++ b/engines/titanic/game/transport/lift_indicator.cpp
@@ -151,7 +151,7 @@ bool CLiftindicator::PETActivateMsg(CPETActivateMsg *msg) {
} else {
_endFrame = pet->getRoomsFloorNum();
- if (petGetRoomsWellEntry() == 4 && !CLift::_v6
+ if (petGetRoomsWellEntry() == 4 && !CLift::_hasCorrectHead
&& pet->getRoomsFloorNum() != CLift::_elevator4Floor) {
petDisplayMessage(1, ELEVATOR_NON_FUNCTIONAL);
} else {