[Scummvm-cvs-logs] CVS: scummvm/simon items.cpp,1.103,1.104 simon.cpp,1.365,1.366 simon.h,1.108,1.109
Travis Howell
kirben at users.sourceforge.net
Thu Dec 11 19:20:00 CET 2003
Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1:/tmp/cvs-serv1680/simon
Modified Files:
items.cpp simon.cpp simon.h
Log Message:
Add work around for bug in original simon1.
Index: items.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/items.cpp,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -d -r1.103 -r1.104
--- items.cpp 6 Dec 2003 02:08:51 -0000 1.103
+++ items.cpp 12 Dec 2003 03:19:39 -0000 1.104
@@ -378,11 +378,14 @@
if (_game & GF_TALKIE) {
uint speech_id = getNextWord();
if (var < 20) {
+ _stringid_array_3_backup[var] = _stringid_array_3[var];
_stringid_array_3[var] = string_id;
+ _speechid_array_4_backup[var] = _speechid_array_4[var];
_speechid_array_4[var] = speech_id;
}
} else {
if (var < 20)
+ _stringid_array_3_backup[var] = _stringid_array_3[var];
_stringid_array_3[var] = string_id;
}
}
@@ -933,6 +936,8 @@
_show_preposition = true;
o_setup_cond_c();
_show_preposition = false;
+ if (!(_game & GF_SIMON2))
+ _reset_arrays = true;
}
break;
@@ -1005,6 +1010,18 @@
talk_with_speech(speech_id, vga_sprite_id);
if (string_ptr != NULL && _subtitles)
talk_with_text(vga_sprite_id, color, string_ptr, tv->a, tv->b, tv->c);
+
+ if (_reset_arrays) {
+ // Work around for bug in original Simon the Sorcerer 1
+ // The game wouldn't reset array back to room descriptions
+ // after a conversation.
+ uint i;
+ for (i = 0; i < 21; i++) {
+ _stringid_array_3[i] = _stringid_array_3_backup[i];
+ _speechid_array_4[i] = _speechid_array_4_backup[i];
+ }
+ _reset_arrays = 0;
+ }
}
break;
Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.365
retrieving revision 1.366
diff -u -d -r1.365 -r1.366
--- simon.cpp 12 Dec 2003 01:31:02 -0000 1.365
+++ simon.cpp 12 Dec 2003 03:19:39 -0000 1.366
@@ -437,7 +437,10 @@
memset(_stringid_array_2, 0, sizeof(_stringid_array_2));
memset(_stringid_array_3, 0, sizeof(_stringid_array_3));
+ memset(_stringid_array_3_backup, 0, sizeof(_stringid_array_3_backup));
memset(_speechid_array_4, 0, sizeof(_speechid_array_4));
+ memset(_speechid_array_4_backup, 0, sizeof(_speechid_array_4_backup));
+ _reset_arrays = 0;
memset(_bit_array, 0, sizeof(_bit_array));
memset(_variableArray, 0, sizeof(_variableArray));
Index: simon.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.h,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -d -r1.108 -r1.109
--- simon.h 11 Dec 2003 09:14:10 -0000 1.108
+++ simon.h 12 Dec 2003 03:19:39 -0000 1.109
@@ -295,7 +295,10 @@
uint16 _stringid_array_2[20];
uint16 _stringid_array_3[20];
+ uint16 _stringid_array_3_backup[20];
uint16 _speechid_array_4[20];
+ uint16 _speechid_array_4_backup[20];
+ bool _reset_arrays;
uint16 _bit_array[32];
int16 _variableArray[256];
More information about the Scummvm-git-logs
mailing list