From d886e76960f47795849d2ca14cef855cdb00242d Mon Sep 17 00:00:00 2001 From: cadmic Date: Sun, 8 Dec 2024 16:38:58 -0800 Subject: [PATCH] Split code_800D31A0.c into sys_freeze.c and sys_debug_controller.c (#2315) --- spec | 5 ++++- src/code/code_800D31A0.c | 23 ----------------------- src/code/sys_debug_controller.c | 11 +++++++++++ src/code/sys_freeze.c | 9 +++++++++ 4 files changed, 24 insertions(+), 24 deletions(-) delete mode 100644 src/code/code_800D31A0.c create mode 100644 src/code/sys_debug_controller.c create mode 100644 src/code/sys_freeze.c diff --git a/spec b/spec index 928f208896..c5c437cafd 100644 --- a/spec +++ b/spec @@ -691,7 +691,10 @@ beginseg include "$(BUILD_DIR)/src/code/sys_matrix.o" include "$(BUILD_DIR)/src/code/sys_ucode.o" include "$(BUILD_DIR)/src/code/sys_rumble.o" - include "$(BUILD_DIR)/src/code/code_800D31A0.o" + include "$(BUILD_DIR)/src/code/sys_freeze.o" +#if DEBUG_FEATURES + include "$(BUILD_DIR)/src/code/sys_debug_controller.o" +#endif include "$(BUILD_DIR)/src/code/irqmgr.o" #if PLATFORM_N64 include "$(BUILD_DIR)/src/code/code_n64dd_800AD410.o" diff --git a/src/code/code_800D31A0.c b/src/code/code_800D31A0.c deleted file mode 100644 index e7bd207d75..0000000000 --- a/src/code/code_800D31A0.c +++ /dev/null @@ -1,23 +0,0 @@ -#include "global.h" -#include "terminal.h" - -#if DEBUG_FEATURES -u32 gIsCtrlr2Valid = false; -#endif - -NORETURN void func_800D31A0(void) { - PRINTF(VT_FGCOL(RED) "\n**** Freeze!! ****\n" VT_RST); - for (;;) { - Sleep_Msec(1000); - } -} - -#if DEBUG_FEATURES -void func_800D31F0(void) { - gIsCtrlr2Valid = (gPadMgr.validCtrlrsMask & 2) != 0; -} - -void func_800D3210(void) { - gIsCtrlr2Valid = false; -} -#endif diff --git a/src/code/sys_debug_controller.c b/src/code/sys_debug_controller.c new file mode 100644 index 0000000000..eb1398ff24 --- /dev/null +++ b/src/code/sys_debug_controller.c @@ -0,0 +1,11 @@ +#include "global.h" + +u32 gIsCtrlr2Valid = false; + +void func_800D31F0(void) { + gIsCtrlr2Valid = (gPadMgr.validCtrlrsMask & 2) != 0; +} + +void func_800D3210(void) { + gIsCtrlr2Valid = false; +} diff --git a/src/code/sys_freeze.c b/src/code/sys_freeze.c new file mode 100644 index 0000000000..f7cb515cfe --- /dev/null +++ b/src/code/sys_freeze.c @@ -0,0 +1,9 @@ +#include "global.h" +#include "terminal.h" + +NORETURN void func_800D31A0(void) { + PRINTF(VT_FGCOL(RED) "\n**** Freeze!! ****\n" VT_RST); + for (;;) { + Sleep_Msec(1000); + } +}