Rename WalkFastest functions to WalkFaster

This commit is contained in:
cbt6 2021-11-03 01:01:07 +08:00
parent a2c2d7e230
commit 4cedd2d551
6 changed files with 57 additions and 57 deletions

View File

@ -128,10 +128,10 @@
#define MOVEMENT_ACTION_RIDE_WATER_CURRENT_UP 0x2A
#define MOVEMENT_ACTION_RIDE_WATER_CURRENT_LEFT 0x2B
#define MOVEMENT_ACTION_RIDE_WATER_CURRENT_RIGHT 0x2C
#define MOVEMENT_ACTION_WALK_FASTEST_DOWN 0x2D
#define MOVEMENT_ACTION_WALK_FASTEST_UP 0x2E
#define MOVEMENT_ACTION_WALK_FASTEST_LEFT 0x2F
#define MOVEMENT_ACTION_WALK_FASTEST_RIGHT 0x30
#define MOVEMENT_ACTION_WALK_FASTER_DOWN 0x2D
#define MOVEMENT_ACTION_WALK_FASTER_UP 0x2E
#define MOVEMENT_ACTION_WALK_FASTER_LEFT 0x2F
#define MOVEMENT_ACTION_WALK_FASTER_RIGHT 0x30
#define MOVEMENT_ACTION_SLIDE_DOWN 0x31
#define MOVEMENT_ACTION_SLIDE_UP 0x32
#define MOVEMENT_ACTION_SLIDE_LEFT 0x33

View File

@ -136,7 +136,7 @@ u8 GetFaceDirectionMovementAction(u32);
u8 GetWalkNormalMovementAction(u32);
u8 GetWalkFastMovementAction(u32);
u8 GetRideWaterCurrentMovementAction(u32);
u8 GetWalkFastestMovementAction(u32);
u8 GetWalkFasterMovementAction(u32);
u8 GetPlayerRunMovementAction(u32);
u8 GetJumpInPlaceMovementAction(u32);
u8 GetAcroWheelieFaceDirectionMovementAction(u32);

View File

@ -71,12 +71,12 @@ static void (*const sMachBikeTransitions[])(u8) =
MachBikeTransition_TrySlowDown,
};
// bikeFrameCounter is input which is represented by sMachBikeSpeeds in order: 0 is normal speed (1 speed), 1 is fast speed (2 speed), 2 is fastest speed (4 speed)
// bikeFrameCounter is input which is represented by sMachBikeSpeeds in order: 0 is normal speed (1 speed), 1 is fast speed (2 speed), 2 is faster speed
static void (*const sMachBikeSpeedCallbacks[])(u8) =
{
PlayerGoSpeed1, // normal speed (1 speed)
PlayerGoSpeed2, // fast speed (2 speed)
PlayerGoSpeed4, // fastest speed (4 speed)
PlayerGoSpeed4, // faster speed
};
static void (*const sAcroBikeTransitions[])(u8) =

View File

