[Scummvm-cvs-logs] CVS: scummvm actor.cpp,1.69,1.70 object.cpp,1.69,1.70 script.cpp,1.59,1.60 scumm.h,1.165,1.166 scummvm.cpp,1.157,1.158

Vincent Hamm yazoo at users.sourceforge.net
Mon May 20 09:03:03 CEST 2002


Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv32601

Modified Files:
	actor.cpp object.cpp script.cpp scumm.h scummvm.cpp 
Log Message:
Temp removal of the actor walk script execution to fix dig's walking

Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/actor.cpp,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -d -r1.69 -r1.70
--- actor.cpp	20 May 2002 14:41:47 -0000	1.69
+++ actor.cpp	20 May 2002 16:02:29 -0000	1.70
@@ -624,6 +624,10 @@
 	moving = 0;
 	cost.animCounter2 = 0;
 
+	if (_scumm->_features & GF_AFTER_V7) {
+		stopActorMoving();
+	}
+	
 	flags = _scumm->getBoxFlags(walkbox);
 	if (flags & 7) {
 		turnToDirection(facing);
@@ -759,12 +763,12 @@
 	if (angle == -1)
 		angle = facing;
 
-	if (walk_script != 0) {
+/*	if (walk_script != 0) {
 		args[2] = angle;
 		args[0] = number;
 		args[1] = cmd;
 		_scumm->runScript(walk_script, 1, 0, args);
-	} else {
+	} else*/ {
 		switch (cmd) {
 		case 1:										/* start walk */
 			setActorDirection(angle);

Index: object.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/object.cpp,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -d -r1.69 -r1.70
--- object.cpp	14 May 2002 23:32:34 -0000	1.69
+++ object.cpp	20 May 2002 16:02:29 -0000	1.70
@@ -1176,7 +1176,7 @@
 	eo->areaY = _enqueue_c;
 	eo->areaWidth = _enqueue_d;
 	eo->areaHeight = _enqueue_e;
-	eo->posX = objectX;
+	eo->posX = objectX + (camera._cur.x & 7);
 	eo->posY = objectY;
 	if (objectWidth == 0) {
 		od = &_objs[getObjectIndex(objectNumber)];

Index: script.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/script.cpp,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- script.cpp	14 May 2002 23:32:34 -0000	1.59
+++ script.cpp	20 May 2002 16:02:29 -0000	1.60
@@ -276,7 +276,7 @@
 		_opcode = fetchScriptByte();
 		_scriptPointerStart = _scriptPointer;
 		vm.slot[_currentScript].didexec = 1;
-		debug(9, "Script %d: [%X] %s()", vm.slot[_currentScript].number, _opcode, _opcodes_lookup[_opcode]);
+		debug(8, "Script %d: [%X] %s()", vm.slot[_currentScript].number, _opcode, _opcodes_lookup[_opcode]);
 		op = getOpcode(_opcode);
 		(this->*op) ();
 	}
@@ -900,9 +900,6 @@
 
 		cmd = anim / 1000;
 		dir = anim % 1000;
-
-		/* temporary code */
-//    dir = newDirToOldDir(dir);
 
 		switch (cmd) {
 		case 2:

Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm.h,v
retrieving revision 1.165
retrieving revision 1.166
diff -u -d -r1.165 -r1.166
--- scumm.h	18 May 2002 20:12:41 -0000	1.165
+++ scumm.h	20 May 2002 16:02:29 -0000	1.166
@@ -72,7 +72,7 @@
 	ssRunning = 2
 };
 
-extern const uint16 many_direction_tab[18];
+extern const int16 many_direction_tab[18];
 extern const int16 many_direction_tab_2[16];
 extern const int bit_table[16];
 

Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scummvm.cpp,v
retrieving revision 1.157
retrieving revision 1.158
diff -u -d -r1.157 -r1.158
--- scummvm.cpp	19 May 2002 12:35:43 -0000	1.157
+++ scummvm.cpp	20 May 2002 16:02:29 -0000	1.158
@@ -1063,8 +1063,7 @@
 	return dirType ? 8 : 4;
 }
 
-// FIXME - is the value "530" in many_direction_tab really correct? Maybe it should be "289" ?
-const uint16 many_direction_tab[18] = {4, 8, 90-19, 90+19, 270-19, 530, 0, 0, 0, 0, 0+22, 90-18, 90+17, 180-23, 180+22, 270-18, 270+17, 360-23};
+const int16 many_direction_tab[18] = {4, 8, 71, 109, 251, 289, -1, -1, -1, -1, 22, 72, 107, 157, 202, 252, 287, 337};
 const int16 many_direction_tab_2[16] = {0, 90, 180, 270, -1, -1, -1, -1, 0, 45, 90, 135, 180, 225, 270, 315};
 const int bit_table[16] = {1,2,4,8,0x10,0x20,0x40,0x80,0x100,0x200,0x400,0x800,0x1000,0x2000,0x4000,0x8000};
 
@@ -1073,7 +1072,7 @@
 int Scumm::toSimpleDir(int dirType, int dir)
 {
 	int num = dirType ? 8 : 4, i;
-	const uint16 *dirtab = &many_direction_tab[dirType * 8 + 2];
+	const int16 *dirtab = &many_direction_tab[dirType * 8 + 2];
 	for (i = 1; i < num; i++, dirtab++) {
 		if (dir >= dirtab[0] && dir <= dirtab[1])
 			return i;
@@ -1087,6 +1086,7 @@
 {
 	if (!dirType)
 		dir += dir;
+
 	return dir * 45;
 }
 





More information about the Scummvm-git-logs mailing list