This commit is contained in:
cawtds
2024-08-24 19:28:03 +02:00
parent 3b21783b94
commit 4683cce1f4
2 changed files with 16 additions and 16 deletions

View File

@@ -259,11 +259,11 @@ static bool8 MovementAction_WalkSlowestRight_Step0(struct ObjectEvent *, struct
static bool8 MovementAction_WalkSlowestRight_Step1(struct ObjectEvent *, struct Sprite *);
static bool8 MovementAction_ShakeHeadOrWalkInPlace_Step0(struct ObjectEvent *, struct Sprite *);
static bool8 MovementAction_ShakeHeadOrWalkInPlace_Step1(struct ObjectEvent *, struct Sprite *);
u8 MovementAction_ExitPokeball_Step0(struct ObjectEvent *, struct Sprite *);
u8 MovementAction_ExitPokeball_Step1(struct ObjectEvent *, struct Sprite *);
u8 MovementAction_EnterPokeball_Step0(struct ObjectEvent *, struct Sprite *);
u8 MovementAction_EnterPokeball_Step1(struct ObjectEvent *, struct Sprite *);
u8 MovementAction_EnterPokeball_Step2(struct ObjectEvent *, struct Sprite *);
static bool8 MovementAction_ExitPokeball_Step0(struct ObjectEvent *, struct Sprite *);
static bool8 MovementAction_ExitPokeball_Step1(struct ObjectEvent *, struct Sprite *);
static bool8 MovementAction_EnterPokeball_Step0(struct ObjectEvent *, struct Sprite *);
static bool8 MovementAction_EnterPokeball_Step1(struct ObjectEvent *, struct Sprite *);
static bool8 MovementAction_EnterPokeball_Step2(struct ObjectEvent *, struct Sprite *);
static bool8 MovementAction_GlideDown_Step0(struct ObjectEvent *, struct Sprite *);
static bool8 MovementAction_GlideDown_Step1(struct ObjectEvent *, struct Sprite *);
static bool8 MovementAction_GlideUp_Step0(struct ObjectEvent *, struct Sprite *);
@@ -458,8 +458,8 @@ static bool8 (*const sMovementActionFuncs_JumpSpecialWithEffectDown[])(struct Ob
static bool8 (*const sMovementActionFuncs_JumpSpecialWithEffectUp[])(struct ObjectEvent *, struct Sprite *);
static bool8 (*const sMovementActionFuncs_JumpSpecialWithEffectLeft[])(struct ObjectEvent *, struct Sprite *);
static bool8 (*const sMovementActionFuncs_JumpSpecialWithEffectRight[])(struct ObjectEvent *, struct Sprite *);
u8 (*const gMovementActionFuncs_ExitPokeball[])(struct ObjectEvent *, struct Sprite *);
u8 (*const gMovementActionFuncs_EnterPokeball[])(struct ObjectEvent *, struct Sprite *);
static bool8 (*const gMovementActionFuncs_ExitPokeball[])(struct ObjectEvent *, struct Sprite *);
static bool8 (*const gMovementActionFuncs_EnterPokeball[])(struct ObjectEvent *, struct Sprite *);
static u8 GetMoveDirectionFastAnimNum(u8 direction);
static u8 GetMoveDirectionFasterAnimNum(u8 direction);
@@ -636,8 +636,8 @@ static bool8 (*const *const sMovementActionFuncs[])(struct ObjectEvent *, struct
[MOVEMENT_ACTION_JUMP_SPECIAL_WITH_EFFECT_UP] = sMovementActionFuncs_JumpSpecialWithEffectUp,
[MOVEMENT_ACTION_JUMP_SPECIAL_WITH_EFFECT_LEFT] = sMovementActionFuncs_JumpSpecialWithEffectLeft,
[MOVEMENT_ACTION_JUMP_SPECIAL_WITH_EFFECT_RIGHT] = sMovementActionFuncs_JumpSpecialWithEffectRight,
[MOVEMENT_ACTION_EXIT_POKEBALL] = gMovementActionFuncs_ExitPokeball,
[MOVEMENT_ACTION_ENTER_POKEBALL] = gMovementActionFuncs_EnterPokeball,
[MOVEMENT_ACTION_EXIT_POKEBALL] = gMovementActionFuncs_ExitPokeball,
[MOVEMENT_ACTION_ENTER_POKEBALL] = gMovementActionFuncs_EnterPokeball,
};
static bool8 (*const sMovementActionFuncs_FaceDown[])(struct ObjectEvent *, struct Sprite *) = {
@@ -1670,13 +1670,13 @@ static bool8 (*const sMovementActionFuncs_FlyDown[])(struct ObjectEvent *, struc
MovementAction_FlyUp_Step2,
};
u8 (*const gMovementActionFuncs_ExitPokeball[])(struct ObjectEvent *, struct Sprite *) = {
static bool8 (*const gMovementActionFuncs_ExitPokeball[])(struct ObjectEvent *, struct Sprite *) = {
MovementAction_ExitPokeball_Step0,
MovementAction_ExitPokeball_Step1,
MovementAction_PauseSpriteAnim,
};
u8 (*const gMovementActionFuncs_EnterPokeball[])(struct ObjectEvent *, struct Sprite *) = {
static bool8 (*const gMovementActionFuncs_EnterPokeball[])(struct ObjectEvent *, struct Sprite *) = {
MovementAction_EnterPokeball_Step0,
MovementAction_EnterPokeball_Step1,
MovementAction_EnterPokeball_Step2,

View File

@@ -7461,7 +7461,7 @@ static void ObjectEventSetPokeballGfx(struct ObjectEvent *objEvent)
#define sDuration data[3]
#define sSpeedFlip data[6]
bool8 MovementAction_ExitPokeball_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite)
static bool8 MovementAction_ExitPokeball_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite)
{
u32 direction = gObjectEvents[gPlayerAvatar.objectEventId].facingDirection;
u16 graphicsId = objectEvent->graphicsId;
@@ -7534,7 +7534,7 @@ static const union AffineAnimCmd *const sAffineAnims_PokeballFollower[] =
sAffineAnim_PokeballEnterEast,
};
bool8 MovementAction_ExitPokeball_Step1(struct ObjectEvent *objectEvent, struct Sprite *sprite)
static bool8 MovementAction_ExitPokeball_Step1(struct ObjectEvent *objectEvent, struct Sprite *sprite)
{
// for different speeds, anim steps occur on different frame #s
u32 animStepFrame = (sprite->sSpeedFlip & 1) ? 7 : 3; // 0 -> 3, 1 -> 7
@@ -7570,7 +7570,7 @@ bool8 MovementAction_ExitPokeball_Step1(struct ObjectEvent *objectEvent, struct
return FALSE;
}
bool8 MovementAction_EnterPokeball_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite)
static bool8 MovementAction_EnterPokeball_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite)
{
u32 direction = objectEvent->facingDirection;
StartSpriteAnimInDirection(objectEvent, sprite, direction, GetMoveDirectionFasterAnimNum(direction));
@@ -7584,7 +7584,7 @@ bool8 MovementAction_EnterPokeball_Step0(struct ObjectEvent *objectEvent, struct
return MovementAction_EnterPokeball_Step1(objectEvent, sprite);
}
bool8 MovementAction_EnterPokeball_Step1(struct ObjectEvent *objectEvent, struct Sprite *sprite)
static bool8 MovementAction_EnterPokeball_Step1(struct ObjectEvent *objectEvent, struct Sprite *sprite)
{
u16 graphicsId = objectEvent->graphicsId;
if (--sprite->sDuration == 0)
@@ -7619,7 +7619,7 @@ bool8 MovementAction_EnterPokeball_Step1(struct ObjectEvent *objectEvent, struct
return FALSE;
}
bool8 MovementAction_EnterPokeball_Step2(struct ObjectEvent *objectEvent, struct Sprite *sprite)
static bool8 MovementAction_EnterPokeball_Step2(struct ObjectEvent *objectEvent, struct Sprite *sprite)
{
FollowerSetGraphics(objectEvent, OW_SPECIES(objectEvent), OW_FORM(objectEvent), objectEvent->shiny);
objectEvent->invisible = TRUE;