[Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.76,2.77 script_v2.cpp,2.43,2.44

Max Horn fingolfin at users.sourceforge.net
Sun May 4 10:44:01 CEST 2003


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

Modified Files:
	intern.h script_v2.cpp 
Log Message:
cleanup / fixes

Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.76
retrieving revision 2.77
diff -u -d -r2.76 -r2.77
--- intern.h	4 May 2003 13:00:41 -0000	2.76
+++ intern.h	4 May 2003 17:39:25 -0000	2.77
@@ -214,10 +214,8 @@
 	void o2_clearState02();
 	void o2_setState01();
 	void o2_clearState01();
-	void o2_assignVarByteIndirect();
 	void o2_assignVarWordIndirect();
 	void o2_assignVarByte();
-	void o2_assignVarWord();
 	void o2_setObjY();
 	void o2_getObjY();
 	void o2_setBitVar();
@@ -234,6 +232,7 @@
 	void o2_ifNotState01();
 	void o2_actorSet();
 	void o2_waitForActor();
+	void o2_waitForMessage();
 	void o2_waitForSentence();
 	void o2_restart();
 	void o2_drawObject();

Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v2.cpp,v
retrieving revision 2.43
retrieving revision 2.44
diff -u -d -r2.43 -r2.44
--- script_v2.cpp	4 May 2003 04:34:48 -0000	2.43
+++ script_v2.cpp	4 May 2003 17:39:25 -0000	2.44
@@ -225,7 +225,7 @@
 		/* 98 */
 		OPCODE(o2_restart),
 		OPCODE(o2_doSentence),
-		OPCODE(o2_assignVarWord),
+		OPCODE(o5_move),
 		OPCODE(o2_setBitVar),
 		/* 9C */
 		OPCODE(o5_startSound),
@@ -250,7 +250,7 @@
 		/* AC */
 		OPCODE(o2_drawSentence),
 		OPCODE(o5_putActorInRoom),
-		OPCODE(o2_waitForSentence),
+		OPCODE(o2_waitForMessage),
 		OPCODE(o2_ifNotState04),
 		/* B0 */
 		OPCODE(o2_matrixOps),
@@ -458,14 +458,9 @@
 	clearStateCommon(0x01);
 }
 
-void Scumm_v2::o2_assignVarByteIndirect() {
-	getResultPosIndirect();
-	setResult(fetchScriptByte());
-}
-
 void Scumm_v2::o2_assignVarWordIndirect() {
 	getResultPosIndirect();
-	setResult(fetchScriptWord());
+	setResult(getVarOrDirectWord(0x80));
 }
 
 void Scumm_v2::o2_assignVarByte() {
@@ -473,11 +468,6 @@
 	setResult(fetchScriptByte());
 }
 
-void Scumm_v2::o2_assignVarWord() {
-	getResultPos();
-	setResult(fetchScriptWord());
-}
-
 void Scumm_v2::o2_setObjY() {
 	int obj = getVarOrDirectWord(0x80);
 	int y = fetchScriptByte();
@@ -599,6 +589,22 @@
 	}
 }
 
+void Scumm_v2::o2_waitForMessage() {
+	
+	if (_vars[VAR_HAVE_MSG]) {
+		_scriptPointer--;
+		o5_breakHere();
+	}
+}
+
+void Scumm_v2::o2_waitForSentence() {
+	if (_sentenceNum && !isScriptInUse(2))
+		return;
+
+	_scriptPointer--;
+	o5_breakHere();
+}
+
 void Scumm_v2::o2_actorSet() {
 	int act = getVarOrDirectByte(0x80);
 	int arg = getVarOrDirectByte(0x40);
@@ -635,15 +641,6 @@
 		default:
 			warning("o2_actorSet: opcode %d not yet supported", _opcode);
 	}
-}
-
-void Scumm_v2::o2_waitForSentence() {
-	if (_sentenceNum)
-		if (!isScriptInUse(2))
-			return;
-
-	_scriptPointer--;
-	o5_breakHere();
 }
 
 void Scumm_v2::o2_restart() {





More information about the Scummvm-git-logs mailing list