mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-05 01:38:36 +00:00
Small cleanup to reduce amount of game id checks.
svn-id: r10401
This commit is contained in:
parent
cbcf5d5f7d
commit
07c3c2dac6
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user