summaryrefslogtreecommitdiff
path: root/src/data
diff options
context:
space:
mode:
authorcbt6 <91667135+cbt6@users.noreply.github.com>2021-11-03 00:28:49 +0800
committercbt6 <91667135+cbt6@users.noreply.github.com>2021-11-03 01:50:47 +0800
commita2c2d7e230436f208e0d5e7aa3226310a5f6cc42 (patch)
treeb87b5abff4432321308cdd94926cde5657cf92cb /src/data
parent47286d1ecb526c989d38e6e2e1c5cf80b2c5ec3f (diff)
Label indexes for movement speeds
Diffstat (limited to 'src/data')
-rwxr-xr-xsrc/data/object_events/movement_action_func_tables.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/data/object_events/movement_action_func_tables.h b/src/data/object_events/movement_action_func_tables.h
index 4df07be0d..97dace044 100755
--- a/src/data/object_events/movement_action_func_tables.h
+++ b/src/data/object_events/movement_action_func_tables.h
@@ -602,12 +602,20 @@ u8 (*const gMovementActionFuncs_FaceRight[])(struct ObjectEvent *, struct Sprite
MovementAction_PauseSpriteAnim,
};
+enum {
+ MOVE_SPEED_NORMAL, // walking
+ MOVE_SPEED_FAST_1, // running / surfing / sliding (ice tile)
+ MOVE_SPEED_FAST_2, // water current / acro bike
+ MOVE_SPEED_FASTER, // mach bike's max speed
+ MOVE_SPEED_FASTEST,
+};
+
static u8 (*const sDirectionAnimFuncsBySpeed[])(u8) = {
- GetMoveDirectionAnimNum,
- GetMoveDirectionFastAnimNum,
- GetMoveDirectionFastAnimNum,
- GetMoveDirectionFasterAnimNum,
- GetMoveDirectionFastestAnimNum,
+ [MOVE_SPEED_NORMAL] = GetMoveDirectionAnimNum,
+ [MOVE_SPEED_FAST_1] = GetMoveDirectionFastAnimNum,
+ [MOVE_SPEED_FAST_2] = GetMoveDirectionFastAnimNum,
+ [MOVE_SPEED_FASTER] = GetMoveDirectionFasterAnimNum,
+ [MOVE_SPEED_FASTEST] = GetMoveDirectionFastestAnimNum,
};
u8 (*const gMovementActionFuncs_WalkSlowDiagonalUpLeft[])(struct ObjectEvent *, struct Sprite *) = {