[Scummvm-cvs-logs] SF.net SVN: scummvm:[54969] scummvm/trunk/engines/hugo

strangerke at users.sourceforge.net strangerke at users.sourceforge.net
Mon Dec 20 00:44:53 CET 2010


Revision: 54969
          http://scummvm.svn.sourceforge.net/scummvm/?rev=54969&view=rev
Author:   strangerke
Date:     2010-12-19 23:44:53 +0000 (Sun, 19 Dec 2010)

Log Message:
-----------
HUGO: Fix case bug in God Mode

Modified Paths:
--------------
    scummvm/trunk/engines/hugo/parser_v1w.cpp
    scummvm/trunk/engines/hugo/parser_v3d.cpp

Modified: scummvm/trunk/engines/hugo/parser_v1w.cpp
===================================================================
--- scummvm/trunk/engines/hugo/parser_v1w.cpp	2010-12-19 23:15:34 UTC (rev 54968)
+++ scummvm/trunk/engines/hugo/parser_v1w.cpp	2010-12-19 23:44:53 UTC (rev 54969)
@@ -138,7 +138,7 @@
 	// Toggle God Mode
 	if (!strncmp(_line, "PPG", 3)) {
 		_vm->_sound->playSound(!_vm->_soundTest, BOTH_CHANNELS, HIGH_PRI);
-		gameStatus.godModeFl ^= 1;
+		gameStatus.godModeFl = !gameStatus.godModeFl;
 		return;
 	}
 
@@ -153,7 +153,7 @@
 		// Special code to allow me to go straight to any screen
 		if (strstr(_line, "goto")) {
 			for (int i = 0; i < _vm->_numScreens; i++) {
-				if (!strcmp(&_line[strlen("goto") + 1], _vm->_screenNames[i])) {
+				if (!scumm_stricmp(&_line[strlen("goto") + 1], _vm->_screenNames[i])) {
 					_vm->_scheduler->newScreen(i);
 					return;
 				}
@@ -171,7 +171,7 @@
 
 		if (strstr(_line, "fetch")) {
 			for (int i = 0; i < _vm->_object->_numObj; i++) {
-				if (!strcmp(&_line[strlen("fetch") + 1], _vm->_arrayNouns[_vm->_object->_objects[i].nounIndex][0])) {
+				if (!scumm_stricmp(&_line[strlen("fetch") + 1], _vm->_arrayNouns[_vm->_object->_objects[i].nounIndex][0])) {
 					takeObject(&_vm->_object->_objects[i]);
 					return;
 				}
@@ -181,7 +181,7 @@
 		// Special code to allow me to goto objects
 		if (strstr(_line, "find")) {
 			for (int i = 0; i < _vm->_object->_numObj; i++) {
-				if (!strcmp(&_line[strlen("find") + 1], _vm->_arrayNouns[_vm->_object->_objects[i].nounIndex][0])) {
+				if (!scumm_stricmp(&_line[strlen("find") + 1], _vm->_arrayNouns[_vm->_object->_objects[i].nounIndex][0])) {
 					_vm->_scheduler->newScreen(_vm->_object->_objects[i].screenIndex);
 					return;
 				}

Modified: scummvm/trunk/engines/hugo/parser_v3d.cpp
===================================================================
--- scummvm/trunk/engines/hugo/parser_v3d.cpp	2010-12-19 23:15:34 UTC (rev 54968)
+++ scummvm/trunk/engines/hugo/parser_v3d.cpp	2010-12-19 23:44:53 UTC (rev 54969)
@@ -61,7 +61,7 @@
 	// Toggle God Mode
 	if (!strncmp(_line, "PPG", 3)) {
 		_vm->_sound->playSound(!_vm->_soundTest, BOTH_CHANNELS, HIGH_PRI);
-		gameStatus.godModeFl ^= 1;
+		gameStatus.godModeFl = !gameStatus.godModeFl;
 		return;
 	}
 
@@ -76,7 +76,7 @@
 		// Special code to allow me to go straight to any screen
 		if (strstr(_line, "goto")) {
 			for (int i = 0; i < _vm->_numScreens; i++) {
-				if (!strcmp(&_line[strlen("goto") + 1], _vm->_screenNames[i])) {
+				if (!scumm_stricmp(&_line[strlen("goto") + 1], _vm->_screenNames[i])) {
 					_vm->_scheduler->newScreen(i);
 					return;
 				}
@@ -94,7 +94,7 @@
 
 		if (strstr(_line, "fetch")) {
 			for (int i = 0; i < _vm->_object->_numObj; i++) {
-				if (!strcmp(&_line[strlen("fetch") + 1], _vm->_arrayNouns[_vm->_object->_objects[i].nounIndex][0])) {
+				if (!scumm_stricmp(&_line[strlen("fetch") + 1], _vm->_arrayNouns[_vm->_object->_objects[i].nounIndex][0])) {
 					takeObject(&_vm->_object->_objects[i]);
 					return;
 				}
@@ -104,7 +104,7 @@
 		// Special code to allow me to goto objects
 		if (strstr(_line, "find")) {
 			for (int i = 0; i < _vm->_object->_numObj; i++) {
-				if (!strcmp(&_line[strlen("find") + 1], _vm->_arrayNouns[_vm->_object->_objects[i].nounIndex][0])) {
+				if (!scumm_stricmp(&_line[strlen("find") + 1], _vm->_arrayNouns[_vm->_object->_objects[i].nounIndex][0])) {
 					_vm->_scheduler->newScreen(_vm->_object->_objects[i].screenIndex);
 					return;
 				}


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list