aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--actor.cpp8
-rw-r--r--scummvm.cpp27
2 files changed, 33 insertions, 2 deletions
diff --git a/actor.cpp b/actor.cpp
index bd37a07ef2..835c6f2140 100644
--- a/actor.cpp
+++ b/actor.cpp
@@ -229,7 +229,7 @@ int Actor::remapDirection(int dir)
}
}
/* 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 @@ void Actor::startWalkAnim(int cmd, int angle)
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;
diff --git a/scummvm.cpp b/scummvm.cpp
index f4ed7f0cc0..e77ad1216d 100644
--- a/scummvm.cpp
+++ b/scummvm.cpp
@@ -1093,7 +1093,32 @@ int Scumm::fromSimpleDir(int dirType, int dir)
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, ...)