[Scummvm-cvs-logs] scummvm master -> b21534b5d11db2022c3dbdf94000f9f035a66853

dreammaster dreammaster at scummvm.org
Mon Oct 7 23:31:12 CEST 2013


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:
b21534b5d1 TSAGE: Fixes for not allowing walk cursor to be selected when walking disabled


Commit: b21534b5d11db2022c3dbdf94000f9f035a66853
    https://github.com/scummvm/scummvm/commit/b21534b5d11db2022c3dbdf94000f9f035a66853
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2013-10-07T14:30:25-07:00

Commit Message:
TSAGE: Fixes for not allowing walk cursor to be selected when walking disabled

Changed paths:
    engines/tsage/core.cpp
    engines/tsage/ringworld2/ringworld2_dialogs.cpp
    engines/tsage/ringworld2/ringworld2_scenes0.cpp



diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp
index 22c7e32..488eacc 100644
--- a/engines/tsage/core.cpp
+++ b/engines/tsage/core.cpp
@@ -4259,11 +4259,11 @@ void SceneHandler::process(Event &event) {
 			g_vm->_debugger->onFrame();
 		}
 
-		if ((event.eventType == EVENT_KEYPRESS) && g_globals->_player._enabled && g_globals->_player._canWalk) {
+		if ((event.eventType == EVENT_KEYPRESS) && g_globals->_player._enabled) {
 			// Keyboard shortcuts for different actions
 			switch (event.kbd.keycode) {
 			case Common::KEYCODE_w:
-				g_globals->_events.setCursor(CURSOR_WALK);
+				g_globals->_events.setCursor(GLOBALS._player._canWalk ? CURSOR_WALK : CURSOR_USE);
 				event.handled = true;
 				break;
 			case Common::KEYCODE_l:
diff --git a/engines/tsage/ringworld2/ringworld2_dialogs.cpp b/engines/tsage/ringworld2/ringworld2_dialogs.cpp
index 057d91a..4ebbdd6 100644
--- a/engines/tsage/ringworld2/ringworld2_dialogs.cpp
+++ b/engines/tsage/ringworld2/ringworld2_dialogs.cpp
@@ -165,7 +165,7 @@ void RightClickDialog::execute() {
 		break;
 	case 1:
 		// Walk action
-		cursorNum = CURSOR_WALK;
+		cursorNum = R2_GLOBALS._player._canWalk ? CURSOR_WALK : CURSOR_USE;
 		break;
 	case 2:
 		// Use action
diff --git a/engines/tsage/ringworld2/ringworld2_scenes0.cpp b/engines/tsage/ringworld2/ringworld2_scenes0.cpp
index fb67c9e..fb7e42f 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes0.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes0.cpp
@@ -3281,7 +3281,7 @@ void Scene300::postInit(SceneObjectList *OwnerList) {
 	_mirandaWorkstation1.setDetails(Rect(4, 128, 69, 167), 300, 33, 31, 35, 1, NULL);
 
 	switch (R2_GLOBALS._player._characterIndex) {
-	case 1:
+	case R2_QUINN:
 		_miranda.postInit();
 		_miranda.setup(302, 2, 1);
 		_miranda.setPosition(Common::Point(47, 128));
@@ -3303,7 +3303,7 @@ void Scene300::postInit(SceneObjectList *OwnerList) {
 		R2_GLOBALS._player.disableControl();
 		break;
 
-	case 2:
+	case R2_SEEKER:
 		_miranda.postInit();
 		_miranda.setup(302, 2, 1);
 		_miranda.setPosition(Common::Point(47, 128));
@@ -3323,9 +3323,10 @@ void Scene300::postInit(SceneObjectList *OwnerList) {
 		R2_GLOBALS._player.setPosition(Common::Point(158, 108));
 		R2_GLOBALS._player.fixPriority(130);
 		R2_GLOBALS._player.enableControl(CURSOR_USE);
+		R2_GLOBALS._player._canWalk = false;
 		break;
 
-	case 3:
+	case R2_MIRANDA:
 		if ((R2_GLOBALS._player._characterScene[R2_SEEKER] == 300) || (R2_GLOBALS._player._characterScene[R2_SEEKER] == 325)) {
 			_seeker.postInit();
 			_seeker.setVisage(302);
@@ -3347,6 +3348,7 @@ void Scene300::postInit(SceneObjectList *OwnerList) {
 		R2_GLOBALS._player.setup(302, 2, 1);
 		R2_GLOBALS._player.setPosition(Common::Point(47, 128));
 		R2_GLOBALS._player.enableControl(CURSOR_USE);
+		R2_GLOBALS._player._canWalk = false;
 		break;
 
 	default:






More information about the Scummvm-git-logs mailing list