HUGO: Fix case bug in God Mode

svn-id: r54969
This commit is contained in:
Arnaud Boutonné 2010-12-19 23:44:53 +00:00
parent da53b85498
commit 8a1f628d37
2 changed files with 8 additions and 8 deletions

View file

@ -138,7 +138,7 @@ void Parser_v1w::lineHandler() {
// Toggle God Mode // Toggle God Mode
if (!strncmp(_line, "PPG", 3)) { if (!strncmp(_line, "PPG", 3)) {
_vm->_sound->playSound(!_vm->_soundTest, BOTH_CHANNELS, HIGH_PRI); _vm->_sound->playSound(!_vm->_soundTest, BOTH_CHANNELS, HIGH_PRI);
gameStatus.godModeFl ^= 1; gameStatus.godModeFl = !gameStatus.godModeFl;
return; return;
} }
@ -153,7 +153,7 @@ void Parser_v1w::lineHandler() {
// Special code to allow me to go straight to any screen // Special code to allow me to go straight to any screen
if (strstr(_line, "goto")) { if (strstr(_line, "goto")) {
for (int i = 0; i < _vm->_numScreens; i++) { 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); _vm->_scheduler->newScreen(i);
return; return;
} }
@ -171,7 +171,7 @@ void Parser_v1w::lineHandler() {
if (strstr(_line, "fetch")) { if (strstr(_line, "fetch")) {
for (int i = 0; i < _vm->_object->_numObj; i++) { 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]); takeObject(&_vm->_object->_objects[i]);
return; return;
} }
@ -181,7 +181,7 @@ void Parser_v1w::lineHandler() {
// Special code to allow me to goto objects // Special code to allow me to goto objects
if (strstr(_line, "find")) { if (strstr(_line, "find")) {
for (int i = 0; i < _vm->_object->_numObj; i++) { 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); _vm->_scheduler->newScreen(_vm->_object->_objects[i].screenIndex);
return; return;
} }

View file

@ -61,7 +61,7 @@ void Parser_v3d::lineHandler() {
// Toggle God Mode // Toggle God Mode
if (!strncmp(_line, "PPG", 3)) { if (!strncmp(_line, "PPG", 3)) {
_vm->_sound->playSound(!_vm->_soundTest, BOTH_CHANNELS, HIGH_PRI); _vm->_sound->playSound(!_vm->_soundTest, BOTH_CHANNELS, HIGH_PRI);
gameStatus.godModeFl ^= 1; gameStatus.godModeFl = !gameStatus.godModeFl;
return; return;
} }
@ -76,7 +76,7 @@ void Parser_v3d::lineHandler() {
// Special code to allow me to go straight to any screen // Special code to allow me to go straight to any screen
if (strstr(_line, "goto")) { if (strstr(_line, "goto")) {
for (int i = 0; i < _vm->_numScreens; i++) { 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); _vm->_scheduler->newScreen(i);
return; return;
} }
@ -94,7 +94,7 @@ void Parser_v3d::lineHandler() {
if (strstr(_line, "fetch")) { if (strstr(_line, "fetch")) {
for (int i = 0; i < _vm->_object->_numObj; i++) { 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]); takeObject(&_vm->_object->_objects[i]);
return; return;
} }
@ -104,7 +104,7 @@ void Parser_v3d::lineHandler() {
// Special code to allow me to goto objects // Special code to allow me to goto objects
if (strstr(_line, "find")) { if (strstr(_line, "find")) {
for (int i = 0; i < _vm->_object->_numObj; i++) { 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); _vm->_scheduler->newScreen(_vm->_object->_objects[i].screenIndex);
return; return;
} }