[Scummvm-cvs-logs] CVS: scummvm/scumm saveload.cpp,1.96,1.97 script_v2.cpp,2.162,2.163 verbs.h,1.5,1.6
James Brown
ender at users.sourceforge.net
Tue Aug 5 09:44:06 CEST 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv13258/scumm
Modified Files:
saveload.cpp script_v2.cpp verbs.h
Log Message:
V1 preposition support, but broken.
Index: saveload.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/saveload.cpp,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -d -r1.96 -r1.97
--- saveload.cpp 28 Jul 2003 15:47:46 -0000 1.96
+++ saveload.cpp 5 Aug 2003 16:43:33 -0000 1.97
@@ -312,7 +312,7 @@
MKLINE(VerbSlot, saveid, sleByte, VER_V8),
MKLINE(VerbSlot, key, sleByte, VER_V8),
MKLINE(VerbSlot, center, sleByte, VER_V8),
- MKLINE(VerbSlot, field_1B, sleByte, VER_V8),
+ MKLINE(VerbSlot, prep, sleByte, VER_V8),
MKLINE(VerbSlot, imgindex, sleUint16, VER_V8),
MKEND()
};
Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v2.cpp,v
retrieving revision 2.162
retrieving revision 2.163
diff -u -d -r2.162 -r2.163
--- script_v2.cpp 31 Jul 2003 18:46:30 -0000 2.162
+++ script_v2.cpp 5 Aug 2003 16:43:33 -0000 2.163
@@ -818,8 +818,8 @@
int x = fetchScriptByte() << 3;
int y = fetchScriptByte() << 3;
slot = getVarOrDirectByte(0x80) + 1;
- /* int unk = */ fetchScriptByte(); // ?
-
+ int prep = fetchScriptByte(); // Only used in V1?
+ printf("Setting prep %d for slot %d\n", prep, slot);
// V1 Maniac verbs are relative to the 'verb area' - under the sentence
if ((_gameId == GID_MANIAC) && (_version == 1))
y+=8;
@@ -848,6 +848,7 @@
vs->key = 0;
vs->center = 0;
vs->imgindex = 0;
+ vs->prep = prep;
vs->x = x;
vs->y = y;
@@ -912,7 +913,7 @@
runObjectScript(st->objectA, st->verb, false, false, NULL);
} else
- runObjectScript(st->objectA, 253, (st->verb == 250), true, NULL);
+ runObjectScript(st->objectA, 253, (st->verb == 250), true, NULL);
break;
case 2:
// Print the sentence
@@ -933,7 +934,7 @@
static char sentence[256];
const byte *temp;
int slot = getVerbSlot(VAR(VAR_SENTENCE_VERB),0);
-
+ printf("slot is %d\n");
if (!(_userState & 32))
return;
@@ -948,6 +949,14 @@
strcat(sentence, " ");
strcat(sentence, (const char*)temp);
}
+
+ if ((_version == 1) && (VAR(VAR_SENTENCE_PREPOSITION) == 0)) {
+ byte *ptr = getOBCDFromObject(VAR(VAR_SENTENCE_OBJECT1)) + 12;
+ VerbSlot *vs = &_verbs[slot];
+
+ if (ptr && (vs->prep == 0xFF))
+ VAR(VAR_SENTENCE_PREPOSITION) = (*ptr >> 5);
+ }
}
if (0 < VAR(VAR_SENTENCE_PREPOSITION) && VAR(VAR_SENTENCE_PREPOSITION) <= 4) {
Index: verbs.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/verbs.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- verbs.h 15 May 2003 22:36:43 -0000 1.5
+++ verbs.h 5 Aug 2003 16:43:33 -0000 1.6
@@ -39,7 +39,7 @@
uint16 saveid;
uint8 key;
bool center;
- uint8 field_1B;
+ uint8 prep;
uint16 imgindex;
};
More information about the Scummvm-git-logs
mailing list