aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic
diff options
context:
space:
mode:
authorPaul Gilbert2017-08-05 14:48:50 -0400
committerPaul Gilbert2017-08-05 14:48:50 -0400
commitd9be91cc346abe3859c41aa6cd8d4a76b6939448 (patch)
treedc90a0221b713ca5ecae6c04951c05cdf8821879 /engines/titanic
parent1e3a6be863033924c6f9e867ae94c9f8e5be21a0 (diff)
downloadscummvm-rg350-d9be91cc346abe3859c41aa6cd8d4a76b6939448.tar.gz
scummvm-rg350-d9be91cc346abe3859c41aa6cd8d4a76b6939448.tar.bz2
scummvm-rg350-d9be91cc346abe3859c41aa6cd8d4a76b6939448.zip
TITANIC: Only allow exiting SGT minilifts on the ground floor
Diffstat (limited to 'engines/titanic')
-rw-r--r--engines/titanic/game/sgt/sgt_navigation.cpp20
-rw-r--r--engines/titanic/game/sgt/sgt_navigation.h2
-rw-r--r--engines/titanic/moves/enter_exit_mini_lift.cpp5
3 files changed, 14 insertions, 13 deletions
diff --git a/engines/titanic/game/sgt/sgt_navigation.cpp b/engines/titanic/game/sgt/sgt_navigation.cpp
index 605649b82a..21e9436ce9 100644
--- a/engines/titanic/game/sgt/sgt_navigation.cpp
+++ b/engines/titanic/game/sgt/sgt_navigation.cpp
@@ -43,7 +43,7 @@ void CSGTNavigation::deinit() {
void CSGTNavigation::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
- file->writeNumberLine(_statics->_changeViewNum, indent);
+ file->writeNumberLine(_statics->_miniLiftFloor, indent);
file->writeQuotedLine(_statics->_destView, indent);
file->writeQuotedLine(_statics->_destRoom, indent);
@@ -52,7 +52,7 @@ void CSGTNavigation::save(SimpleFile *file, int indent) {
void CSGTNavigation::load(SimpleFile *file) {
file->readNumber();
- _statics->_changeViewNum = file->readNumber();
+ _statics->_miniLiftFloor = file->readNumber();
_statics->_destView = file->readString();
_statics->_destRoom = file->readString();
@@ -64,20 +64,20 @@ bool CSGTNavigation::StatusChangeMsg(CStatusChangeMsg *msg) {
if (isEquals("SGTLL")) {
static const int FRAMES[7] = { 0, 149, 112, 74, 0, 36, 74 };
- _statics->_changeViewNum = msg->_newStatus;
- if (pet->getRoomsSublevel() != _statics->_changeViewNum) {
+ _statics->_miniLiftFloor = msg->_newStatus;
+ if (pet->getRoomsSublevel() != _statics->_miniLiftFloor) {
changeView("SGTLittleLift.Node 1.N");
}
int startVal = pet->getRoomsSublevel();
- if (startVal > _statics->_changeViewNum)
- playMovie(FRAMES[startVal], FRAMES[_statics->_changeViewNum], MOVIE_WAIT_FOR_FINISH);
+ if (startVal > _statics->_miniLiftFloor)
+ playMovie(FRAMES[startVal], FRAMES[_statics->_miniLiftFloor], MOVIE_WAIT_FOR_FINISH);
else
- playMovie(FRAMES[startVal + 3], FRAMES[_statics->_changeViewNum + 3], MOVIE_WAIT_FOR_FINISH);
+ playMovie(FRAMES[startVal + 3], FRAMES[_statics->_miniLiftFloor + 3], MOVIE_WAIT_FOR_FINISH);
- _cursorId = _statics->_changeViewNum != 1 ? CURSOR_MOVE_FORWARD : CURSOR_INVALID;
+ _cursorId = _statics->_miniLiftFloor != 1 ? CURSOR_MOVE_FORWARD : CURSOR_INVALID;
- pet->setRoomsSublevel(_statics->_changeViewNum);
+ pet->setRoomsSublevel(_statics->_miniLiftFloor);
pet->resetRoomsHighlight();
}
@@ -90,7 +90,7 @@ bool CSGTNavigation::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
_statics->_destRoom = "SgtLobby";
changeView("SGTState.Node 1.S");
} else if (compareRoomNameTo("SGTLittleLift")) {
- if (_statics->_changeViewNum != 1) {
+ if (_statics->_miniLiftFloor != 1) {
_statics->_destRoom = "SGTLittleLift";
changeView("SGTState.Node 1.S");
}
diff --git a/engines/titanic/game/sgt/sgt_navigation.h b/engines/titanic/game/sgt/sgt_navigation.h
index 69ecd1267a..5ba7a2fd3c 100644
--- a/engines/titanic/game/sgt/sgt_navigation.h
+++ b/engines/titanic/game/sgt/sgt_navigation.h
@@ -28,7 +28,7 @@
namespace Titanic {
struct CSGTNavigationStatics {
- int _changeViewNum;
+ int _miniLiftFloor;
CString _destView;
CString _destRoom;
};
diff --git a/engines/titanic/moves/enter_exit_mini_lift.cpp b/engines/titanic/moves/enter_exit_mini_lift.cpp
index 3caa674ab8..024ecbc832 100644
--- a/engines/titanic/moves/enter_exit_mini_lift.cpp
+++ b/engines/titanic/moves/enter_exit_mini_lift.cpp
@@ -56,7 +56,7 @@ bool CEnterExitMiniLift::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
if (pet)
pet->setRoomsRoomNum(_destRoomNum);
} else if (compareRoomNameTo("SGTLittleLift")) {
- if (_statics->_changeViewNum) {
+ if (_statics->_miniLiftFloor == 1) {
changeView(_statics->_destView);
}
}
@@ -65,7 +65,8 @@ bool CEnterExitMiniLift::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
}
bool CEnterExitMiniLift::EnterViewMsg(CEnterViewMsg *msg) {
- _cursorId = _statics->_changeViewNum ? CURSOR_MOVE_FORWARD : CURSOR_INVALID;
+ // Only show exit cursor when minilift is on the ground level
+ _cursorId = _statics->_miniLiftFloor == 1 ? CURSOR_MOVE_FORWARD : CURSOR_INVALID;
return true;
}