[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.229.2.3,1.229.2.4 script_v5.cpp,1.226.2.1,1.226.2.2 script_v6.cpp,1.293.2.7,1.293.2.8 scumm.h,1.369.2.1,1.369.2.2 scummvm.cpp,2.577.2.7,2.577.2.8 string.cpp,1.193.2.2,1.193.2.3

Max Horn fingolfin at users.sourceforge.net
Sun Apr 11 14:11:10 CEST 2004


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

Modified Files:
      Tag: branch-0-6-0
	actor.cpp script_v5.cpp script_v6.cpp scumm.h scummvm.cpp 
	string.cpp 
Log Message:
backported various small changes from HEAD to 0.6.0 branch

Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.229.2.3
retrieving revision 1.229.2.4
diff -u -d -r1.229.2.3 -r1.229.2.4
--- actor.cpp	16 Mar 2004 23:51:34 -0000	1.229.2.3
+++ actor.cpp	11 Apr 2004 20:56:41 -0000	1.229.2.4
@@ -75,6 +75,8 @@
 		_pos.x = 0;
 		_pos.y = 0;
 		facing = 180;
+		if (_vm->_version >= 7)
+			visible = false;
 	} else if (mode == 2) {
 		facing = 180;
 	}
@@ -99,9 +101,11 @@
 
 	setActorWalkSpeed(8, 2);
 	animSpeed = 0;
+	if (_vm->_version >= 6)
+		animProgress = 0;
 
 	ignoreBoxes = false;
-	forceClip = 0;
+	forceClip = (_vm->_version >= 7) ? 100 : 0;
 	ignoreTurns = false;
 	flip = 0;
 
