aboutsummaryrefslogtreecommitdiff
path: root/simon
diff options
context:
space:
mode:
authorTravis Howell2003-09-25 04:23:07 +0000
committerTravis Howell2003-09-25 04:23:07 +0000
commit07c3c2dac65f48ae61e51cb37588b28c0408884b (patch)
treead6bea248a4c27846bcd9aeb2a4171481355746f /simon
parentcbcf5d5f7d9472654d42e071c865001126522ce2 (diff)
downloadscummvm-rg350-07c3c2dac65f48ae61e51cb37588b28c0408884b.tar.gz
scummvm-rg350-07c3c2dac65f48ae61e51cb37588b28c0408884b.tar.bz2
scummvm-rg350-07c3c2dac65f48ae61e51cb37588b28c0408884b.zip
Small cleanup to reduce amount of game id checks.
svn-id: r10401
Diffstat (limited to 'simon')
-rw-r--r--simon/items.cpp19
-rw-r--r--simon/simon.cpp40
2 files changed, 27 insertions, 32 deletions
diff --git a/simon/items.cpp b/simon/items.cpp
index dc9513431e..947bf4cf88 100644
--- a/simon/items.cpp
+++ b/simon/items.cpp
@@ -1248,15 +1248,7 @@ void SimonEngine::o_inventory_descriptions() {
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 @@ void SimonEngine::o_inventory_descriptions() {
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);
diff --git a/simon/simon.cpp b/simon/simon.cpp
index bcfdf01396..0f4c09e36e 100644
--- a/simon/simon.cpp
+++ b/simon/simon.cpp
@@ -2111,27 +2111,7 @@ void SimonEngine::o_print_str() {
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 @@ void SimonEngine::o_print_str() {
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 @@ restart:;
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);