[Scummvm-cvs-logs] CVS: scummvm/scumm script_v2.cpp,2.100,2.101
Max Horn
fingolfin at users.sourceforge.net
Wed May 21 16:53:05 CEST 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv13299
Modified Files:
script_v2.cpp
Log Message:
add in preposition to dual verbs (e.g. 'give'); put in hard coded key codes for V2 verbs
Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v2.cpp,v
retrieving revision 2.100
retrieving revision 2.101
diff -u -d -r2.100 -r2.101
--- script_v2.cpp 21 May 2003 20:34:21 -0000 2.100
+++ script_v2.cpp 21 May 2003 23:46:02 -0000 2.101
@@ -793,7 +793,7 @@
int x = fetchScriptByte() << 3;
int y = fetchScriptByte() << 3;
slot = getVarOrDirectByte(0x80) + 1;
- /*int unk =*/ fetchScriptByte(); // ?
+ /* int unk = */ fetchScriptByte(); // ?
//printf("o2_verbOps: verb = %d, slot = %d, x = %d, y = %d, unk = %d, name = %s\n",
// verb, slot, x, y, unk, _scriptPointer);
@@ -816,6 +816,17 @@
vs->x = x;
vs->y = y;
+
+ // FIXME: again, this map depends on the language of the game.
+ // E.g. a german keyboard has 'z' and 'y' swapped, while a french
+ // keyboard starts with "awert", etc.
+ const char keyboard[] = {
+ 'q','w','e','r','t',
+ 'a','s','d','f','g',
+ 'z','x','c','v','b'
+ };
+ if (1 <= slot && slot <= ARRAYSIZE(keyboard))
+ vs->key = keyboard[slot - 1];
// It follows the verb name
loadPtrToResource(rtVerb, slot, NULL);
@@ -901,10 +912,18 @@
}
}
+ if (0 < _scummVars[29] && _scummVars[29] <= 4) {
+ // FIXME: Are these stored somewhere in the data? If not, we have to provide
+ // localized versions for all the languages MM/Zak are available in. Note
+ // that we already will have to do that for the fonts anyway.
+ const char *words[] = { " ", " in", " with", " on", " to" };
+ strcat(sentence, words[_scummVars[29]]);
+ }
+
if (VAR(VAR_SENTENCE_OBJECT2) > 0) {
temp = getObjOrActorName(VAR(VAR_SENTENCE_OBJECT2));
if (temp) {
- strcat(sentence, " with ");
+ strcat(sentence, " ");
strcat(sentence, (const char*)temp);
}
}
More information about the Scummvm-git-logs
mailing list