aboutsummaryrefslogtreecommitdiff
path: root/akos.cpp
diff options
context:
space:
mode:
authorMax Horn2002-07-02 20:08:42 +0000
committerMax Horn2002-07-02 20:08:42 +0000
commita0964cb56228dee13f238001a8d1e043cecce9aa (patch)
tree07d0a9d65d15917ba881b76a978395c5cad51e57 /akos.cpp
parentf28b1937a6bee7846d704be4bb5ccaabcf4470d5 (diff)
downloadscummvm-rg350-a0964cb56228dee13f238001a8d1e043cecce9aa.tar.gz
scummvm-rg350-a0964cb56228dee13f238001a8d1e043cecce9aa.tar.bz2
scummvm-rg350-a0964cb56228dee13f238001a8d1e043cecce9aa.zip
got rid of akos_findManyDirection; simplified akos_frameToAnim a lot
svn-id: r4447
Diffstat (limited to 'akos.cpp')
-rw-r--r--akos.cpp34
1 files changed, 3 insertions, 31 deletions
diff --git a/akos.cpp b/akos.cpp
index a14a09496b..22ae1c5afc 100644
--- a/akos.cpp
+++ b/akos.cpp
@@ -39,40 +39,12 @@ bool Scumm::akos_hasManyDirections(Actor * a)
return 0;
}
-int Scumm::akos_findManyDirection(int16 ManyDirection, uint16 facing)
-{
- int32 direction;
- int32 temp;
-
- temp = many_direction_tab[ManyDirection];
- direction = temp + ManyDirection * 8;
- do {
- if (facing >= many_direction_tab[direction + 1]) {
- if (facing <= many_direction_tab[direction + 2]) {
- return (temp);
- }
- }
-
- --temp;
- --direction;
- } while (temp);
-
- return (temp);
-}
-
-
int Scumm::akos_frameToAnim(Actor * a, int frame)
{
- bool ManyDirection;
-
- ManyDirection = akos_hasManyDirections(a);
-
- if (ManyDirection) {
- frame *= many_direction_tab[ManyDirection];
- return akos_findManyDirection(ManyDirection, a->facing) + frame;
- } else {
+ if (akos_hasManyDirections(a))
+ return toSimpleDir(1, a->facing) + frame * 8;
+ else
return newDirToOldDir(a->facing) + frame * 4;
- }
}
void Scumm::akos_decodeData(Actor * a, int frame, uint usemask)