diff --git a/patches/recompui_patches.c b/patches/recompui_patches.c new file mode 100644 index 0000000..5a6eee0 --- /dev/null +++ b/patches/recompui_patches.c @@ -0,0 +1,17 @@ +#include "functions.h" +#include "patches.h" +#include "ui_funcs.h" + +extern s32 D_802823AC; +extern f32 D_80282420; +extern f32 D_80282424; + +// @recomp Patched to run a callback per frame in a function that always gets called by mainLoop(). +RECOMP_PATCH void baMotor_80250C08(void) { + // @recomp Patched to run UI callbacks. + recomp_run_ui_callbacks(); + + if (D_802823AC != 0) { + D_80282424 = MIN(D_80282420, D_80282424 + time_getDelta()); + } +} diff --git a/patches/syms.ld b/patches/syms.ld index 6ba9568..f8cb106 100644 --- a/patches/syms.ld +++ b/patches/syms.ld @@ -50,4 +50,5 @@ recomp_get_note_saving_enabled = 0x8F0000B4; recomp_get_cutscene_aspect_ratio = 0x8F0000B8; recomp_get_flying_and_swimming_inverted_axes = 0x8F0000BC; recomp_get_first_person_inverted_axes = 0x8F0000C0; -recomp_get_analog_cam_sensitivity = 0x8F0000C4; \ No newline at end of file +recomp_get_analog_cam_sensitivity = 0x8F0000C4; +recomp_run_ui_callbacks = 0x8F0000C8;