From 0027cf38d62936bcd276accb42be6aeedfe90b61 Mon Sep 17 00:00:00 2001 From: Tal Hayon Date: Sun, 6 Feb 2022 23:44:36 +0200 Subject: [PATCH] Move constant array inside function --- src/item/itemPegasusBoots.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/item/itemPegasusBoots.c b/src/item/itemPegasusBoots.c index 7e272158..6a2c3782 100644 --- a/src/item/itemPegasusBoots.c +++ b/src/item/itemPegasusBoots.c @@ -6,9 +6,9 @@ #include "game.h" #include "save.h" -void (*const ItemPegasusBoots_StateFunctions[])(ItemBehavior* beh, u32); - void sub_08076964(ItemBehavior*, u32); +void sub_080768F8(ItemBehavior*, u32); +void sub_08076A88(ItemBehavior*, u32); extern bool32 sub_0807A158(); extern Entity* CreatePlayerBomb(ItemBehavior*, u32); @@ -16,6 +16,11 @@ extern u16 gUnk_0800275C[]; extern u8 gUnk_0811BE38[]; void ItemPegasusBoots(ItemBehavior* this, u32 arg1) { + static void (*const ItemPegasusBoots_StateFunctions[])(ItemBehavior * beh, u32) = { + sub_080768F8, + sub_08076964, + sub_08076A88, + }; u32 bVar1; Entity* fx; u32 uVar4; @@ -168,9 +173,3 @@ void sub_08076A88(ItemBehavior* this, u32 arg1) { gPlayerState.dash_state = 0; sub_08077E78(this, arg1); } - -void (*const ItemPegasusBoots_StateFunctions[])(ItemBehavior* beh, u32) = { - sub_080768F8, - sub_08076964, - sub_08076A88, -};