[Scummvm-git-logs] scummvm master -> d9be91cc346abe3859c41aa6cd8d4a76b6939448

dreammaster dreammaster at scummvm.org
Sat Aug 5 20:48:58 CEST 2017


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
d9be91cc34 TITANIC: Only allow exiting SGT minilifts on the ground floor


Commit: d9be91cc346abe3859c41aa6cd8d4a76b6939448
    https://github.com/scummvm/scummvm/commit/d9be91cc346abe3859c41aa6cd8d4a76b6939448
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-08-05T14:48:50-04:00

Commit Message:
TITANIC: Only allow exiting SGT minilifts on the ground floor

Changed paths:
    engines/titanic/game/sgt/sgt_navigation.cpp
    engines/titanic/game/sgt/sgt_navigation.h
    engines/titanic/moves/enter_exit_mini_lift.cpp


diff --git a/engines/titanic/game/sgt/sgt_navigation.cpp b/engines/titanic/game/sgt/sgt_navigation.cpp
index 605649b..21e9436 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 69ecd12..5ba7a2f 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 3caa674..024ecbc 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;
 }
 





More information about the Scummvm-git-logs mailing list