@ -85,14 +85,14 @@ u8 MovementAction_RideWaterCurrentLeft_Step0(struct ObjectEvent *, struct Sprite
u8 MovementAction_RideWaterCurrentLeft_Step1(struct ObjectEvent *, struct Sprite *);
u8 MovementAction_RideWaterCurrentRight_Step0(struct ObjectEvent *, struct Sprite *);
u8 MovementAction_RideWaterCurrentRight_Step1(struct ObjectEvent *, struct Sprite *);
u8 MovementAction_WalkFastestDown_Step0(struct ObjectEvent *, struct Sprite *);
u8 MovementAction_WalkFastestDown_Step1(struct ObjectEvent *, struct Sprite *);
u8 MovementAction_WalkFastestUp_Step0(struct ObjectEvent *, struct Sprite *);
u8 MovementAction_WalkFastestUp_Step1(struct ObjectEvent *, struct Sprite *);
u8 MovementAction_WalkFastestLeft_Step0(struct ObjectEvent *, struct Sprite *);
u8 MovementAction_WalkFastestLeft_Step1(struct ObjectEvent *, struct Sprite *);
u8 MovementAction_WalkFastestRight_Step0(struct ObjectEvent *, struct Sprite *);
u8 MovementAction_WalkFastestRight_Step1(struct ObjectEvent *, struct Sprite *);
u8 MovementAction_WalkFasterDown_Step0(struct ObjectEvent *, struct Sprite *);
u8 MovementAction_WalkFasterDown_Step1(struct ObjectEvent *, struct Sprite *);
u8 MovementAction_WalkFasterUp_Step0(struct ObjectEvent *, struct Sprite *);
u8 MovementAction_WalkFasterUp_Step1(struct ObjectEvent *, struct Sprite *);
u8 MovementAction_WalkFasterLeft_Step0(struct ObjectEvent *, struct Sprite *);
u8 MovementAction_WalkFasterLeft_Step1(struct ObjectEvent *, struct Sprite *);
u8 MovementAction_WalkFasterRight_Step0(struct ObjectEvent *, struct Sprite *);
u8 MovementAction_WalkFasterRight_Step1(struct ObjectEvent *, struct Sprite *);
u8 MovementAction_SlideDown_Step0(struct ObjectEvent *, struct Sprite *);
u8 MovementAction_SlideDown_Step1(struct ObjectEvent *, struct Sprite *);
u8 MovementAction_SlideUp_Step0(struct ObjectEvent *, struct Sprite *);
@ -307,10 +307,10 @@ u8 (*const gMovementActionFuncs_RideWaterCurrentDown[])(struct ObjectEvent *, st
u8 (*const gMovementActionFuncs_RideWaterCurrentUp[])(struct ObjectEvent *, struct Sprite *);
u8 (*const gMovementActionFuncs_RideWaterCurrentLeft[])(struct ObjectEvent *, struct Sprite *);
u8 (*const gMovementActionFuncs_RideWaterCurrentRight[])(struct ObjectEvent *, struct Sprite *);
u8 (*const gMovementActionFuncs_WalkFastestDown[])(struct ObjectEvent *, struct Sprite *);
u8 (*const gMovementActionFuncs_WalkFastestUp[])(struct ObjectEvent *, struct Sprite *);
u8 (*const gMovementActionFuncs_WalkFastestLeft[])(struct ObjectEvent *, struct Sprite *);
u8 (*const gMovementActionFuncs_WalkFastestRight[])(struct ObjectEvent *, struct Sprite *);
u8 (*const gMovementActionFuncs_WalkFasterDown[])(struct ObjectEvent *, struct Sprite *);
u8 (*const gMovementActionFuncs_WalkFasterUp[])(struct ObjectEvent *, struct Sprite *);
u8 (*const gMovementActionFuncs_WalkFasterLeft[])(struct ObjectEvent *, struct Sprite *);
u8 (*const gMovementActionFuncs_WalkFasterRight[])(struct ObjectEvent *, struct Sprite *);
u8 (*const gMovementActionFuncs_SlideDown[])(struct ObjectEvent *, struct Sprite *);
u8 (*const gMovementActionFuncs_SlideUp[])(struct ObjectEvent *, struct Sprite *);
u8 (*const gMovementActionFuncs_SlideLeft[])(struct ObjectEvent *, struct Sprite *);
@ -467,10 +467,10 @@ u8 (*const *const gMovementActionFuncs[])(struct ObjectEvent *, struct Sprite *)
[MOVEMENT_ACTION_RIDE_WATER_CURRENT_UP] = gMovementActionFuncs_RideWaterCurrentUp,
[MOVEMENT_ACTION_RIDE_WATER_CURRENT_LEFT] = gMovementActionFuncs_RideWaterCurrentLeft,
[MOVEMENT_ACTION_RIDE_WATER_CURRENT_RIGHT] = gMovementActionFuncs_RideWaterCurrentRight,
[MOVEMENT_ACTION_WALK_FASTEST_DOWN] = gMovementActionFuncs_WalkFastestDown,
[MOVEMENT_ACTION_WALK_FASTEST_UP] = gMovementActionFuncs_WalkFastestUp,
[MOVEMENT_ACTION_WALK_FASTEST_LEFT] = gMovementActionFuncs_WalkFastestLeft,
[MOVEMENT_ACTION_WALK_FASTEST_RIGHT] = gMovementActionFuncs_WalkFastestRight,
[MOVEMENT_ACTION_WALK_FASTER_DOWN] = gMovementActionFuncs_WalkFasterDown,
[MOVEMENT_ACTION_WALK_FASTER_UP] = gMovementActionFuncs_WalkFasterUp,
[MOVEMENT_ACTION_WALK_FASTER_LEFT] = gMovementActionFuncs_WalkFasterLeft,
[MOVEMENT_ACTION_WALK_FASTER_RIGHT] = gMovementActionFuncs_WalkFasterRight,
[MOVEMENT_ACTION_SLIDE_DOWN] = gMovementActionFuncs_SlideDown,
[MOVEMENT_ACTION_SLIDE_UP] = gMovementActionFuncs_SlideUp,
[MOVEMENT_ACTION_SLIDE_LEFT] = gMovementActionFuncs_SlideLeft,
@ -915,27 +915,27 @@ u8 (*const gMovementActionFuncs_RideWaterCurrentRight[])(struct ObjectEvent *, s
MovementAction_PauseSpriteAnim,
};
u8 (*const gMovementActionFuncs_WalkFastestDown[])(struct ObjectEvent *, struct Sprite *) = {
MovementAction_WalkFastestDown_Step0,
MovementAction_WalkFastestDown_Step1,
u8 (*const gMovementActionFuncs_WalkFasterDown[])(struct ObjectEvent *, struct Sprite *) = {
MovementAction_WalkFasterDown_Step0,
MovementAction_WalkFasterDown_Step1,
MovementAction_PauseSpriteAnim,
};
u8 (*const gMovementActionFuncs_WalkFastestUp[])(struct ObjectEvent *, struct Sprite *) = {
MovementAction_WalkFastestUp_Step0,
MovementAction_WalkFastestUp_Step1,
u8 (*const gMovementActionFuncs_WalkFasterUp[])(struct ObjectEvent *, struct Sprite *) = {
MovementAction_WalkFasterUp_Step0,
MovementAction_WalkFasterUp_Step1,
MovementAction_PauseSpriteAnim,
};
u8 (*const gMovementActionFuncs_WalkFastestLeft[])(struct ObjectEvent *, struct Sprite *) = {
MovementAction_WalkFastestLeft_Step0,
MovementAction_WalkFastestLeft_Step1,
u8 (*const gMovementActionFuncs_WalkFasterLeft[])(struct ObjectEvent *, struct Sprite *) = {
MovementAction_WalkFasterLeft_Step0,
MovementAction_WalkFasterLeft_Step1,
MovementAction_PauseSpriteAnim,
};
u8 (*const gMovementActionFuncs_WalkFastestRight[])(struct ObjectEvent *, struct Sprite *) = {
MovementAction_WalkFastestRight_Step0,
MovementAction_WalkFastestRight_Step1,
u8 (*const gMovementActionFuncs_WalkFasterRight[])(struct ObjectEvent *, struct Sprite *) = {
MovementAction_WalkFasterRight_Step0,
MovementAction_WalkFasterRight_Step1,
MovementAction_PauseSpriteAnim,
};

View File

@ -941,12 +941,12 @@ const u8 gRideWaterCurrentMovementActions[] = {
MOVEMENT_ACTION_RIDE_WATER_CURRENT_LEFT,
MOVEMENT_ACTION_RIDE_WATER_CURRENT_RIGHT,
};
const u8 gWalkFastestMovementActions[] = {
MOVEMENT_ACTION_WALK_FASTEST_DOWN,
MOVEMENT_ACTION_WALK_FASTEST_DOWN,
MOVEMENT_ACTION_WALK_FASTEST_UP,
MOVEMENT_ACTION_WALK_FASTEST_LEFT,
MOVEMENT_ACTION_WALK_FASTEST_RIGHT,
const u8 gWalkFasterMovementActions[] = {
MOVEMENT_ACTION_WALK_FASTER_DOWN,
MOVEMENT_ACTION_WALK_FASTER_DOWN,
MOVEMENT_ACTION_WALK_FASTER_UP,
MOVEMENT_ACTION_WALK_FASTER_LEFT,
MOVEMENT_ACTION_WALK_FASTER_RIGHT,
};
const u8 gSlideMovementActions[] = {
MOVEMENT_ACTION_SLIDE_DOWN,
@ -4314,7 +4314,7 @@ bool8 CopyablePlayerMovement_GoSpeed2(struct ObjectEvent *objectEvent, struct Sp
direction = playerDirection;
direction = state_to_direction(gInitialMovementTypeFacingDirections[objectEvent->movementType], objectEvent->directionSequenceIndex, direction);
ObjectEventMoveDestCoords(objectEvent, direction, &x, &y);
ObjectEventSetSingleMovement(objectEvent, sprite, GetWalkFastestMovementAction(direction));
ObjectEventSetSingleMovement(objectEvent, sprite, GetWalkFasterMovementAction(direction));
if (GetCollisionAtCoords(objectEvent, x, y, direction) || (tileCallback != NULL && !tileCallback(MapGridGetMetatileBehaviorAt(x, y))))
{
ObjectEventSetSingleMovement(objectEvent, sprite, GetFaceDirectionMovementAction(direction));
@ -5025,7 +5025,7 @@ dirn_to_anim(GetWalkSlowMovementAction, gWalkSlowMovementActions);
dirn_to_anim(GetWalkNormalMovementAction, gWalkNormalMovementActions);
dirn_to_anim(GetWalkFastMovementAction, gWalkFastMovementActions);
dirn_to_anim(GetRideWaterCurrentMovementAction, gRideWaterCurrentMovementActions);
dirn_to_anim(GetWalkFastestMovementAction, gWalkFastestMovementActions);
dirn_to_anim(GetWalkFasterMovementAction, gWalkFasterMovementActions);
dirn_to_anim(GetSlideMovementAction, gSlideMovementActions);
dirn_to_anim(GetPlayerRunMovementAction, gPlayerRunMovementActions);
dirn_to_anim(GetJump2MovementAction, gJump2MovementActions);
@ -5953,13 +5953,13 @@ bool8 MovementAction_RideWaterCurrentRight_Step1(struct ObjectEvent *objectEvent
return FALSE;
}
bool8 MovementAction_WalkFastestDown_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite)
bool8 MovementAction_WalkFasterDown_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite)
{
InitMovementNormal(objectEvent, sprite, DIR_SOUTH, MOVE_SPEED_FASTER);
return MovementAction_WalkFastestDown_Step1(objectEvent, sprite);
return MovementAction_WalkFasterDown_Step1(objectEvent, sprite);
}
bool8 MovementAction_WalkFastestDown_Step1(struct ObjectEvent *objectEvent, struct Sprite *sprite)
bool8 MovementAction_WalkFasterDown_Step1(struct ObjectEvent *objectEvent, struct Sprite *sprite)
{
if (UpdateMovementNormal(objectEvent, sprite))
{
@ -5969,13 +5969,13 @@ bool8 MovementAction_WalkFastestDown_Step1(struct ObjectEvent *objectEvent, stru
return FALSE;
}
bool8 MovementAction_WalkFastestUp_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite)
bool8 MovementAction_WalkFasterUp_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite)
{
InitMovementNormal(objectEvent, sprite, DIR_NORTH, MOVE_SPEED_FASTER);
return MovementAction_WalkFastestUp_Step1(objectEvent, sprite);
return MovementAction_WalkFasterUp_Step1(objectEvent, sprite);
}
bool8 MovementAction_WalkFastestUp_Step1(struct ObjectEvent *objectEvent, struct Sprite *sprite)
bool8 MovementAction_WalkFasterUp_Step1(struct ObjectEvent *objectEvent, struct Sprite *sprite)
{
if (UpdateMovementNormal(objectEvent, sprite))
{
@ -5985,13 +5985,13 @@ bool8 MovementAction_WalkFastestUp_Step1(struct ObjectEvent *objectEvent, struct
return FALSE;
}
bool8 MovementAction_WalkFastestLeft_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite)
bool8 MovementAction_WalkFasterLeft_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite)
{
InitMovementNormal(objectEvent, sprite, DIR_WEST, MOVE_SPEED_FASTER);
return MovementAction_WalkFastestLeft_Step1(objectEvent, sprite);
return MovementAction_WalkFasterLeft_Step1(objectEvent, sprite);
}
bool8 MovementAction_WalkFastestLeft_Step1(struct ObjectEvent *objectEvent, struct Sprite *sprite)
bool8 MovementAction_WalkFasterLeft_Step1(struct ObjectEvent *objectEvent, struct Sprite *sprite)
{
if (UpdateMovementNormal(objectEvent, sprite))
{
@ -6001,13 +6001,13 @@ bool8 MovementAction_WalkFastestLeft_Step1(struct ObjectEvent *objectEvent, stru
return FALSE;
}
bool8 MovementAction_WalkFastestRight_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite)
bool8 MovementAction_WalkFasterRight_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite)
{
InitMovementNormal(objectEvent, sprite, DIR_EAST, MOVE_SPEED_FASTER);
return MovementAction_WalkFastestRight_Step1(objectEvent, sprite);
return MovementAction_WalkFasterRight_Step1(objectEvent, sprite);
}
bool8 MovementAction_WalkFastestRight_Step1(struct ObjectEvent *objectEvent, struct Sprite *sprite)
bool8 MovementAction_WalkFasterRight_Step1(struct ObjectEvent *objectEvent, struct Sprite *sprite)
{
if (UpdateMovementNormal(objectEvent, sprite))
{

View File

@ -970,10 +970,10 @@ void PlayerRideWaterCurrent(u8 a)
PlayerSetAnimId(GetRideWaterCurrentMovementAction(a), 2);
}
// fastest speed (4 speed)
// faster speed
void PlayerGoSpeed4(u8 a)
{
PlayerSetAnimId(GetWalkFastestMovementAction(a), 2);
PlayerSetAnimId(GetWalkFasterMovementAction(a), 2);
}
static void PlayerRun(u8 a)