[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.229.2.5,1.229.2.6 intern.h,2.138.2.3,2.138.2.4 script_v6.cpp,1.293.2.13,1.293.2.14 script_v8.cpp,2.229.2.3,2.229.2.4 scumm.h,1.369.2.5,1.369.2.6 scummvm.cpp,2.577.2.18,2.577.2.19 sound.cpp,1.320.2.4,1.320.2.5 vars.cpp,1.71.2.3,1.71.2.4

Travis Howell kirben at users.sourceforge.net
Wed Jul 7 03:10:45 CEST 2004


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

Modified Files:
      Tag: branch-0-6-0
	actor.cpp intern.h script_v6.cpp script_v8.cpp scumm.h 
	scummvm.cpp sound.cpp vars.cpp 
Log Message:

Back port various bug fixes.


Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.229.2.5
retrieving revision 1.229.2.6
diff -u -d -r1.229.2.5 -r1.229.2.6
--- actor.cpp	29 Jun 2004 11:11:30 -0000	1.229.2.5
+++ actor.cpp	7 Jul 2004 10:09:28 -0000	1.229.2.6
@@ -429,7 +429,7 @@
 }
 
 void Actor::startAnimActor(int f) {
-	if (_vm->_version >= 7) {
+	if (_vm->_version >= 7 && !((_vm->_gameId == GID_FT) && (_vm->_features & GF_DEMO) && (_vm->_features & GF_PC))) {
 		switch (f) {
 		case 1001:
 			f = initFrame;
@@ -498,7 +498,7 @@
 void Actor::animateActor(int anim) {
 	int cmd, dir;
 
-	if (_vm->_version >= 7) {
+	if (_vm->_version >= 7 && !((_vm->_gameId == GID_FT) && (_vm->_features & GF_DEMO) && (_vm->_features & GF_PC))) {
 
 		if (anim == 0xFF)
 			anim = 2000;
@@ -803,6 +803,17 @@
 		VAR(VAR_TALK_ACTOR) = value;
 }
 
+void ScummEngine::putActors() {
+	Actor *a;
+	int i;
+
+	for (i = 1; i < _numActors; i++) {
+		a = &_actors[i];
+		if (a && a->isInCurrentRoom())
+			a->putActor(a->_pos.x, a->_pos.y, a->room);
+	}
+}
+
 void ScummEngine::showActors() {
 	int i;
 
@@ -1655,8 +1666,13 @@
 	int r, g, b;
 	byte akpl_color;
 
-	if (!isInCurrentRoom() || costume < 1 || costume >= _vm->_numCostumes - 1)
-			return;
+	if (!isInCurrentRoom()) {
+		debugC(DEBUG_ACTORS, "Remap actor %d not in current room", number);
+		return;
+	} else if (costume < 1 || costume >= _vm->_numCostumes - 1) {
+		debugC(DEBUG_ACTORS, "Remap actor %d invalid costume %d", number, costume);
+		return;
+	}
 
 	akos = _vm->getResourceAddress(rtCostume, costume);
 	if (!akos) {
@@ -1666,7 +1682,7 @@
 
 	akpl = findResource(MKID('AKPL'), akos);
 	if (!akpl) {
-		warning("Can't remap actor %d, costume %d doesn't contain an AKPL block", number, costume);
+		debugC(DEBUG_ACTORS, "Can't remap actor %d costume %d doesn't contain an RGB block", number, costume);
 		return;
 	}
 

Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.138.2.3
retrieving revision 2.138.2.4
diff -u -d -r2.138.2.3 -r2.138.2.4
--- intern.h	20 Jun 2004 14:43:22 -0000	2.138.2.3
+++ intern.h	7 Jul 2004 10:09:28 -0000	2.138.2.4
@@ -659,7 +659,6 @@
 	void o8_blastText();
 
 	void o8_cursorCommand();
-	void o8_createBoxMatrix();
 	void o8_resourceRoutines();
 	void o8_roomOps();
 	void o8_actorOps();

Index: script_v6.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6.cpp,v
retrieving revision 1.293.2.13
retrieving revision 1.293.2.14
diff -u -d -r1.293.2.13 -r1.293.2.14
--- script_v6.cpp	1 Jul 2004 06:01:57 -0000	1.293.2.13
+++ script_v6.cpp	7 Jul 2004 10:09:28 -0000	1.293.2.14
@@ -1483,6 +1483,9 @@
 
 void ScummEngine_v6::o6_createBoxMatrix() {
 	createBoxMatrix();
+
+	if ((_gameId == GID_DIG) || (_gameId == GID_CMI))
+		putActors();
 }
 
 void ScummEngine_v6::o6_resourceRoutines() {
@@ -3143,8 +3146,8 @@
 	assert(matrix);
 	memcpy(matrix, boxm, mboxSize);
 
-	if(!(_features & GF_HUMONGOUS))
-		showActors();
+	if (_version == 7)
+		putActors();
 }
 
 void ScummEngine_v6::decodeParseString(int m, int n) {

Index: script_v8.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v8.cpp,v
retrieving revision 2.229.2.3
retrieving revision 2.229.2.4
diff -u -d -r2.229.2.3 -r2.229.2.4
--- script_v8.cpp	2 Jul 2004 05:23:49 -0000	2.229.2.3
+++ script_v8.cpp	7 Jul 2004 10:09:29 -0000	2.229.2.4
@@ -252,7 +252,7 @@
 		OPCODE(o6_pickupObject),
 		OPCODE(o6_setBoxFlags),
 		/* A8 */
-		OPCODE(o8_createBoxMatrix),
+		OPCODE(o6_createBoxMatrix),
 		OPCODE(o6_invalid),
 		OPCODE(o8_resourceRoutines),
 		OPCODE(o8_roomOps),
@@ -792,19 +792,6 @@
 	VAR(VAR_USERPUT) = _userPut;
 }
 
-void ScummEngine_v8::o8_createBoxMatrix() {
-	int i;
-	Actor *a;
-
-	createBoxMatrix();
-
-	for (i = 1; i < _numActors; i++) {
-		a = &_actors[i];
-		if (a && a->isInCurrentRoom())
-			a->adjustActorPos();
-	}
-}
-
 void ScummEngine_v8::o8_resourceRoutines() {
 	byte subOp = fetchScriptByte();
 	int resid = pop();

Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.369.2.5
retrieving revision 1.369.2.6
diff -u -d -r1.369.2.5 -r1.369.2.6
--- scumm.h	26 Jun 2004 09:18:28 -0000	1.369.2.5
+++ scumm.h	7 Jul 2004 10:09:30 -0000	1.369.2.6
@@ -757,6 +757,7 @@
 	void walkActors();
 	void playActorSounds();
 	void setActorRedrawFlags();
+	void putActors();
 	void showActors();
 	void resetActorBgs();
 	void processActors();

Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/Attic/scummvm.cpp,v
retrieving revision 2.577.2.18
retrieving revision 2.577.2.19
diff -u -d -r2.577.2.18 -r2.577.2.19
--- scummvm.cpp	1 Jul 2004 10:33:17 -0000	2.577.2.18
+++ scummvm.cpp	7 Jul 2004 10:09:30 -0000	2.577.2.19
@@ -1798,9 +1798,14 @@
 			VAR(VAR_RIGHTBTN_HOLD) = 1;
 			VAR(VAR_MOUSE_HOLD) += 2;
 		}
-	} else if (_version == 7) {
-		VAR(VAR_LEFTBTN_HOLD) = (_leftBtnPressed & msDown) != 0;
-		VAR(VAR_RIGHTBTN_HOLD) = (_rightBtnPressed & msDown) != 0;
+	} else if (_version >= 6 && !(_features & GF_HUMONGOUS)) {
+		VAR(VAR_LEFTBTN_DOWN) = (_leftBtnPressed & msClicked) != 0;
+		VAR(VAR_RIGHTBTN_DOWN) = (_rightBtnPressed & msClicked) != 0;
+
+		if (_version == 7) {
+			VAR(VAR_LEFTBTN_HOLD) = (_leftBtnPressed & msDown) != 0;
+			VAR(VAR_RIGHTBTN_HOLD) = (_rightBtnPressed & msDown) != 0;
+		}
 	}
 
 	_leftBtnPressed &= ~msClicked;
@@ -2094,23 +2099,6 @@
 			a->moving = 0;
 		}
 	} else if (_version >= 7) {
-		if ((_gameId == GID_DIG) && a) {
-			// FIXME: This hack mostly is there to fix the tomb/statue room
-			// in The Dig. What happens there is that when you enter, you are
-			// placed at object 399, coords (307,141), which is in box 25.
-			// But then the entry script locks that and other boxes. Hence
-			// after the entry script runs, you basically can only do one thing
-			// in that room, and that is to leave it - which means the game
-			// is unfinishable.
-			// By calling adjustActorPos, we can solve the problem in this case:
-			// there is a very close box (box 12) which contains point (307,144).
-			// If we call adjustActorPos, Commander Low is moved into that box,
-			// and we can go on. But aqudran looked this up in his IMB DB for
-			// The DIG; and nothing like this is done there. Also I am pretty
-			// sure this used to work in 0.3.1. So apparently something broke
-			// down here, and I have no clue what that might be :-/
-			a->adjustActorPos();
-		}
 		if (camera._follows) {
 			a = derefActor(camera._follows, "startScene: follows");
 			setCameraAt(a->_pos.x, a->_pos.y);

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.320.2.4
retrieving revision 1.320.2.5
diff -u -d -r1.320.2.4 -r1.320.2.5
--- sound.cpp	28 Jun 2004 09:28:58 -0000	1.320.2.4
+++ sound.cpp	7 Jul 2004 10:09:32 -0000	1.320.2.5
@@ -450,7 +450,7 @@
 			}
 		}
 
-		if ((!ConfMan.getBool("subtitles") && finished) || (finished && _vm->_talkDelay == 0)) {
+		if ((!ConfMan.getBool("subtitles") && finished && _vm->_version <= 6) || (finished && _vm->_talkDelay == 0)) {
 			_vm->stopTalk();
 		}
 	}

Index: vars.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/vars.cpp,v
retrieving revision 1.71.2.3
retrieving revision 1.71.2.4
diff -u -d -r1.71.2.3 -r1.71.2.4
--- vars.cpp	3 May 2004 10:57:49 -0000	1.71.2.3
+++ vars.cpp	7 Jul 2004 10:09:33 -0000	1.71.2.4
@@ -156,6 +156,15 @@
 
 	VAR_V6_SCREEN_WIDTH = 41;
 	VAR_V6_SCREEN_HEIGHT = 54;
+
+	if (!(_features & GF_HUMONGOUS)) {
+		VAR_SAVELOAD_SCRIPT = 61;
+		VAR_SAVELOAD_SCRIPT2 = 62;
+		VAR_LEFTBTN_DOWN = 74;
+		VAR_RIGHTBTN_DOWN = 75;
+
+	}
+
 	VAR_V6_EMSSPACE = 76;
 	VAR_RANDOM_NR = 118;
 	





More information about the Scummvm-git-logs mailing list