[Scummvm-cvs-logs] CVS: scummvm/simon items.cpp,1.90,1.91 simon.cpp,1.299,1.300
Travis Howell
kirben at users.sourceforge.net
Wed Sep 24 21:24:03 CEST 2003
Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1:/tmp/cvs-serv14723/simon
Modified Files:
items.cpp simon.cpp
Log Message:
Small cleanup to reduce amount of game id checks.
Index: items.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/items.cpp,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -d -r1.90 -r1.91
--- items.cpp 2 Aug 2003 10:09:05 -0000 1.90
+++ items.cpp 25 Sep 2003 04:23:07 -0000 1.91
@@ -1248,15 +1248,7 @@
tv = getThreeValues(a);
}
- if (_game == GAME_SIMON1CD32 || _game == GAME_SIMON1TALKIE || _game == GAME_SIMON1WIN) {
- if (child != NULL && child->avail_props & 0x200) {
- uint offs = getOffsetOfChild2Param(child, 0x200);
- talk_with_speech(child->array[offs], a);
- } else if (child != NULL && child->avail_props & 0x100) {
- uint offs = getOffsetOfChild2Param(child, 0x100);
- talk_with_speech(child->array[offs] + 3550, a);
- }
- } else if (_game == GAME_SIMON2TALKIE || _game == GAME_SIMON2WIN) {
+ if ((_game & GF_SIMON2) && (_game & GF_TALKIE)) {
if (child != NULL && child->avail_props & 0x200) {
uint var200 = child->array[getOffsetOfChild2Param(child, 0x200)];
@@ -1308,7 +1300,16 @@
talk_with_speech(var200, a);
}
+ } else if (_game & GF_TALKIE) {
+ if (child != NULL && child->avail_props & 0x200) {
+ uint offs = getOffsetOfChild2Param(child, 0x200);
+ talk_with_speech(child->array[offs], a);
+ } else if (child != NULL && child->avail_props & 0x100) {
+ uint offs = getOffsetOfChild2Param(child, 0x100);
+ talk_with_speech(child->array[offs] + 3550, a);
+ }
}
+
if (child != NULL && (child->avail_props & 1) && _subtitles) {
if (child->avail_props & 0x100) {
sprintf(buf, "%d%s", child->array[getOffsetOfChild2Param(child, 0x100)], s);
Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.299
retrieving revision 1.300
diff -u -d -r1.299 -r1.300
--- simon.cpp 24 Sep 2003 06:31:42 -0000 1.299
+++ simon.cpp 25 Sep 2003 04:23:07 -0000 1.300
@@ -2111,27 +2111,7 @@
tv = getThreeValues(num_1);
- switch (_game) {
- case GAME_SIMON1TALKIE:
- case GAME_SIMON1WIN:
- case GAME_SIMON1CD32:
- case GAME_SIMON1ACORN:
- if (speech_id != 0)
- talk_with_speech(speech_id, num_1);
- if (string_ptr != NULL && (speech_id == 0 || _subtitles))
- talk_with_text(num_1, num_2, (const char *)string_ptr, tv->a, tv->b, tv->c);
- break;
-
- case GAME_SIMON1DEMO:
- case GAME_SIMON1DOS:
- case GAME_SIMON1AMIGA:
- case GAME_SIMON2DOS:
- talk_with_text(num_1, num_2, (const char *)string_ptr, tv->a, tv->b, tv->c);
- break;
-
- case GAME_SIMON2TALKIE:
- case GAME_SIMON2WIN:
- case GAME_SIMON2MAC:
+ if ((_game & GF_SIMON2) && (_game & GF_TALKIE)) {
if (speech_id != 0 && num_1 == 1 && (_language == 20 || !_subtitles))
talk_with_speech(speech_id, num_1);
@@ -2140,8 +2120,18 @@
if (string_ptr != NULL && (speech_id == 0 || _subtitles))
talk_with_text(num_1, num_2, (const char *)string_ptr, tv->a, tv->b, tv->c);
- break;
+
+ } else if (_game & GF_TALKIE) {
+ if (speech_id != 0)
+ talk_with_speech(speech_id, num_1);
+ if (string_ptr != NULL && (speech_id == 0 || _subtitles))
+ talk_with_text(num_1, num_2, (const char *)string_ptr, tv->a, tv->b, tv->c);
+
+ } else {
+ talk_with_text(num_1, num_2, (const char *)string_ptr, tv->a, tv->b, tv->c);
+
}
+
}
void SimonEngine::ensureVgaResLoadedC(uint vga_res) {
@@ -2801,7 +2791,11 @@
name_len--;
- x = (name[name_len] == 'i' || name[name_len] == 'l') ? 1 : 8;
+ if (_language == 20) //Hebrew
+ x = 8;
+ else
+ x = (name[name_len] == 'i' || name[name_len] == 'l') ? 1 : 8;
+
name[name_len] = 0;
o_unk_132_helper_2(_fcs_ptr_array_3[5], x);
More information about the Scummvm-git-logs
mailing list