[Scummvm-cvs-logs] SF.net SVN: scummvm: [24910] scummvm/trunk/engines/scumm

cyx at users.sourceforge.net cyx at users.sourceforge.net
Thu Dec 21 16:09:15 CET 2006


Revision: 24910
          http://scummvm.svn.sourceforge.net/scummvm/?rev=24910&view=rev
Author:   cyx
Date:     2006-12-21 07:09:13 -0800 (Thu, 21 Dec 2006)

Log Message:
-----------
fixed bug #1620023 (script calls putActorAtXY with y == -1)

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/actor.cpp
    scummvm/trunk/engines/scumm/actor.h
    scummvm/trunk/engines/scumm/debugger.cpp
    scummvm/trunk/engines/scumm/script_c64.cpp

Modified: scummvm/trunk/engines/scumm/actor.cpp
===================================================================
--- scummvm/trunk/engines/scumm/actor.cpp	2006-12-21 02:08:53 UTC (rev 24909)
+++ scummvm/trunk/engines/scumm/actor.cpp	2006-12-21 15:09:13 UTC (rev 24910)
@@ -878,13 +878,6 @@
 }
 
 void Actor::putActor(int dstX, int dstY, int newRoom) {
-	if (dstX == -1)
-		dstX = _pos.x;
-	if (dstY == -1)
-		dstY = _pos.y;
-	if (newRoom == -1)
-		newRoom = _room;
-
 	if (_visible && _vm->_currentRoom != newRoom && _vm->getTalkingActor() == _number) {
 		_vm->stopTalk();
 	}
@@ -1712,7 +1705,7 @@
 		// Work out the screen co-ordinates of the actor
 		int x = _actors[value].getPos().x - (camera._cur.x - (_screenWidth >> 1));
 		int y = _actors[value]._top - (camera._cur.y - (_screenHeight >> 1));
-		
+
 		// Set the focus area to the calculated position
 		// TODO: Make the size adjust depending on what it's focusing on.
 		Common::Rect rect(x - 96, y - 64, x + 96, y + 64);

Modified: scummvm/trunk/engines/scumm/actor.h
===================================================================
--- scummvm/trunk/engines/scumm/actor.h	2006-12-21 02:08:53 UTC (rev 24909)
+++ scummvm/trunk/engines/scumm/actor.h	2006-12-21 15:09:13 UTC (rev 24910)
@@ -153,18 +153,18 @@
 		Common::Point dest;           // Final destination point
 		byte destbox;                 // Final destination box
 		int16 destdir;                // Final destination, direction to face at
-	
+
 		Common::Point cur;            // Last position
 		byte curbox;                  // Last box
-	
+
 		Common::Point next;           // Next position on our way to the destination, i.e. our intermediate destination
-	
+
 		Common::Point point3;
 		int32 deltaXFactor, deltaYFactor;
 		uint16 xfrac, yfrac;
 	};
-	
 
+
 	byte _palette[256];
 	int _elevation;
 	uint16 _facing;
@@ -186,7 +186,16 @@
 	void showActor();
 
 	void initActor(int mode);
-	void putActor(int x = -1, int y = -1, int room = -1);
+
+	void putActor() {
+		putActor(_pos.x, _pos.y, _room);
+	}
+
+	void putActor(int x, int y) {
+		putActor(x, y, _room);
+	}
+
+	void putActor(int x, int y, int room);
 	void setActorWalkSpeed(uint newSpeedX, uint newSpeedY);
 protected:
 	int calcMovementFactor(const Common::Point& next);

Modified: scummvm/trunk/engines/scumm/debugger.cpp
===================================================================
--- scummvm/trunk/engines/scumm/debugger.cpp	2006-12-21 02:08:53 UTC (rev 24909)
+++ scummvm/trunk/engines/scumm/debugger.cpp	2006-12-21 15:09:13 UTC (rev 24910)
@@ -383,11 +383,11 @@
 		a->_ignoreBoxes = (value > 0);
 		DebugPrintf("Actor[%d].ignoreBoxes = %d\n", actnum, a->_ignoreBoxes);
 	} else if (!strcmp(argv[2], "x")) {
-		a->putActor(value, -1, -1);
+		a->putActor(value, a->getPos().y, a->_room);
 		DebugPrintf("Actor[%d].x = %d\n", actnum, a->getPos().x);
 		_vm->_fullRedraw = true;
 	} else if (!strcmp(argv[2], "y")) {
-		a->putActor(-1, value, -1);
+		a->putActor(a->getPos().x, value, a->_room);
 		DebugPrintf("Actor[%d].y = %d\n", actnum, a->getPos().y);
 		_vm->_fullRedraw = true;
 	} else if (!strcmp(argv[2], "_elevation")) {

Modified: scummvm/trunk/engines/scumm/script_c64.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script_c64.cpp	2006-12-21 02:08:53 UTC (rev 24909)
+++ scummvm/trunk/engines/scumm/script_c64.cpp	2006-12-21 15:09:13 UTC (rev 24910)
@@ -749,7 +749,7 @@
 		y = 60;
 	}
 
-	a->putActor(x, y);
+	a->putActor(x, y, a->_room);
 }
 
 void ScummEngine_c64::o_pickupObject() {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list