From 9f05494e7caf62214a0b669a98f95861bf3f1206 Mon Sep 17 00:00:00 2001 From: Mr-Wiseguy Date: Fri, 30 Aug 2024 19:38:02 -0400 Subject: [PATCH] Matched __propellorCtrl_setState without a function static --- src/RBB/propellorctrl.c | 19 ++++++++++--------- undefined_syms.libultra.txt | 2 -- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/RBB/propellorctrl.c b/src/RBB/propellorctrl.c index cf31c61c..27047fb8 100644 --- a/src/RBB/propellorctrl.c +++ b/src/RBB/propellorctrl.c @@ -2,17 +2,18 @@ #include "functions.h" #include "variables.h" - -s32 pad_803912C0[1]; -f32 __propellorTimer2; // TODO rematch __propellorCtrl_setState to merge this with __propellorTimer +s32 pad_803912C0[2]; u8 __propellorCtrlState; +f32 __propellorTimer; -void __propellorCtrl_setState(s32 arg0){ - static f32 __propellorTimer; +void __propellorCtrl_setState(s32 arg0){ + f32* timerPtr = &__propellorTimer; + + *timerPtr = 0.0f; - __propellorTimer = 0.0f; - if(arg0 == 1) - __propellorTimer = 6.5f; + if(arg0 == 1) { + *timerPtr = 6.5f; + } if(arg0 == 2){ item_set(ITEM_3_PROPELLOR_TIMER, 3900 - 1); @@ -55,7 +56,7 @@ void rbb_propellorCtrl_update(void){ __propellorCtrl_setState(1); if(__propellorCtrlState == 1) - if(ml_timer_update(&__propellorTimer2,time_getDelta())) + if(ml_timer_update(&__propellorTimer,time_getDelta())) __propellorCtrl_setState(2); if(__propellorCtrlState == 2) diff --git a/undefined_syms.libultra.txt b/undefined_syms.libultra.txt index 1ef69a36..05bcae7b 100644 --- a/undefined_syms.libultra.txt +++ b/undefined_syms.libultra.txt @@ -42,5 +42,3 @@ boot_D_803FBE00 = D_803FBE00; boot_D_803FFE00 = D_803FFE00; boot_gOverlayTable = gOverlayTable; boot_func_8023DA20 = func_8023DA20; - -__propellorTimer = 0x803912CC;