[Scummvm-cvs-logs] CVS: scummvm/scumm script.cpp,1.91,1.92 script_v2.cpp,2.81,2.82 scumm.h,1.199,1.200

Max Horn fingolfin at users.sourceforge.net
Sun May 18 16:47:13 CEST 2003


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

Modified Files:
	script.cpp script_v2.cpp scumm.h 
Log Message:
more cleanup

Index: script.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script.cpp,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -d -r1.91 -r1.92
--- script.cpp	18 May 2003 23:19:43 -0000	1.91
+++ script.cpp	18 May 2003 23:46:30 -0000	1.92
@@ -484,12 +484,12 @@
 }
 
 void Scumm::push(int a) {
-	assert(_scummStackPos >= 0 && (unsigned int)_scummStackPos < ARRAYSIZE(_scummStack));
+	assert(_scummStackPos >= 0 && _scummStackPos < ARRAYSIZE(_scummStack));
 	_scummStack[_scummStackPos++] = a;
 }
 
 int Scumm::pop() {
-	if ((_scummStackPos < 1) || ((unsigned int)_scummStackPos > ARRAYSIZE(_scummStack))) {
+	if (_scummStackPos < 1 || _scummStackPos > ARRAYSIZE(_scummStack)) {
 		error("No items on stack to pop() for %s (0x%X) at [%d-%d]", getOpcodeDesc(_opcode), _opcode, _roomResource, vm.slot[_currentScript].number);
 	}
 
@@ -556,7 +556,7 @@
 		}
 	}
 
-	for (i = 0; i < 6; i++)
+	for (i = 0; i < NUM_SENTENCE; i++)
 		_sentence[i].freezeCount++;
 
 	if (vm.cutSceneScriptIndex != 0xFF) {
@@ -575,7 +575,7 @@
 		}
 	}
 
-	for (i = 0; i < 6; i++) {
+	for (i = 0; i < NUM_SENTENCE; i++) {
 		if (_sentence[i].freezeCount > 0)
 			_sentence[i].freezeCount--;
 	}
@@ -594,7 +594,7 @@
 	_currentScript = 0xFF;
 	for (_curExecScript = 0; _curExecScript < NUM_SCRIPT_SLOT; _curExecScript++) {
 		if (vm.slot[_curExecScript].status == ssRunning && vm.slot[_curExecScript].didexec == 0) {
-			_currentScript = (char)_curExecScript;
+			_currentScript = (byte)_curExecScript;
 			getScriptBaseAddress();
 			getScriptEntryPoint();
 			executeScript();

Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v2.cpp,v
retrieving revision 2.81
retrieving revision 2.82
diff -u -d -r2.81 -r2.82
--- script_v2.cpp	18 May 2003 12:52:26 -0000	2.81
+++ script_v2.cpp	18 May 2003 23:46:30 -0000	2.82
@@ -920,8 +920,8 @@
 	y = getVarOrDirectByte(0x20) * 2;
 
 	assert(a);
-	a->ignoreBoxes = true;			// FIXME: Disabling walkboxes
-	a->startWalkActor(x, y, -1);		// for now, just to debug the intro
+	a->ignoreBoxes = true;	// FIXME: Disabling walkboxes for now, just to debug the intro
+	a->startWalkActor(x, y, -1);
 }
 
 void Scumm_v2::o2_putActor() {

Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.199
retrieving revision 1.200
diff -u -d -r1.199 -r1.200
--- scumm.h	18 May 2003 23:37:44 -0000	1.199
+++ scumm.h	18 May 2003 23:46:30 -0000	1.200
@@ -56,6 +56,7 @@
 enum {
 	NUM_SCRIPT_SLOT = 40,
 	NUM_LOCALSCRIPT = 60,
+	NUM_SENTENCE = 6,
 	NUM_SHADOW_PALETTE = 8,
 	KEY_SET_OPTIONS = 3456 // WinCE
 };
@@ -724,7 +725,7 @@
 	/* Actor talking stuff */
 	byte _actorToPrintStrFor;
 	int _sentenceNum;
-	SentenceTab _sentence[6];
+	SentenceTab _sentence[NUM_SENTENCE];
 	StringTab _string[6];
 	void actorTalk();
 	void stopTalk();





More information about the Scummvm-git-logs mailing list