Use enums for jump distances

This commit is contained in:
cbt6
2021-11-28 11:56:26 +08:00
parent b6430098d4
commit c59c7b0518
2 changed files with 67 additions and 37 deletions

View File

@@ -706,8 +706,16 @@ u8 (*const gMovementActionFuncs_WalkNormalRight[])(struct ObjectEvent *, struct
MovementAction_PauseSpriteAnim,
};
static const s16 sJumpInitDisplacements[] = {0, 1, 1};
static const s16 sJumpDisplacements[] = {0, 0, 1};
static const s16 sJumpInitDisplacements[] = {
[JUMP_DISTANCE_IN_PLACE] = 0,
[JUMP_DISTANCE_NORMAL] = 1,
[JUMP_DISTANCE_FAR] = 1,
};
static const s16 sJumpDisplacements[] = {
[JUMP_DISTANCE_IN_PLACE] = 0,
[JUMP_DISTANCE_NORMAL] = 0,
[JUMP_DISTANCE_FAR] = 1,
};
u8 (*const gMovementActionFuncs_Jump2Down[])(struct ObjectEvent *, struct Sprite *) = {
MovementAction_Jump2Down_Step0,