diff options
author | Travis Howell | 2003-01-29 11:31:10 +0000 |
---|---|---|
committer | Travis Howell | 2003-01-29 11:31:10 +0000 |
commit | 4e39e870712cf50305b144f4dee6c3cdffbf496e (patch) | |
tree | 96079068872d8fa4c36e1e5def903a18935fd535 /simon | |
parent | 43d3cbed19851851809eadc3716e46b84501f106 (diff) | |
download | scummvm-rg350-4e39e870712cf50305b144f4dee6c3cdffbf496e.tar.gz scummvm-rg350-4e39e870712cf50305b144f4dee6c3cdffbf496e.tar.bz2 scummvm-rg350-4e39e870712cf50305b144f4dee6c3cdffbf496e.zip |
Add some hebrew support and a little cleanup
svn-id: r6569
Diffstat (limited to 'simon')
-rw-r--r-- | simon/items.cpp | 79 | ||||
-rw-r--r-- | simon/simon.cpp | 7 |
2 files changed, 31 insertions, 55 deletions
diff --git a/simon/items.cpp b/simon/items.cpp index 224d1d4193..53656ddacd 100644 --- a/simon/items.cpp +++ b/simon/items.cpp @@ -986,25 +986,17 @@ int SimonState::runScript() uint b = getVarOrByte(); uint c = getVarOrByte(); uint a = getVarOrByte(); + uint d = 0; - if (_game == GAME_SIMON1TALKIE || _game == GAME_SIMON1WIN) { - uint d = _array_4[a]; - if (d != 0) - talk_with_speech(d, b); - } else if (!(_game & GAME_TALKIE)) { - const char *s = (const char *)getStringPtrByID(_stringid_array_3[a]); - ThreeValues *tv = getThreeValues(b); + const char *s = (const char *)getStringPtrByID(_stringid_array_3[a]); + ThreeValues *tv = getThreeValues(b); + if (_game == GAME_TALKIE) + d = _array_4[a]; + if (d != 0 && !_vk_t_toggle) { + talk_with_speech(d, b); + } else if (s != NULL) { talk_with_text(b, c, s, tv->a, tv->b, tv->c); - } else if (_game == GAME_SIMON2TALKIE || _game & GAME_SIMON2WIN) { - const char *s = (const char *)getStringPtrByID(_stringid_array_3[a]); - ThreeValues *tv = getThreeValues(b); - uint d = _array_4[a]; - - if (d != 0 && !_vk_t_toggle) - talk_with_speech(d, b); - else - talk_with_text(b, c, s, tv->a, tv->b, tv->c); } } break; @@ -1234,40 +1226,27 @@ void SimonState::o_177() { uint a = getVarOrByte(); uint b = getVarOrByte(); + const char *s = NULL; + ThreeValues *tv = NULL; + char buf[256]; + Child2 *child = (Child2 *)findChildOfType(getNextItemPtr(), 2); + if (child != NULL && child->avail_props & 1) { + s = (const char *)getStringPtrByID(child->array[0]); + tv = getThreeValues(a); + } + if (_game == GAME_SIMON1TALKIE || _game == GAME_SIMON1WIN) { - uint offs; if (child != NULL && child->avail_props & 0x200) { - offs = getOffsetOfChild2Param(child, 0x200); - talk_with_speech(child->array[offs], a); + uint offs = getOffsetOfChild2Param(child, 0x200); + if (!_vk_t_toggle) + talk_with_speech(child->array[offs], a); } else if (child != NULL && child->avail_props & 0x100) { - offs = getOffsetOfChild2Param(child, 0x100); - talk_with_speech(child->array[offs] + 3550, a); - } - } else if (!(_game & GAME_TALKIE)) { - if (child != NULL && child->avail_props & 1) { - const char *s = (const char *)getStringPtrByID(child->array[0]); - char buf[256]; - - ThreeValues *tv = getThreeValues(a); - - if (child->avail_props & 0x100) { - sprintf(buf, "%d%s", child->array[getOffsetOfChild2Param(child, 0x100)], s); - s = buf; - } - - talk_with_text(a, b, s, tv->a, tv->b, tv->c); + uint offs = getOffsetOfChild2Param(child, 0x100); + if (!_vk_t_toggle) + talk_with_speech(child->array[offs] + 3550, a); } } else if (_game == GAME_SIMON2TALKIE || _game & GAME_SIMON2WIN) { - const char *s = NULL; - ThreeValues *tv = NULL; - char buf[256]; - - if (child != NULL && child->avail_props & 1) { - s = (const char *)getStringPtrByID(child->array[0]); - tv = getThreeValues(a); - } - if (child != NULL && child->avail_props & 0x200) { uint var200 = child->array[getOffsetOfChild2Param(child, 0x200)]; @@ -1319,18 +1298,14 @@ void SimonState::o_177() talk_with_speech(var200, a); } - if (!_vk_t_toggle) - return; - - if (child == NULL || !(child->avail_props & 1)) - return; - + } + if (child != NULL && child->avail_props & 1 && !_vk_t_toggle) { if (child->avail_props & 0x100) { sprintf(buf, "%d%s", child->array[getOffsetOfChild2Param(child, 0x100)], s); s = buf; } - - talk_with_text(a, b, s, tv->a, tv->b, tv->c); + if (s != NULL) + talk_with_text(a, b, s, tv->a, tv->b, tv->c); } } diff --git a/simon/simon.cpp b/simon/simon.cpp index 79d3eecc76..4df2a18b10 100644 --- a/simon/simon.cpp +++ b/simon/simon.cpp @@ -1889,7 +1889,7 @@ void SimonState::o_print_str() case GAME_SIMON1TALKIE: case GAME_SIMON1WIN: case GAME_SIMON1CD32: - if (speech_id != 0) { + if (speech_id != 0 && !_vk_t_toggle) { talk_with_speech(speech_id, num_1); } else if (string_ptr != NULL) { talk_with_text(num_1, num_2, (char *)string_ptr, tv->a, tv->b, tv->c); @@ -3237,7 +3237,8 @@ void SimonState::processSpecialKeys() break; case 't': - _vk_t_toggle ^= 1; + if (_game & GAME_SIMON2) + _vk_t_toggle ^= 1; break; case '+': @@ -4698,7 +4699,7 @@ void SimonState::go() if (_debugLevel == 4) _start_mainscript = true; - if (_sound->hasVoice()) { + if (_sound->hasVoice() && _language != 20) { _vk_t_toggle = false; } else { _vk_t_toggle = true; |