aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic
diff options
context:
space:
mode:
authorPaul Gilbert2016-11-12 22:47:43 -0500
committerPaul Gilbert2016-11-12 22:47:43 -0500
commit931e3f312a626cc916f1717a59c05e9d1ac5b972 (patch)
treebcfda5660dfd3db1d72c962ee7e6a52f4c1042c8 /engines/titanic
parent68132bd678f1191757ef817b02d3063b072ca496 (diff)
downloadscummvm-rg350-931e3f312a626cc916f1717a59c05e9d1ac5b972.tar.gz
scummvm-rg350-931e3f312a626cc916f1717a59c05e9d1ac5b972.tar.bz2
scummvm-rg350-931e3f312a626cc916f1717a59c05e9d1ac5b972.zip
TITANIC: Lots more SGT field renamings
Diffstat (limited to 'engines/titanic')
-rw-r--r--engines/titanic/game/sgt/armchair.cpp12
-rw-r--r--engines/titanic/game/sgt/basin.cpp12
-rw-r--r--engines/titanic/game/sgt/bedfoot.cpp50
-rw-r--r--engines/titanic/game/sgt/bedhead.cpp42
-rw-r--r--engines/titanic/game/sgt/chest_of_drawers.cpp10
-rw-r--r--engines/titanic/game/sgt/desk.cpp14
-rw-r--r--engines/titanic/game/sgt/deskchair.cpp12
-rw-r--r--engines/titanic/game/sgt/drawer.cpp12
-rw-r--r--engines/titanic/game/sgt/sgt_nav.cpp20
-rw-r--r--engines/titanic/game/sgt/sgt_state_room.cpp101
-rw-r--r--engines/titanic/game/sgt/sgt_state_room.h36
-rw-r--r--engines/titanic/game/sgt/sgt_tv.cpp10
-rw-r--r--engines/titanic/game/sgt/toilet.cpp14
-rw-r--r--engines/titanic/game/sgt/vase.cpp14
-rw-r--r--engines/titanic/game/sgt/washstand.cpp10
15 files changed, 185 insertions, 184 deletions
diff --git a/engines/titanic/game/sgt/armchair.cpp b/engines/titanic/game/sgt/armchair.cpp
index 8bd5a23654..681b1ae61d 100644
--- a/engines/titanic/game/sgt/armchair.cpp
+++ b/engines/titanic/game/sgt/armchair.cpp
@@ -41,11 +41,11 @@ void CArmchair::load(SimpleFile *file) {
}
bool CArmchair::TurnOn(CTurnOn *msg) {
- if (_statics->_v8 == "Closed" && _statics->_v12 == "Closed") {
+ if (_statics->_armchair == "Closed" && _statics->_toilet == "Closed") {
CVisibleMsg visibleMsg(false);
visibleMsg.execute("Deskchair");
- if (_statics->_v9 == "Open") {
+ if (_statics->_deskchair == "Open") {
CActMsg actMsg("Squash");
actMsg.execute("Deskchair");
_startFrame = 22;
@@ -57,7 +57,7 @@ bool CArmchair::TurnOn(CTurnOn *msg) {
playMovie(_startFrame, _endFrame, MOVIE_GAMESTATE);
playSound("b#0.wav");
- _statics->_v8 = "Open";
+ _statics->_armchair = "Open";
_isClosed = false;
}
@@ -65,8 +65,8 @@ bool CArmchair::TurnOn(CTurnOn *msg) {
}
bool CArmchair::TurnOff(CTurnOff *msg) {
- if (_statics->_v8 == "Open") {
- _statics->_v8 = "Closed";
+ if (_statics->_armchair == "Open") {
+ _statics->_armchair = "Closed";
_startFrame = 11;
_endFrame = 21;
_isClosed = true;
@@ -78,7 +78,7 @@ bool CArmchair::TurnOff(CTurnOff *msg) {
}
bool CArmchair::MovieEndMsg(CMovieEndMsg *msg) {
- if (_statics->_v8 == "Closed")
+ if (_statics->_armchair == "Closed")
loadFrame(0);
return true;
diff --git a/engines/titanic/game/sgt/basin.cpp b/engines/titanic/game/sgt/basin.cpp
index a3ad505d01..ce34a49250 100644
--- a/engines/titanic/game/sgt/basin.cpp
+++ b/engines/titanic/game/sgt/basin.cpp
@@ -41,10 +41,10 @@ void CBasin::load(SimpleFile *file) {
}
bool CBasin::TurnOn(CTurnOn *msg) {
- if (_statics->_v10 == "Open" && _statics->_v11 == "Closed"
- && _statics->_v2 == "Closed") {
+ if (_statics->_washstand == "Open" && _statics->_basin == "Closed"
+ && _statics->_bedfoot == "Closed") {
setVisible(true);
- _statics->_v11 = "Open";
+ _statics->_basin = "Open";
_isClosed = false;
_startFrame = 0;
_endFrame = 6;
@@ -56,8 +56,8 @@ bool CBasin::TurnOn(CTurnOn *msg) {
}
bool CBasin::TurnOff(CTurnOff *msg) {
- if (_statics->_v11 == "Open") {
- _statics->_v11 = "Closed";
+ if (_statics->_basin == "Open") {
+ _statics->_basin = "Closed";
_isClosed = true;
_startFrame = 8;
_endFrame = 14;
@@ -69,7 +69,7 @@ bool CBasin::TurnOff(CTurnOff *msg) {
}
bool CBasin::MovieEndMsg(CMovieEndMsg *msg) {
- if (_statics->_v11 == "Closed")
+ if (_statics->_basin == "Closed")
setVisible(false);
return true;
diff --git a/engines/titanic/game/sgt/bedfoot.cpp b/engines/titanic/game/sgt/bedfoot.cpp
index 124a7b5c30..391c88c8c8 100644
--- a/engines/titanic/game/sgt/bedfoot.cpp
+++ b/engines/titanic/game/sgt/bedfoot.cpp
@@ -40,88 +40,88 @@ void CBedfoot::load(SimpleFile *file) {
}
bool CBedfoot::TurnOn(CTurnOn *msg) {
- if (_statics->_v2 == "Closed" && _statics->_v11 == "Closed") {
+ if (_statics->_bedfoot == "Closed" && _statics->_basin == "Closed") {
_isClosed = false;
_startFrame = 0;
- if (_statics->_v10 == "Open") {
+ if (_statics->_washstand == "Open") {
_endFrame = 13;
- _statics->_v2 = "Open";
+ _statics->_bedfoot = "Open";
playSound("b#7.wav");
} else {
_endFrame = 17;
- _statics->_v2 = "NotOnWashstand";
+ _statics->_bedfoot = "NotOnWashstand";
playSound("b#4.wav");
}
playMovie(_startFrame, _endFrame, MOVIE_GAMESTATE);
- } else if (_statics->_v2 == "RestingUnderTV") {
+ } else if (_statics->_bedfoot == "RestingUnderTV") {
_isClosed = false;
_startFrame = 8;
- if (_statics->_v10 == "Open") {
- _statics->_v2 = "Open";
+ if (_statics->_washstand == "Open") {
+ _statics->_bedfoot = "Open";
playSound("189_436_bed down 1.wav");
} else {
- _statics->_v2 = "NotOnWashstand";
+ _statics->_bedfoot = "NotOnWashstand";
playSound("192_436_bed hits floor.wav");
}
playMovie(_startFrame, _endFrame, MOVIE_GAMESTATE);
}
- if (_statics->_v2 == "Open")
- _statics->_v1 = "Closed";
- else if (_statics->_v2 == "NotOnWashstand")
- _statics->_v1 = "ClosedWrong";
+ if (_statics->_bedfoot == "Open")
+ _statics->_bedhead = "Closed";
+ else if (_statics->_bedfoot == "NotOnWashstand")
+ _statics->_bedhead = "ClosedWrong";
return true;
}
bool CBedfoot::TurnOff(CTurnOff *msg) {
- if (_statics->_v1 == "Closed" || _statics->_v1 == "ClosedWrong") {
+ if (_statics->_bedhead == "Closed" || _statics->_bedhead == "ClosedWrong") {
setVisible(true);
CVisibleMsg visibleMsg(false);
visibleMsg.execute("Bedhead");
}
- if (_statics->_v2 == "Open" && _statics->_v1 == "Closed") {
+ if (_statics->_bedfoot == "Open" && _statics->_bedhead == "Closed") {
_isClosed = false;
_startFrame = 20;
- if (_statics->_v4 == "Closed") {
- _statics->_v2 = "Closed";
+ if (_statics->_tv == "Closed") {
+ _statics->_bedfoot = "Closed";
_endFrame = 30;
} else {
- _statics->_v2 = "RestingUnderTV";
+ _statics->_bedfoot = "RestingUnderTV";
_endFrame = 25;
}
playMovie(_startFrame, _endFrame, MOVIE_GAMESTATE);
playSound("b#7.wav");
- } else if (_statics->_v2 == "NotOnWashstand" && _statics->_v1 == "ClosedWrong") {
+ } else if (_statics->_bedfoot == "NotOnWashstand" && _statics->_bedhead == "ClosedWrong") {
_isClosed = false;
_startFrame = 17;
- if (_statics->_v4 == "Closed") {
- _statics->_v2 = "Closed";
+ if (_statics->_tv == "Closed") {
+ _statics->_bedfoot = "Closed";
_endFrame = 30;
} else {
- _statics->_v2 = "RestingUnderTV";
+ _statics->_bedfoot = "RestingUnderTV";
_endFrame = 25;
}
playMovie(_startFrame, _endFrame, MOVIE_GAMESTATE);
playSound("b#7.wav");
- } else if (_statics->_v2 == "RestingUTV" && _statics->_v4 == "Closed") {
- _statics->_v2 = "Closed";
+ } else if (_statics->_bedfoot == "RestingUTV" && _statics->_tv == "Closed") {
+ _statics->_bedfoot = "Closed";
_startFrame = 25;
_endFrame = 30;
playMovie(25, 30, MOVIE_GAMESTATE);
playSound("b#7.wav");
}
- if (_statics->_v2 == "Closed")
- _statics->_v1 = "Closed";
+ if (_statics->_bedfoot == "Closed")
+ _statics->_bedhead = "Closed";
return true;
}
diff --git a/engines/titanic/game/sgt/bedhead.cpp b/engines/titanic/game/sgt/bedhead.cpp
index 96614ed010..028e8de7f0 100644
--- a/engines/titanic/game/sgt/bedhead.cpp
+++ b/engines/titanic/game/sgt/bedhead.cpp
@@ -87,38 +87,38 @@ void CBedhead::load(SimpleFile *file) {
}
bool CBedhead::TurnOn(CTurnOn *msg) {
- if (_statics->_v2 == "Closed" || _statics->_v2 == "RestingUnderTV")
+ if (_statics->_bedfoot == "Closed" || _statics->_bedfoot == "RestingUnderTV")
return true;
const BedheadEntries *data = nullptr;
- if (_statics->_v1 == "Closed")
+ if (_statics->_bedhead == "Closed")
data = &_on._closed;
- else if (_statics->_v1 == "RestingTV")
+ else if (_statics->_bedhead == "RestingTV")
data = &_on._restingTV;
- else if (_statics->_v1 == "RestingUV")
+ else if (_statics->_bedhead == "RestingUV")
data = &_on._restingUV;
- else if (_statics->_v1 == "ClosedWrong")
+ else if (_statics->_bedhead == "ClosedWrong")
data = &_on._closedWrong;
else
return true;
for (uint idx = 0; idx < data->size(); ++idx) {
const BedheadEntry &entry = (*data)[idx];
- if ((entry._name1 == _statics->_v4 || entry._name1 == "Any")
- && (entry._name2 == _statics->_v3 || entry._name2 == "Any")
- && (entry._name3 == _statics->_v5 || entry._name3 == "Any")) {
+ if ((entry._name1 == _statics->_tv || entry._name1 == "Any")
+ && (entry._name2 == _statics->_vase || entry._name2 == "Any")
+ && (entry._name3 == _statics->_desk || entry._name3 == "Any")) {
CVisibleMsg visibleMsg(false);
visibleMsg.execute("Bedfoot");
setVisible(true);
- _statics->_v1 = entry._name4;
+ _statics->_bedhead = entry._name4;
playMovie(entry._startFrame, entry._endFrame, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
playSound("b#6.wav");
_isClosed = false;
}
}
- if (_statics->_v1 == "Open") {
+ if (_statics->_bedhead == "Open") {
playMovie(71, 78, 0);
playSound("196_436 bed inflate 2.wav");
}
@@ -127,37 +127,37 @@ bool CBedhead::TurnOn(CTurnOn *msg) {
}
bool CBedhead::TurnOff(CTurnOff *msg) {
- if (_statics->_v1 == "Open") {
+ if (_statics->_bedhead == "Open") {
playMovie(78, 85, 0);
playSound("191_436_bed inflate deflate.wav");
}
BedheadEntries *data = nullptr;
- if (_statics->_v1 == "Open")
+ if (_statics->_bedhead == "Open")
data = &_off._open;
- else if (_statics->_v1 == "RestingUTV")
+ else if (_statics->_bedhead == "RestingUTV")
data = &_off._restingUTV;
- else if (_statics->_v1 == "RestingV")
+ else if (_statics->_bedhead == "RestingV")
data = &_off._restingV;
- else if (_statics->_v1 == "RestingG")
+ else if (_statics->_bedhead == "RestingG")
data = &_off._restingG;
- else if (_statics->_v1 == "OpenWrong")
+ else if (_statics->_bedhead == "OpenWrong")
data = &_off._openWrong;
- else if (_statics->_v1 == "RestingDWrong")
+ else if (_statics->_bedhead == "RestingDWrong")
data = &_off._restingDWrong;
else
return true;
for (uint idx = 0; idx < data->size(); ++idx) {
const BedheadEntry &entry = (*data)[idx];
- if ((entry._name1 == _statics->_v4 || entry._name1 == "Any")
- && (entry._name2 == _statics->_v3 || entry._name2 == "Any")
- && (entry._name3 == _statics->_v5 || entry._name3 == "Any")) {
+ if ((entry._name1 == _statics->_tv || entry._name1 == "Any")
+ && (entry._name2 == _statics->_vase || entry._name2 == "Any")
+ && (entry._name3 == _statics->_desk || entry._name3 == "Any")) {
CVisibleMsg visibleMsg(false);
visibleMsg.execute("Bedfoot");
setVisible(true);
- _statics->_v1 = entry._name4;
+ _statics->_bedhead = entry._name4;
playMovie(entry._startFrame, entry._endFrame, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
playSound("193_436_bed fold up 1.wav");
_isClosed = false;
diff --git a/engines/titanic/game/sgt/chest_of_drawers.cpp b/engines/titanic/game/sgt/chest_of_drawers.cpp
index 153a358403..4f8b332c92 100644
--- a/engines/titanic/game/sgt/chest_of_drawers.cpp
+++ b/engines/titanic/game/sgt/chest_of_drawers.cpp
@@ -41,9 +41,9 @@ void CChestOfDrawers::load(SimpleFile *file) {
}
bool CChestOfDrawers::TurnOn(CTurnOn *msg) {
- if (_statics->_v6 == "Closed" && _statics->_v5 == "Open") {
+ if (_statics->_chestOfDrawers == "Closed" && _statics->_desk == "Open") {
_isClosed = false;
- _statics->_v6 = "Open";
+ _statics->_chestOfDrawers = "Open";
_startFrame = 1;
_endFrame = 14;
playSound("b#11.wav");
@@ -53,10 +53,10 @@ bool CChestOfDrawers::TurnOn(CTurnOn *msg) {
}
bool CChestOfDrawers::TurnOff(CTurnOff *msg) {
- if (_statics->_v6 == "Open" && _statics->_v5 == "Closed") {
+ if (_statics->_chestOfDrawers == "Open" && _statics->_desk == "Closed") {
CVisibleMsg visibleMsg;
visibleMsg.execute("Drawer");
- _statics->_v6 = "Closed";
+ _statics->_chestOfDrawers = "Closed";
_isClosed = true;
_startFrame = 14;
@@ -69,7 +69,7 @@ bool CChestOfDrawers::TurnOff(CTurnOff *msg) {
}
bool CChestOfDrawers::MovieEndMsg(CMovieEndMsg *msg) {
- if (_statics->_v6 == "Open") {
+ if (_statics->_chestOfDrawers == "Open") {
CVisibleMsg visibleMsg;
visibleMsg.execute("Drawer");
}
diff --git a/engines/titanic/game/sgt/desk.cpp b/engines/titanic/game/sgt/desk.cpp
index 941eecbb43..7f4c602d66 100644
--- a/engines/titanic/game/sgt/desk.cpp
+++ b/engines/titanic/game/sgt/desk.cpp
@@ -41,9 +41,9 @@ void CDesk::load(SimpleFile *file) {
}
bool CDesk::TurnOn(CTurnOn *msg) {
- if (_statics->_v5 == "Closed" && _statics->_v1 != "RestingG"
- && _statics->_v1 != "OpenWrong") {
- _statics->_v5 = "Open";
+ if (_statics->_desk == "Closed" && _statics->_bedhead != "RestingG"
+ && _statics->_bedhead != "OpenWrong") {
+ _statics->_desk = "Open";
_isClosed = false;
_startFrame = 1;
_endFrame = 26;
@@ -55,12 +55,12 @@ bool CDesk::TurnOn(CTurnOn *msg) {
}
bool CDesk::TurnOff(CTurnOff *msg) {
- if (_statics->_v5 == "Open" && _statics->_v6 == "Closed"
- && _statics->_v1 == "Open") {
+ if (_statics->_desk == "Open" && _statics->_chestOfDrawers == "Closed"
+ && _statics->_bedhead == "Open") {
CVisibleMsg visibleMsg(false);
visibleMsg.execute("ChestOfDrawers");
- _statics->_v5 = "Closed";
+ _statics->_desk = "Closed";
_isClosed = true;
_startFrame = 26;
_endFrame = 51;
@@ -72,7 +72,7 @@ bool CDesk::TurnOff(CTurnOff *msg) {
}
bool CDesk::MovieEndMsg(CMovieEndMsg *msg) {
- if (_statics->_v5 == "Open") {
+ if (_statics->_desk == "Open") {
CVisibleMsg visibleMsg(true);
visibleMsg.execute("ChestOfDrawers");
}
diff --git a/engines/titanic/game/sgt/deskchair.cpp b/engines/titanic/game/sgt/deskchair.cpp
index 800c3556fd..2b25f57d03 100644
--- a/engines/titanic/game/sgt/deskchair.cpp
+++ b/engines/titanic/game/sgt/deskchair.cpp
@@ -42,9 +42,9 @@ void CDeskchair::load(SimpleFile *file) {
}
bool CDeskchair::TurnOn(CTurnOn *msg) {
- if (_statics->_v8 == "Closed" && _statics->_v9 == "Closed") {
+ if (_statics->_armchair == "Closed" && _statics->_deskchair == "Closed") {
setVisible(true);
- _statics->_v9 = "Open";
+ _statics->_deskchair = "Open";
_isClosed = false;
_startFrame = 0;
_endFrame = 16;
@@ -56,8 +56,8 @@ bool CDeskchair::TurnOn(CTurnOn *msg) {
}
bool CDeskchair::TurnOff(CTurnOff *msg) {
- if (_statics->_v9 == "Open") {
- _statics->_v9 = "Closed";
+ if (_statics->_deskchair == "Open") {
+ _statics->_deskchair = "Closed";
_isClosed = true;
_startFrame = 16;
_endFrame = 32;
@@ -71,7 +71,7 @@ bool CDeskchair::TurnOff(CTurnOff *msg) {
bool CDeskchair::ActMsg(CActMsg *msg) {
if (msg->_action == "Smash") {
setVisible(false);
- _statics->_v9 = "Closed";
+ _statics->_deskchair = "Closed";
_isClosed = true;
loadFrame(0);
return true;
@@ -81,7 +81,7 @@ bool CDeskchair::ActMsg(CActMsg *msg) {
}
bool CDeskchair::MovieEndMsg(CMovieEndMsg *msg) {
- if (_statics->_v9 == "Closed")
+ if (_statics->_deskchair == "Closed")
setVisible(false);
return true;
}
diff --git a/engines/titanic/game/sgt/drawer.cpp b/engines/titanic/game/sgt/drawer.cpp
index 3ce92a811e..68752b3d2f 100644
--- a/engines/titanic/game/sgt/drawer.cpp
+++ b/engines/titanic/game/sgt/drawer.cpp
@@ -46,13 +46,13 @@ void CDrawer::load(SimpleFile *file) {
}
bool CDrawer::TurnOn(CTurnOn *msg) {
- if (_statics->_v7 == "Closed" && _statics->_v6 == "Open") {
- _statics->_v7 = "Open";
+ if (_statics->_drawer == "Closed" && _statics->_chestOfDrawers == "Open") {
+ _statics->_drawer = "Open";
_isClosed = false;
_startFrame = 50;
_endFrame = 75;
setVisible(true);
- _statics->_v7 = "Open";
+ _statics->_drawer = "Open";
playMovie(_startFrame, _endFrame, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
playSound("b#10.wav");
}
@@ -61,8 +61,8 @@ bool CDrawer::TurnOn(CTurnOn *msg) {
}
bool CDrawer::TurnOff(CTurnOff *msg) {
- if (_statics->_v7 == "Open") {
- _statics->_v7 = "Closed";
+ if (_statics->_drawer == "Open") {
+ _statics->_drawer = "Closed";
_startFrame = 75;
_endFrame = 100;
_isClosed = true;
@@ -74,7 +74,7 @@ bool CDrawer::TurnOff(CTurnOff *msg) {
}
bool CDrawer::MovieEndMsg(CMovieEndMsg *msg) {
- if (_statics->_v7 == "Closed")
+ if (_statics->_drawer == "Closed")
setVisible(false);
return true;
diff --git a/engines/titanic/game/sgt/sgt_nav.cpp b/engines/titanic/game/sgt/sgt_nav.cpp
index 0b93e5fbe5..3be92b4828 100644
--- a/engines/titanic/game/sgt/sgt_nav.cpp
+++ b/engines/titanic/game/sgt/sgt_nav.cpp
@@ -43,24 +43,24 @@ bool SGTNav::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
CTurnOn onMsg;
CTurnOff offMsg;
- if (_statics->_v6 == "Open" && _statics->_v1 == "Open") {
- if (_statics->_v3 == "Open")
+ if (_statics->_chestOfDrawers == "Open" && _statics->_bedhead == "Open") {
+ if (_statics->_vase == "Open")
offMsg.execute("Vase");
- if (_statics->_v4 == "Closed")
+ if (_statics->_tv == "Closed")
onMsg.execute("SGTTV");
- if (_statics->_v7 == "Open")
+ if (_statics->_drawer == "Open")
offMsg.execute("Drawer");
- if (_statics->_v8 == "Open")
+ if (_statics->_armchair == "Open")
offMsg.execute("Armchair");
- if (_statics->_v9 == "Open")
+ if (_statics->_deskchair == "Open")
offMsg.execute("Deskchair");
- if (_statics->_v12 == "Open")
+ if (_statics->_toilet == "Open")
offMsg.execute("Toilet");
changeView("SGTState.Node 2.E");
- } else if (_statics->_v1 != "Open") {
+ } else if (_statics->_bedhead != "Open") {
petDisplayMessage(1, YOUR_STATEROOM);
- } else if (_statics->_v6 == "Closed") {
+ } else if (_statics->_chestOfDrawers == "Closed") {
petDisplayMessage(1, BED_NOT_SUPPORT_YOUR_WEIGHT);
}
@@ -68,7 +68,7 @@ bool SGTNav::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
}
bool SGTNav::MouseMoveMsg(CMouseMoveMsg *msg) {
- if (_statics->_v6 == "Open" && _statics->_v1 == "Open")
+ if (_statics->_chestOfDrawers == "Open" && _statics->_bedhead == "Open")
_cursorId = CURSOR_MOVE_FORWARD;
else
_cursorId = CURSOR_ARROW;
diff --git a/engines/titanic/game/sgt/sgt_state_room.cpp b/engines/titanic/game/sgt/sgt_state_room.cpp
index 3408ecd880..3ddfcfef5f 100644
--- a/engines/titanic/game/sgt/sgt_state_room.cpp
+++ b/engines/titanic/game/sgt/sgt_state_room.cpp
@@ -36,7 +36,7 @@ CSGTStateRoomStatics *CSGTStateRoom::_statics;
void CSGTStateRoom::init() {
_statics = new CSGTStateRoomStatics();
- _statics->_v1 = "Closed";
+ _statics->_bedhead = "Closed";
}
void CSGTStateRoom::deinit() {
@@ -44,57 +44,57 @@ void CSGTStateRoom::deinit() {
}
CSGTStateRoom::CSGTStateRoom() : CBackground(), _isClosed(1),
- _fieldE4(1), _fieldE8(0), _fieldEC(1), _fieldF0(1) {
+ _displayFlag(true), _savedFrame(0), _savedIsClosed(true), _savedVisible(true) {
}
void CSGTStateRoom::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
- file->writeQuotedLine(_statics->_v1, indent);
- file->writeQuotedLine(_statics->_v2, indent);
- file->writeQuotedLine(_statics->_v3, indent);
- file->writeQuotedLine(_statics->_v4, indent);
- file->writeQuotedLine(_statics->_v5, indent);
- file->writeQuotedLine(_statics->_v6, indent);
- file->writeQuotedLine(_statics->_v7, indent);
- file->writeQuotedLine(_statics->_v8, indent);
- file->writeQuotedLine(_statics->_v9, indent);
- file->writeQuotedLine(_statics->_v10, indent);
- file->writeQuotedLine(_statics->_v11, indent);
- file->writeQuotedLine(_statics->_v12, indent);
+ file->writeQuotedLine(_statics->_bedhead, indent);
+ file->writeQuotedLine(_statics->_bedfoot, indent);
+ file->writeQuotedLine(_statics->_vase, indent);
+ file->writeQuotedLine(_statics->_tv, indent);
+ file->writeQuotedLine(_statics->_desk, indent);
+ file->writeQuotedLine(_statics->_chestOfDrawers, indent);
+ file->writeQuotedLine(_statics->_drawer, indent);
+ file->writeQuotedLine(_statics->_armchair, indent);
+ file->writeQuotedLine(_statics->_deskchair, indent);
+ file->writeQuotedLine(_statics->_washstand, indent);
+ file->writeQuotedLine(_statics->_basin, indent);
+ file->writeQuotedLine(_statics->_toilet, indent);
file->writeNumberLine(_isClosed, indent);
- file->writeNumberLine(_fieldE4, indent);
- file->writeNumberLine(_statics->_v13, indent);
- file->writeNumberLine(_statics->_v14, indent);
- file->writeNumberLine(_fieldE8, indent);
- file->writeNumberLine(_fieldEC, indent);
- file->writeNumberLine(_fieldF0, indent);
+ file->writeNumberLine(_displayFlag, indent);
+ file->writeNumberLine(_statics->_announcementFlag, indent);
+ file->writeNumberLine(_statics->_roomFlags, indent);
+ file->writeNumberLine(_savedFrame, indent);
+ file->writeNumberLine(_savedIsClosed, indent);
+ file->writeNumberLine(_savedVisible, indent);
CBackground::save(file, indent);
}
void CSGTStateRoom::load(SimpleFile *file) {
file->readNumber();
- _statics->_v1 = file->readString();
- _statics->_v2 = file->readString();
- _statics->_v3 = file->readString();
- _statics->_v4 = file->readString();
- _statics->_v5 = file->readString();
- _statics->_v6 = file->readString();
- _statics->_v7 = file->readString();
- _statics->_v8 = file->readString();
- _statics->_v9 = file->readString();
- _statics->_v10 = file->readString();
- _statics->_v11 = file->readString();
- _statics->_v12 = file->readString();
+ _statics->_bedhead = file->readString();
+ _statics->_bedfoot = file->readString();
+ _statics->_vase = file->readString();
+ _statics->_tv = file->readString();
+ _statics->_desk = file->readString();
+ _statics->_chestOfDrawers = file->readString();
+ _statics->_drawer = file->readString();
+ _statics->_armchair = file->readString();
+ _statics->_deskchair = file->readString();
+ _statics->_washstand = file->readString();
+ _statics->_basin = file->readString();
+ _statics->_toilet = file->readString();
_isClosed = file->readNumber();
- _fieldE4 = file->readNumber();
- _statics->_v13 = file->readNumber();
- _statics->_v14 = file->readNumber();
- _fieldE8 = file->readNumber();
- _fieldEC = file->readNumber();
- _fieldF0 = file->readNumber();
+ _displayFlag = file->readNumber();
+ _statics->_announcementFlag = file->readNumber();
+ _statics->_roomFlags = file->readNumber();
+ _savedFrame = file->readNumber();
+ _savedIsClosed = file->readNumber();
+ _savedVisible = file->readNumber();
CBackground::load(file);
}
@@ -128,28 +128,29 @@ bool CSGTStateRoom::EnterRoomMsg(CEnterRoomMsg *msg) {
uint assignedRoom = pet->getAssignedRoomFlags();
if (roomFlags == assignedRoom) {
- loadFrame(_fieldE8);
- _isClosed = _fieldEC;
- setVisible(_fieldF0);
+ loadFrame(_savedFrame);
+ _isClosed = _savedIsClosed;
+ setVisible(_savedVisible);
- if (isEquals("Desk") && _statics->_v5 == "Closed")
+ if (isEquals("Desk") && _statics->_desk == "Closed")
loadFrame(1);
}
if (isEquals("Drawer")) {
petSetArea(PET_REMOTE);
if (roomFlags == assignedRoom && getPassengerClass() == 3
- && _statics->_v13) {
+ && _statics->_announcementFlag) {
+ // Congratulations, you may have won an upgrade
playSound("b#21.wav");
- _statics->_v13 = 0;
+ _statics->_announcementFlag = false;
}
- _statics->_v7 = "Closed";
+ _statics->_drawer = "Closed";
setVisible(false);
_isClosed = true;
} else if (roomFlags != assignedRoom) {
loadFrame(0);
- if (_fieldE4) {
+ if (_displayFlag) {
setVisible(true);
if (isEquals("Desk"))
loadFrame(1);
@@ -167,12 +168,12 @@ bool CSGTStateRoom::LeaveRoomMsg(CLeaveRoomMsg *msg) {
uint assignedRoom = pet->getAssignedRoomFlags();
if (roomFlags == assignedRoom) {
- _fieldE8 = getMovieFrame();
- _fieldEC = _isClosed;
- _fieldF0 = _visible;
+ _savedFrame = getMovieFrame();
+ _savedIsClosed = _isClosed;
+ _savedVisible = _visible;
}
- _statics->_v14 = roomFlags;
+ _statics->_roomFlags = roomFlags;
return true;
}
diff --git a/engines/titanic/game/sgt/sgt_state_room.h b/engines/titanic/game/sgt/sgt_state_room.h
index 6703ef6625..bb900df980 100644
--- a/engines/titanic/game/sgt/sgt_state_room.h
+++ b/engines/titanic/game/sgt/sgt_state_room.h
@@ -29,20 +29,20 @@
namespace Titanic {
struct CSGTStateRoomStatics {
- CString _v1;
- CString _v2;
- CString _v3;
- CString _v4;
- CString _v5;
- CString _v6;
- CString _v7;
- CString _v8;
- CString _v9;
- CString _v10;
- CString _v11;
- CString _v12;
- int _v13;
- int _v14;
+ CString _bedhead;
+ CString _bedfoot;
+ CString _vase;
+ CString _tv;
+ CString _desk;
+ CString _chestOfDrawers;
+ CString _drawer;
+ CString _armchair;
+ CString _deskchair;
+ CString _washstand;
+ CString _basin;
+ CString _toilet;
+ bool _announcementFlag;
+ uint _roomFlags;
};
class CSGTStateRoom : public CBackground {
@@ -55,10 +55,10 @@ protected:
static CSGTStateRoomStatics *_statics;
protected:
bool _isClosed;
- int _fieldE4;
- int _fieldE8;
- bool _fieldEC;
- bool _fieldF0;
+ bool _displayFlag;
+ int _savedFrame;
+ bool _savedIsClosed;
+ bool _savedVisible;
public:
CLASSDEF;
CSGTStateRoom();
diff --git a/engines/titanic/game/sgt/sgt_tv.cpp b/engines/titanic/game/sgt/sgt_tv.cpp
index 173037306d..d2ed0da18b 100644
--- a/engines/titanic/game/sgt/sgt_tv.cpp
+++ b/engines/titanic/game/sgt/sgt_tv.cpp
@@ -41,8 +41,8 @@ void CSGTTV::load(SimpleFile *file) {
}
bool CSGTTV::TurnOff(CTurnOff *msg) {
- if (CSGTStateRoom::_statics->_v4 == "Open") {
- CSGTStateRoom::_statics->_v4 = "Closed";
+ if (CSGTStateRoom::_statics->_tv == "Open") {
+ CSGTStateRoom::_statics->_tv = "Closed";
_isClosed = true;
_startFrame = 6;
_endFrame = 12;
@@ -53,9 +53,9 @@ bool CSGTTV::TurnOff(CTurnOff *msg) {
}
bool CSGTTV::TurnOn(CTurnOn *msg) {
- if (CSGTStateRoom::_statics->_v4 == "Closed" &&
- CSGTStateRoom::_statics->_v2 == "Closed") {
- CSGTStateRoom::_statics->_v4 = "Open";
+ if (CSGTStateRoom::_statics->_tv == "Closed" &&
+ CSGTStateRoom::_statics->_bedfoot == "Closed") {
+ CSGTStateRoom::_statics->_tv = "Open";
setVisible(true);
_isClosed = false;
_startFrame = 1;
diff --git a/engines/titanic/game/sgt/toilet.cpp b/engines/titanic/game/sgt/toilet.cpp
index d323202a44..544cdda0c6 100644
--- a/engines/titanic/game/sgt/toilet.cpp
+++ b/engines/titanic/game/sgt/toilet.cpp
@@ -41,11 +41,11 @@ void CToilet::load(SimpleFile *file) {
}
bool CToilet::TurnOn(CTurnOn *msg) {
- if (CSGTStateRoom::_statics->_v12 == "Closed"
- && CSGTStateRoom::_statics->_v10 == "Open"
- && CSGTStateRoom::_statics->_v8 == "Closed") {
+ if (CSGTStateRoom::_statics->_toilet == "Closed"
+ && CSGTStateRoom::_statics->_washstand == "Open"
+ && CSGTStateRoom::_statics->_armchair == "Closed") {
setVisible(true);
- CSGTStateRoom::_statics->_v12 = "Open";
+ CSGTStateRoom::_statics->_toilet = "Open";
_isClosed = false;
_startFrame = 0;
@@ -58,8 +58,8 @@ bool CToilet::TurnOn(CTurnOn *msg) {
}
bool CToilet::TurnOff(CTurnOff *msg) {
- if (CSGTStateRoom::_statics->_v12 == "Open") {
- CSGTStateRoom::_statics->_v12 = "Closed";
+ if (CSGTStateRoom::_statics->_toilet == "Open") {
+ CSGTStateRoom::_statics->_toilet = "Closed";
_isClosed = true;
_startFrame = 11;
@@ -72,7 +72,7 @@ bool CToilet::TurnOff(CTurnOff *msg) {
}
bool CToilet::MovieEndMsg(CMovieEndMsg *msg) {
- if (CSGTStateRoom::_statics->_v12 == "Closed")
+ if (CSGTStateRoom::_statics->_toilet == "Closed")
setVisible(false);
return true;
diff --git a/engines/titanic/game/sgt/vase.cpp b/engines/titanic/game/sgt/vase.cpp
index e978828274..f9ee292be2 100644
--- a/engines/titanic/game/sgt/vase.cpp
+++ b/engines/titanic/game/sgt/vase.cpp
@@ -41,8 +41,8 @@ void CVase::load(SimpleFile *file) {
}
bool CVase::TurnOn(CTurnOn *msg) {
- if (CSGTStateRoom::_statics->_v3 == "Closed") {
- CSGTStateRoom::_statics->_v3 = "Open";
+ if (CSGTStateRoom::_statics->_vase == "Closed") {
+ CSGTStateRoom::_statics->_vase = "Open";
setVisible(true);
_isClosed = false;
_startFrame = 1;
@@ -54,10 +54,10 @@ bool CVase::TurnOn(CTurnOn *msg) {
}
bool CVase::TurnOff(CTurnOff *msg) {
- if (CSGTStateRoom::_statics->_v3 == "Open"
- && CSGTStateRoom::_statics->_v1 != "RestingV"
- && CSGTStateRoom::_statics->_v1 != "RestingUV") {
- CSGTStateRoom::_statics->_v3 = "Closed";
+ if (CSGTStateRoom::_statics->_vase == "Open"
+ && CSGTStateRoom::_statics->_bedhead != "RestingV"
+ && CSGTStateRoom::_statics->_bedhead != "RestingUV") {
+ CSGTStateRoom::_statics->_vase = "Closed";
_isClosed = true;
_startFrame = 12;
_endFrame = 25;
@@ -68,7 +68,7 @@ bool CVase::TurnOff(CTurnOff *msg) {
}
bool CVase::MovieEndMsg(CMovieEndMsg *msg) {
- if (CSGTStateRoom::_statics->_v3 == "Closed")
+ if (CSGTStateRoom::_statics->_vase == "Closed")
setVisible(false);
return true;
diff --git a/engines/titanic/game/sgt/washstand.cpp b/engines/titanic/game/sgt/washstand.cpp
index 50187d2226..16c78cdb90 100644
--- a/engines/titanic/game/sgt/washstand.cpp
+++ b/engines/titanic/game/sgt/washstand.cpp
@@ -41,9 +41,9 @@ void CWashstand::load(SimpleFile *file) {
}
bool CWashstand::TurnOn(CTurnOn *msg) {
- if (_statics->_v10 == "Closed" && _statics->_v2 == "NotOnWashstand") {
+ if (_statics->_washstand == "Closed" && _statics->_bedfoot == "NotOnWashstand") {
setVisible(true);
- _statics->_v10 = "Open";
+ _statics->_washstand = "Open";
_isClosed = false;
_startFrame = 0;
_endFrame = 14;
@@ -55,9 +55,9 @@ bool CWashstand::TurnOn(CTurnOn *msg) {
}
bool CWashstand::TurnOff(CTurnOff *msg) {
- if (_statics->_v10 == "Open" && _statics->_v11 == "Closed"
- && _statics->_v12 == "Closed" && _statics->_v2 == "Open") {
- _statics->_v10 = "Closed";
+ if (_statics->_washstand == "Open" && _statics->_desk == "Closed"
+ && _statics->_toilet == "Closed" && _statics->_bedfoot == "Open") {
+ _statics->_washstand = "Closed";
_isClosed = true;
_startFrame = 14;
_endFrame = 28;