[Scummvm-cvs-logs] CVS: scummvm/scumm script_v6.cpp,1.28,1.29 script_v8.cpp,2.66,2.67 string.cpp,1.67,1.68 verbs.h,1.2,1.3

Max Horn fingolfin at users.sourceforge.net
Fri Dec 27 08:50:02 CET 2002


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv17573

Modified Files:
	script_v6.cpp script_v8.cpp string.cpp verbs.h 
Log Message:
verb ids can be > 255 in V8; more V8 verbop corrections

Index: script_v6.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- script_v6.cpp	27 Dec 2002 00:23:45 -0000	1.28
+++ script_v6.cpp	27 Dec 2002 16:49:07 -0000	1.29
@@ -2012,7 +2012,13 @@
 	b = pop();
 	a = pop();
 
-	switch (fetchScriptByte()) {
+	byte subOp = fetchScriptByte();
+	if (_features & GF_AFTER_V8) {
+		subOp = (subOp - 141) + 0xB4;
+		printf("o8_saveRestoreVerbs:%d\n", (int)subOp);
+	}
+	
+	switch (subOp) {
 	case 141:
 		while (a <= b) {
 			slot = getVerbSlot(a, 0);

Index: script_v8.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v8.cpp,v
retrieving revision 2.66
retrieving revision 2.67
diff -u -d -r2.66 -r2.67
--- script_v8.cpp	27 Dec 2002 15:41:43 -0000	2.66
+++ script_v8.cpp	27 Dec 2002 16:49:08 -0000	2.67
@@ -1202,13 +1202,16 @@
 
 void Scumm_v8::o8_verbOps()
 {
-	// TODO
 	byte subOp = fetchScriptByte();
 	VerbSlot *vs = NULL;
 	int slot, a, b;
 
+	_verbRedraw = true;
+
 	if (0 <= _curVerbSlot && _curVerbSlot < _maxVerbs)
 		vs = &_verbs[_curVerbSlot];
+	if (subOp != 0x96)
+		assert(vs);
 
 	switch (subOp) {
 	case 0x96:		// SO_VERB_INIT Choose verb number for editing
@@ -1217,8 +1220,7 @@
 		checkRange(_maxVerbs - 1, 0, _curVerbSlot, "Illegal new verb slot %d");
 		break;
 	case 0x97:		// SO_VERB_NEW New verb
-		slot = getVerbSlot(_curVerb, 0);
-		if (slot == 0) {
+		if (_curVerbSlot == 0) {
 			for (slot = 1; slot < _maxVerbs; slot++) {
 				if (_verbs[slot].verbid == 0)
 					break;
@@ -1227,7 +1229,7 @@
 				error("Too many verbs");
 			_curVerbSlot = slot;
 		}
-		vs = &_verbs[slot];
+		vs = &_verbs[_curVerbSlot];
 		vs->verbid = _curVerb;
 		vs->color = 2;
 		vs->hicolor = 0;
@@ -1302,6 +1304,9 @@
 		break;
 	case 0xA7:		// SO_VERB_LINE_SPACING Choose linespacing for verb
 		// FIXME - TODO
+		// Note: it seems that var596 stores the "line spacing". It is used by various
+		// scripts that place verbs for that.
+		// Also, var595 contains the vertical position at which to start placing verbs (330)
 		pop();
 		break;
 	default:

Index: string.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/string.cpp,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -d -r1.67 -r1.68
--- string.cpp	26 Dec 2002 02:13:19 -0000	1.67
+++ string.cpp	27 Dec 2002 16:49:08 -0000	1.68
@@ -485,8 +485,11 @@
 	// and never time out. We can't do it blindly for all games, because
 	// it causes problem with the FOA intro.
 
-	if (_gameId == GID_FT && a == 4)
+	if ((_gameId == GID_FT || _features & GF_AFTER_V8) && a == 4)
 		_talkDelay = -1;
+
+	if (_features & GF_AFTER_V8)
+		printf("Drawing string '%s'\n", buf);
 
 	if (!buf[0]) {
 		buf[0] = ' ';

Index: verbs.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/verbs.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- verbs.h	29 Nov 2002 18:27:35 -0000	1.2
+++ verbs.h	27 Dec 2002 16:49:08 -0000	1.3
@@ -32,10 +32,10 @@
 	int16 x, y;
 	int16 right, bottom;
 	int16 oldleft, oldtop, oldright, oldbottom;
-	uint8 verbid;
+	uint16 verbid;
 	uint8 color, hicolor, dimcolor, bkcolor, type;
 	uint8 charset_nr, curmode;
-	uint8 saveid;
+	uint16 saveid;
 	uint8 key;
 	bool center;
 	uint8 field_1B;





More information about the Scummvm-git-logs mailing list