diff options
-rw-r--r-- | common/system.h | 3 | ||||
-rw-r--r-- | simon/items.cpp | 79 | ||||
-rw-r--r-- | simon/simon.cpp | 7 |
3 files changed, 33 insertions, 56 deletions
diff --git a/common/system.h b/common/system.h index eb6ba47654..995c2d10be 100644 --- a/common/system.h +++ b/common/system.h @@ -247,7 +247,8 @@ enum { ES_ESP = 5, JA_JPN = 6, ZH_TWN = 7, - KO_KOR = 8 + KO_KOR = 8, + HB_HEB = 20 }; enum { 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; |