[Scummvm-cvs-logs] CVS: scummvm actor.cpp,1.70,1.71 scummvm.cpp,1.158,1.159
Vincent Hamm
yazoo at users.sourceforge.net
Wed May 22 05:25:06 CEST 2002
Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv18187
Modified Files:
actor.cpp scummvm.cpp
Log Message:
Fixed a bit of dig's walking bugs. But I'm still diabling the walk script since it's causing troubles..
Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/actor.cpp,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -d -r1.70 -r1.71
--- actor.cpp 20 May 2002 16:02:29 -0000 1.70
+++ actor.cpp 22 May 2002 12:24:48 -0000 1.71
@@ -229,7 +229,7 @@
}
}
/* Or 1024 in to signal direction interpolation should be done */
- return Scumm::normalizeAngle(dir) | 1024;
+ return Scumm::normalizeAngle(dir)/* | 1024*/;
}
int Actor::updateActorDirection()
@@ -763,6 +763,12 @@
if (angle == -1)
angle = facing;
+/*FIXME: (yazoo): the walk script are buggy in dig causing
+ * troubles while walking. It's disabled until I can
+ * find a proper fix
+ * note: walk scripts aren't required to make the game
+ * work as usual */
+
/* if (walk_script != 0) {
args[2] = angle;
args[0] = number;
Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scummvm.cpp,v
retrieving revision 1.158
retrieving revision 1.159
diff -u -d -r1.158 -r1.159
--- scummvm.cpp 20 May 2002 16:02:29 -0000 1.158
+++ scummvm.cpp 22 May 2002 12:24:48 -0000 1.159
@@ -1093,7 +1093,32 @@
int Scumm::normalizeAngle(int angle)
{
- return (angle + 360) % 360;
+ int temp;
+
+ temp = (angle + 360) % 360;
+
+/* (yaz0r) there is probably a much better way to do this */
+
+ if(temp >=0 && temp <22)
+ return(0);
+ if(temp >=22 && temp <72)
+ return(45);
+ if(temp >=72 && temp <107)
+ return(90);
+ if(temp >=107 && temp <157)
+ return(135);
+ if(temp >=157 && temp <202)
+ return(180);
+ if(temp >=202 && temp <252)
+ return(225);
+ if(temp >=252 && temp <287)
+ return(270);
+ if(temp >=287 && temp <337)
+ return(315);
+ if(temp >=337 && temp <=360)
+ return(0);
+
+ return(temp);
}
void NORETURN CDECL error(const char *s, ...)
More information about the Scummvm-git-logs
mailing list