From 6c8d4744f3d0057ebb4a6657ac3d8944640a5d16 Mon Sep 17 00:00:00 2001 From: voloved <36523934+voloved@users.noreply.github.com> Date: Mon, 26 Dec 2022 15:59:44 -0500 Subject: [PATCH] Created Get Rid of Battery Run Dry Error Message (markdown) --- Get-Rid-of-Battery-Run-Dry-Error-Message.md | 31 +++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Get-Rid-of-Battery-Run-Dry-Error-Message.md diff --git a/Get-Rid-of-Battery-Run-Dry-Error-Message.md b/Get-Rid-of-Battery-Run-Dry-Error-Message.md new file mode 100644 index 0000000..a6f4360 --- /dev/null +++ b/Get-Rid-of-Battery-Run-Dry-Error-Message.md @@ -0,0 +1,31 @@ +By devolov + +**Goal:** Make battery run dry message not appear when starting the game. + + +In `main_menu.c`: + +```diff +static void Task_MainMenuCheckBattery(u8 taskId) +{ + if (!gPaletteFade.active) + { + SetGpuReg(REG_OFFSET_WIN0H, 0); + SetGpuReg(REG_OFFSET_WIN0V, 0); + SetGpuReg(REG_OFFSET_WININ, WININ_WIN0_BG0 | WININ_WIN0_OBJ); + SetGpuReg(REG_OFFSET_WINOUT, WINOUT_WIN01_BG0 | WINOUT_WIN01_OBJ | WINOUT_WIN01_CLR); + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_EFFECT_DARKEN | BLDCNT_TGT1_BG0); + SetGpuReg(REG_OFFSET_BLDALPHA, 0); + SetGpuReg(REG_OFFSET_BLDY, 7); ++ gTasks[taskId].func = Task_DisplayMainMenu; +- if (!(RtcGetErrorStatus() & RTC_ERR_FLAG_MASK)) +- { +- gTasks[taskId].func = Task_DisplayMainMenu; +- } +- else +- { +- gTasks[taskId].func = Task_WaitForBatteryDryErrorWindow; +- } + } +} +``` \ No newline at end of file