From 4683cce1f4425365a3f20230964eba8ea5b565aa Mon Sep 17 00:00:00 2001 From: cawtds <38510667+cawtds@users.noreply.github.com> Date: Sat, 24 Aug 2024 19:28:03 +0200 Subject: [PATCH] cleanup --- .../movement_action_func_tables.h | 22 +++++++++---------- src/event_object_movement.c | 10 ++++----- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/data/object_events/movement_action_func_tables.h b/src/data/object_events/movement_action_func_tables.h index 0970d6600..0f1ce92e5 100644 --- a/src/data/object_events/movement_action_func_tables.h +++ b/src/data/object_events/movement_action_func_tables.h @@ -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, diff --git a/src/event_object_movement.c b/src/event_object_movement.c index 1a3e20b2a..b67836602 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -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;