@@ -562,8 +566,8 @@
 }
 
 void Actor::putActor(int dstX, int dstY, byte newRoom) {
-	if (visible && _vm->_currentRoom != newRoom && _vm->talkingActor() == number) {
-		_vm->clearMsgQueue();
+	if (visible && _vm->_currentRoom != newRoom && _vm->getTalkingActor() == number) {
+		_vm->stopTalk();
 	}
 
 	// HACK: The green transparency of the tank in the Hall of Oddities is
@@ -784,14 +788,14 @@
 
 // V1 Maniac doesn't have a ScummVar for VAR_TALK_ACTOR, and just uses
 // an internal variable. Emulate this to prevent overwriting script vars...
-int ScummEngine::talkingActor() {
+int ScummEngine::getTalkingActor() {
 	if (_gameId == GID_MANIAC && _version == 1)
 		return _V1_talkingActor;
 	else
 		return VAR(VAR_TALK_ACTOR);
 }
 
-void ScummEngine::talkingActor(int value) {
+void ScummEngine::setTalkingActor(int value) {
 	if (_gameId == GID_MANIAC && _version == 1)
 		_V1_talkingActor = value;
 	else
@@ -1155,7 +1159,7 @@
 	if (_actorToPrintStrFor == 0xFF) {
 		if (!_keepText)
 			stopTalk();
-		talkingActor(0xFF);
+		setTalkingActor(0xFF);
 	} else {
 		int oldact;
 		
@@ -1171,21 +1175,21 @@
 		} else {
 			if (!_keepText)
 				stopTalk();
-			talkingActor(a->number);
+			setTalkingActor(a->number);
 			if (!_string[0].no_talk_anim) {
 				a->startAnimActor(a->talkStartFrame);
 				_useTalkAnims = true;
 			}
-			oldact = talkingActor();
+			oldact = getTalkingActor();
 		}
 		if (oldact >= 0x80)
 			return;
 	}
 
-	if (((_gameId == GID_MANIAC) && (_version == 1)) || talkingActor() > 0x7F) {
+	if (((_gameId == GID_MANIAC) && (_version == 1)) || getTalkingActor() > 0x7F) {
 		_charsetColor = (byte)_string[0].color;
 	} else {
-		a = derefActor(talkingActor(), "actorTalk(2)");
+		a = derefActor(getTalkingActor(), "actorTalk(2)");
 		_charsetColor = a->talkColor;
 	}
 	_charsetBufPos = 0;
@@ -1205,7 +1209,7 @@
 	_haveMsg = 0;
 	_talkDelay = 0;
 
-	act = talkingActor();
+	act = getTalkingActor();
 	if (act && act < 0x80) {
 		Actor *a = derefActor(act, "stopTalk");
 		if ((a->isInCurrentRoom() && _useTalkAnims) || (_features & GF_NEW_COSTUMES)) {
@@ -1213,10 +1217,10 @@
 			_useTalkAnims = false;
 		}
 		if (!(_features & GF_HUMONGOUS))
-			talkingActor(0xFF);
+			setTalkingActor(0xFF);
 	}
 	if (_features & GF_HUMONGOUS)
-		talkingActor(0);
+		setTalkingActor(0);
 	_keepText = false;
 	_charset->restoreCharsetBg();
 }

Index: script_v5.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v5.cpp,v
retrieving revision 1.226.2.1
retrieving revision 1.226.2.2
diff -u -d -r1.226.2.1 -r1.226.2.2
--- script_v5.cpp	27 Mar 2004 18:05:39 -0000	1.226.2.1
+++ script_v5.cpp	11 Apr 2004 20:56:49 -0000	1.226.2.2
@@ -1648,7 +1648,7 @@
 
 	a = derefActor(act, "o5_putActorInRoom");
 	
-	if (a->visible && _currentRoom != room && talkingActor() == a->number) {
+	if (a->visible && _currentRoom != room && getTalkingActor() == a->number) {
 		clearMsgQueue();
 	}
 	a->room = room;

Index: script_v6.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6.cpp,v
retrieving revision 1.293.2.7
retrieving revision 1.293.2.8
diff -u -d -r1.293.2.7 -r1.293.2.8
--- script_v6.cpp	5 Mar 2004 11:13:56 -0000	1.293.2.7
+++ script_v6.cpp	11 Apr 2004 20:56:49 -0000	1.293.2.8
@@ -1166,7 +1166,7 @@
 	if (room == 0xFF || room == 0x7FFFFFFF) {
 		room = a->room;
 	} else {
-		if (a->visible && _currentRoom != room && talkingActor() == a->number) {
+		if (a->visible && _currentRoom != room && getTalkingActor() == a->number) {
 			clearMsgQueue();
 		}
 		if (room != 0)

Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.369.2.1
retrieving revision 1.369.2.2
diff -u -d -r1.369.2.1 -r1.369.2.2
--- scumm.h	24 Feb 2004 00:44:16 -0000	1.369.2.1
+++ scumm.h	11 Apr 2004 20:56:50 -0000	1.369.2.2
@@ -771,8 +771,8 @@
 	int16 _talkDelay;
 	void actorTalk();
 	void stopTalk();
-	int talkingActor();		// Wrapper around VAR_TALK_ACTOR for V1 Maniac
-	void talkingActor(int variable);
+	int getTalkingActor();		// Wrapper around VAR_TALK_ACTOR for V1 Maniac
+	void setTalkingActor(int variable);
 
 	// Costume class
 	void cost_decodeData(Actor *a, int frame, uint usemask);

Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/Attic/scummvm.cpp,v
retrieving revision 2.577.2.7
retrieving revision 2.577.2.8
diff -u -d -r2.577.2.7 -r2.577.2.8
--- scummvm.cpp	11 Mar 2004 03:37:43 -0000	2.577.2.7
+++ scummvm.cpp	11 Apr 2004 20:56:50 -0000	2.577.2.8
@@ -909,7 +909,7 @@
 	// if (_gameId==GID_MONKEY2 && _bootParam == 0)
 	//	_bootParam = 10001;
 
-	if (_gameId == GID_INDY4 && _bootParam == 0) {
+	if (!_copyProtection && _gameId == GID_INDY4 && _bootParam == 0) {
 		_bootParam = -7873;
 	}
 
@@ -1212,8 +1212,11 @@
 		VAR(VAR_CURRENT_LIGHTS) = LIGHTMODE_actor_base | LIGHTMODE_actor_color | LIGHTMODE_screen;
 	}
 	
+	if (_gameId == GID_MONKEY || _gameId == GID_MONKEY_SEGA)
+		_scummVars[74] = 1225;
+	
 	VAR(VAR_CHARINC) = 4;
-	talkingActor(0);
+	setTalkingActor(0);
 }
 
 #pragma mark -
@@ -1327,8 +1330,8 @@
 		VAR(VAR_VIRT_MOUSE_Y) = _virtualMouse.y;
 		VAR(VAR_MOUSE_X) = _mouse.x;
 		VAR(VAR_MOUSE_Y) = _mouse.y;
-		if ((_features & GF_MACINTOSH) && (_version == 3))  {
-			// This is for the Mac version of Indy3/Loom
+		if (!((_features & GF_MACINTOSH) && (_version == 3))) {
+			// This is NOT for the Mac version of Indy3/Loom
 			VAR(VAR_DEBUGMODE) = _debugMode;
 		}
 	}
@@ -1627,7 +1630,7 @@
 			}
 
 			if (_keyPressed >= 512)
-				warning("_keyPressed > 512 (%d)", _keyPressed);
+				debugC(DEBUG_GENERAL, "_keyPressed > 512 (%d)", _keyPressed);
 			else
 				_keyDownMap[_keyPressed] = true;
 			break;
@@ -1636,7 +1639,7 @@
 			// FIXME: for some reason OSystem::KBD_ALT is set sometimes
 			// possible to a bug in sdl-common.cpp
 			if (event.kbd.ascii >= 512)
-				warning("keyPressed > 512 (%d)", event.kbd.ascii);
+				debugC(DEBUG_GENERAL, "keyPressed > 512 (%d)", event.kbd.ascii);
 			else
 				_keyDownMap[event.kbd.ascii] = false;
 			break;
@@ -2075,7 +2078,7 @@
 			a->moving = 0;
 		}
 	} else if (_version >= 7) {
-		if (a) {
+		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.
@@ -2489,14 +2492,11 @@
 	}
 	_sound->setupSound();               // Reinit sound engine
 
-	if (_gameId == GID_MONKEY || _gameId == GID_MONKEY_SEGA)
-		_scummVars[74] = 1225;
-
 	// Re-run bootscript
 	int args[16];
 	memset(args, 0, sizeof(args));
 	args[0] = _bootParam;	
-	if (_gameId == GID_MANIAC && _version == 1 && _demoMode)
+	if (_gameId == GID_MANIAC && _demoMode)
 		runScript(9, 0, 0, args);
 	else
 		runScript(1, 0, 0, args);
@@ -2504,7 +2504,7 @@
 
 void ScummEngine::startManiac() {
 	warning("stub startManiac()");
-	displayError("Alright", "Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' directory inside the Tentacle game directory.");
+	displayError(0, "Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' directory inside the Tentacle game directory.");
 }
 
 #pragma mark -

Index: string.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/string.cpp,v
retrieving revision 1.193.2.2
retrieving revision 1.193.2.3
diff -u -d -r1.193.2.2 -r1.193.2.3
--- string.cpp	3 Apr 2004 23:01:44 -0000	1.193.2.2
+++ string.cpp	11 Apr 2004 20:56:51 -0000	1.193.2.3
@@ -103,14 +103,14 @@
 	if (!_haveMsg)
 		return;
 
-	if (!(_features & GF_NEW_CAMERA) && !(_gameId == GID_ZAK256 && talkingActor() == 0xFF)) {
+	if (!(_features & GF_NEW_CAMERA) && !(_gameId == GID_ZAK256 && getTalkingActor() == 0xFF)) {
 		if ((camera._dest.x / 8) != (camera._cur.x / 8) || camera._cur.x != camera._last.x)
 			return;
 	}
 
 	a = NULL;
-	if (talkingActor() != 0xFF)
-		a = derefActorSafe(talkingActor(), "CHARSET_1");
+	if (getTalkingActor() != 0xFF)
+		a = derefActorSafe(getTalkingActor(), "CHARSET_1");
 
 	if (a && a->isInCurrentRoom() && _string[0].overhead != 0) {
 		if (_version <= 5) {





More information about the Scummvm-git-logs mailing list