[Scummvm-cvs-logs] CVS: scummvm/simon items.cpp,1.5,1.6
Travis Howell
kirben at users.sourceforge.net
Sun Nov 3 22:47:02 CET 2002
Update of /cvsroot/scummvm/scummvm/simon
In directory usw-pr-cvs1:/tmp/cvs-serv17541/simon
Modified Files:
items.cpp
Log Message:
Add some separate simon2dos sections since it doesn't have speech.
simon2dos text still not working right though.
Index: items.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/items.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- items.cpp 31 Oct 2002 01:55:11 -0000 1.5
+++ items.cpp 4 Nov 2002 06:46:21 -0000 1.6
@@ -1040,7 +1040,7 @@
}
talk_with_text(b, c, s, tv->a, tv->b, tv->c);
- } else if (_game == GAME_SIMON2WIN || _game == GAME_SIMON2DOS) {
+ } else if (_game == GAME_SIMON2WIN) {
uint b = getVarOrByte();
uint c = getVarOrByte();
uint a = getVarOrByte();
@@ -1071,6 +1071,32 @@
if (s != NULL && _vk_t_toggle)
talk_with_text(b, c, s, tv->a, tv->b, tv->c);
+ } else if (_game == GAME_SIMON2DOS) {
+ uint b = getVarOrByte();
+ uint c = getVarOrByte();
+ uint a = getVarOrByte();
+ const char *s = (const char *)getStringPtrByID(_stringid_array_3[a]);
+ ThreeValues *tv;
+
+ switch (b) {
+ case 1:
+ tv = &_threevalues_1;
+ break;
+ case 2:
+ tv = &_threevalues_2;
+ break;
+ case 101:
+ tv = &_threevalues_3;
+ break;
+ case 102:
+ tv = &_threevalues_4;
+ break;
+ default:
+ error("setup text, invalid value %d", b);
+ }
+
+ if (s != NULL)
+ talk_with_text(b, c, s, tv->a, tv->b, tv->c);
}
}
break;
@@ -1322,7 +1348,7 @@
talk_with_text(a, b, s, tv->a, tv->b, tv->c);
}
- } else if (_game & GAME_SIMON2) {
+ } else if (_game == GAME_SIMON2WIN) {
uint a = getVarOrByte();
uint b = getVarOrByte();
Child2 *child = (Child2 *)findChildOfType(getNextItemPtr(), 2);
@@ -1403,6 +1429,43 @@
if (!_vk_t_toggle)
return;
+
+ if (child == NULL || !(child->avail_props & 1))
+ return;
+
+ 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);
+ } else if (_game == GAME_SIMON2DOS) {
+ uint a = getVarOrByte();
+ uint b = getVarOrByte();
+ Child2 *child = (Child2 *)findChildOfType(getNextItemPtr(), 2);
+ const char *s = NULL;
+ ThreeValues *tv = NULL;
+ char buf[256];
+
+ if (child != NULL && child->avail_props & 1) {
+ s = (const char *)getStringPtrByID(child->array[0]);
+ switch (a) {
+ case 1:
+ tv = &_threevalues_1;
+ break;
+ case 2:
+ tv = &_threevalues_2;
+ break;
+ case 101:
+ tv = &_threevalues_3;
+ break;
+ case 102:
+ tv = &_threevalues_4;
+ break;
+ default:
+ error("setup text, invalid value %d", a);
+ }
+ }
if (child == NULL || !(child->avail_props & 1))
return;
More information about the Scummvm-git-logs
mailing list