[Scummvm-cvs-logs] CVS: scummvm/scumm script_v2.cpp,2.80,2.81 intern.h,2.87,2.88 vars.cpp,1.52,1.53

Max Horn fingolfin at users.sourceforge.net
Sun May 18 05:53:05 CEST 2003


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

Modified Files:
	script_v2.cpp intern.h vars.cpp 
Log Message:
more V2 sentence cleanup

Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v2.cpp,v
retrieving revision 2.80
retrieving revision 2.81
diff -u -d -r2.80 -r2.81
--- script_v2.cpp	18 May 2003 12:02:17 -0000	2.80
+++ script_v2.cpp	18 May 2003 12:52:26 -0000	2.81
@@ -829,11 +829,10 @@
 	if (a == 0xFB) {
 		_sentenceNum = 0;
 		stopScriptNr(SENTENCE_SCRIPT);
-		clearClickedStatus();
 		return;
 	}
 	if (a == 0xFC) {
-		clearClickedStatus();
+		resetSentence();
 		return;
 	}
 
@@ -1065,6 +1064,8 @@
 
 	_fullRedraw = 1;
 
+	resetSentence();
+
 	if (x != -1) {
 		a->startWalkActor(x, y, -1);
 	}
@@ -1134,7 +1135,7 @@
 	warning("TODO o2_cutscene()");
 	_sentenceNum = 0;
 	stopScriptNr(SENTENCE_SCRIPT);
-	clearClickedStatus();
+	resetSentence();
 }
 
 void Scumm_v2::o2_endCutscene() {
@@ -1213,6 +1214,10 @@
 	int cmd = getVarOrDirectWord(0x80);
 	int a2 = cmd >> 8;
 
+	if (cmd & 0xFF) {
+		_scummVars[21] = cmd & 0xFF;
+		printf("Set cmd %d\n", cmd & 0xFF);
+	}
 	if (a2 & 4) {
 		_userPut = 1;
 		warning("TODO: o2_cursorCommand(userface)");
@@ -1249,3 +1254,9 @@
 	warning("o2_dummy invoked (opcode %d)", _opcode);
 }
 
+void Scumm_v2::resetSentence() {
+	_scummVars[VAR_SENTENCE_VERB] = _scummVars[VAR_BACKUP_VERB];
+	_scummVars[VAR_SENTENCE_OBJECT1] = 0;
+	_scummVars[VAR_SENTENCE_OBJECT2] = 0;
+	_scummVars[29] = 0;
+}

Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.87
retrieving revision 2.88
diff -u -d -r2.87 -r2.88
--- intern.h	17 May 2003 18:42:31 -0000	2.87
+++ intern.h	18 May 2003 12:52:27 -0000	2.88
@@ -210,6 +210,8 @@
 	virtual void ifNotStateCommon(byte type);
 	virtual void setStateCommon(byte type);
 	virtual void clearStateCommon(byte type);
+	
+	void resetSentence();
 
 	/* Version 2 script opcodes */
 	void o2_actorFromPos();
@@ -278,6 +280,7 @@
 	byte VAR_SENTENCE_VERB;
 	byte VAR_SENTENCE_OBJECT1;
 	byte VAR_SENTENCE_OBJECT2;
+	byte VAR_BACKUP_VERB;
 };
 
 class Scumm_v4 : public Scumm_v3 {

Index: vars.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/vars.cpp,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- vars.cpp	17 May 2003 18:42:31 -0000	1.52
+++ vars.cpp	18 May 2003 12:52:27 -0000	1.53
@@ -127,6 +127,7 @@
 	VAR_CLICK_AREA = 32;
 	VAR_ROOM_RESOURCE = 36;
 	VAR_LAST_SOUND = 37;
+	VAR_BACKUP_VERB = 38;
 	VAR_KEYPRESS = 39;
 	VAR_CUTSCENEEXIT_KEY = 40;
 	VAR_TALK_ACTOR = 41;





More information about the Scummvm-git-logs mailing list