[Scummvm-cvs-logs] CVS: scummvm/scumm akos.cpp,1.140,1.141 script.cpp,1.180,1.181 script_v72he.cpp,2.25,2.26 script_v7he.cpp,2.48,2.49 scumm.cpp,1.149,1.150 scumm.h,1.453,1.454

Travis Howell kirben at users.sourceforge.net
Thu Aug 26 07:30:17 CEST 2004


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14788/scumm

Modified Files:
	akos.cpp script.cpp script_v72he.cpp script_v7he.cpp scumm.cpp 
	scumm.h 
Log Message:

Update akos error messages
Add proper timer opcodes
Up some debug msgs.


Index: akos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/akos.cpp,v
retrieving revision 1.140
retrieving revision 1.141
diff -u -d -r1.140 -r1.141
--- akos.cpp	26 Aug 2004 08:47:06 -0000	1.140
+++ akos.cpp	26 Aug 2004 14:28:41 -0000	1.141
@@ -309,7 +309,7 @@
 			result |= codec16(xmoveCur, ymoveCur);
 			break;
 		default:
-			error("akos_drawCostumeChannel: invalid codec %d", codec);
+			error("akos_drawLimb: invalid codec %d", codec);
 		}
 	} else {
 		extra = p[2];
@@ -343,7 +343,7 @@
 				result |= codec16(xmoveCur, ymoveCur);
 				break;
 			default:
-				error("akos_drawCostumeChannel: invalid codec %d", codec);
+				error("akos_drawLimb: invalid codec %d", codec);
 			}
 		}
 	}

Index: script.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script.cpp,v
retrieving revision 1.180
retrieving revision 1.181
diff -u -d -r1.180 -r1.181
--- script.cpp	26 Aug 2004 09:50:44 -0000	1.180
+++ script.cpp	26 Aug 2004 14:28:41 -0000	1.181
@@ -657,7 +657,7 @@
 
 void ScummEngine::push(int a) {
 	assert(_scummStackPos >= 0 && _scummStackPos < ARRAYSIZE(_vmStack));
-	//debug(9, "push %d", a);
+	debug(9, "push %d", a);
 	_vmStack[_scummStackPos++] = a;
 }
 
@@ -666,7 +666,7 @@
 		error("No items on stack to pop() for %s (0x%X) at [%d-%d]", getOpcodeDesc(_opcode), _opcode, _roomResource, vm.slot[_currentScript].number);
 	}
 	--_scummStackPos;
-	//debug(9, "pop %d", _vmStack[_scummStackPos]);
+	debug(9, "pop %d", _vmStack[_scummStackPos]);
 	return _vmStack[_scummStackPos];
 }
 

Index: script_v72he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v72he.cpp,v
retrieving revision 2.25
retrieving revision 2.26
diff -u -d -r2.25 -r2.26
--- script_v72he.cpp	26 Aug 2004 14:09:51 -0000	2.25
+++ script_v72he.cpp	26 Aug 2004 14:28:41 -0000	2.26
@@ -605,21 +605,28 @@
 }
 
 void ScummEngine_v72he::o72_getTimer() {
-	int b =	pop();
-	int a =	fetchScriptByte();
-	warning("o72_getTimer stub (%d, %d)", b, a);
-	if (a == 10)
-		push(1);
-	else
+	int timer = pop();
+	int cmd = fetchScriptByte();
+
+	if (cmd == 10) {
+		checkRange(3, 1, timer, "o72_getTimer: Timer %d out of range(%d)");
+		int diff = _system->get_msecs() - _timers[timer];
+		push(diff);
+	} else {
 		push(0);
+	}
 }
 
 void ScummEngine_v72he::o72_setTimer() {
-	int b =	pop();
-	int a =	fetchScriptByte();
-	if (a != 158)
-		error("TIMER command %d?", a);
-	warning("o72_setTimer stub (%d, %d)", b, a);
+	int timer = pop();
+	int cmd = fetchScriptByte();
+
+	if (cmd == 158) {
+		checkRange(3, 1, timer, "o72_setTimer: Timer %d out of range(%d)");
+		_timers[timer] = _system->get_msecs();
+	} else {
+		error("TIMER command %d?", cmd);
+	}
 }
 
 void ScummEngine_v72he::o72_wordArrayDec() {

Index: script_v7he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v7he.cpp,v
retrieving revision 2.48
retrieving revision 2.49
diff -u -d -r2.48 -r2.49
--- script_v7he.cpp	26 Aug 2004 08:47:07 -0000	2.48
+++ script_v7he.cpp	26 Aug 2004 14:28:41 -0000	2.49
@@ -655,7 +655,7 @@
 	case 122:
 	case 123:
 	case 203:
-		debug(1,"stub queueload (%d) resource %d", op, pop());
+		debug(5,"stub queueload (%d) resource %d", op, pop());
 		break;
 	case 159:
 		resid = pop();
@@ -675,11 +675,11 @@
 		break;
 	case 233:
 		resid = pop();
-		debug(1,"stub o7_resourceRoutines lock object %d", resid);
+		debug(5,"stub o7_resourceRoutines lock object %d", resid);
 		break;
 	case 235:
 		resid = pop();
-		debug(1,"stub o7_resourceRoutines unlock object %d", resid);
+		debug(5,"stub o7_resourceRoutines unlock object %d", resid);
 		break;
 	default:
 		error("o7_resourceRoutines: default case %d", op);

Index: scumm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.cpp,v
retrieving revision 1.149
retrieving revision 1.150
diff -u -d -r1.149 -r1.150
--- scumm.cpp	26 Aug 2004 14:07:19 -0000	1.149
+++ scumm.cpp	26 Aug 2004 14:28:42 -0000	1.150
@@ -654,6 +654,7 @@
 	_heSndTimer = 0;
 	_heSndLoop = 0;
 	_heSndSoundFreq = 0;
+	memset(_timers, 0, sizeof(_timers));
 
 	//
 	// Init all VARS to 0xFF

Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.453
retrieving revision 1.454
diff -u -d -r1.453 -r1.454
--- scumm.h	26 Aug 2004 08:47:07 -0000	1.453
+++ scumm.h	26 Aug 2004 14:28:42 -0000	1.454
@@ -1036,6 +1036,7 @@
 	byte *_shadowPalette;
 	int _heSndSoundFreq, _heSndOffset, _heSndTimer, _heSndSoundId, _heSndLoop;
 	bool _skipDrawObject;
+	int _timers[4];
 
 protected:
 	int _shadowPaletteSize;





More information about the Scummvm-git-logs mailing list