[Scummvm-cvs-logs] CVS: scummvm/simon items.cpp,1.46,1.47 simon.cpp,1.145,1.146
Travis Howell
kirben at users.sourceforge.net
Wed Jan 29 03:32:04 CET 2003
Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1:/tmp/cvs-serv24926/simon
Modified Files:
items.cpp simon.cpp
Log Message:
Add some hebrew support and a little cleanup
Index: items.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/items.cpp,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- items.cpp 14 Jan 2003 05:25:31 -0000 1.46
+++ items.cpp 29 Jan 2003 11:31:10 -0000 1.47
@@ -986,25 +986,17 @@
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 @@
{
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 @@
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);
}
}
Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.145
retrieving revision 1.146
diff -u -d -r1.145 -r1.146
--- simon.cpp 29 Jan 2003 10:08:54 -0000 1.145
+++ simon.cpp 29 Jan 2003 11:31:10 -0000 1.146
@@ -1889,7 +1889,7 @@
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 @@
break;
case 't':
- _vk_t_toggle ^= 1;
+ if (_game & GAME_SIMON2)
+ _vk_t_toggle ^= 1;
break;
case '+':
@@ -4698,7 +4699,7 @@
if (_debugLevel == 4)
_start_mainscript = true;
- if (_sound->hasVoice()) {
+ if (_sound->hasVoice() && _language != 20) {
_vk_t_toggle = false;
} else {
_vk_t_toggle = true;
More information about the Scummvm-git-logs
mailing list