diff options
| author | Henny022p <73211432+Henny022p@users.noreply.github.com> | 2026-02-08 18:32:38 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-08 18:32:38 +0100 |
| commit | 5ab63f00e522ff69c5bc987e379f0163943f2833 (patch) | |
| tree | 53622222ac729c6ab6dc75ef7f9bafa8031daf18 /src/gameUtils.c | |
| parent | 73901a0a012d55ebb66a4627dcb246d19737fcb5 (diff) | |
| parent | 5b2cafdc894823d57beee8f3947a391d881d91de (diff) | |
Various code cleanup changes
Diffstat (limited to 'src/gameUtils.c')
| -rw-r--r-- | src/gameUtils.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/src/gameUtils.c b/src/gameUtils.c index 2f54867d..92a9db0b 100644 --- a/src/gameUtils.c +++ b/src/gameUtils.c @@ -5,23 +5,25 @@ */ #include "area.h" #include "backgroundAnimations.h" -#include "enemy.h" #include "entity.h" #include "fade.h" #include "fileselect.h" -#include "functions.h" +#include "manager.h" #include "game.h" #include "item.h" -#include "itemMetaData.h" #include "main.h" -#include "menu.h" -#include "npc.h" #include "object.h" +#include "common.h" +#include "flags.h" +#include "room.h" +#include "player.h" #include "save.h" #include "screen.h" -#include "script.h" #include "sound.h" #include "ui.h" +#include "subtask.h" +#include "beanstalkSubtask.h" +#include "pauseMenu.h" u32 StairsAreValid(void); void ClearFlagArray(const u16*); @@ -76,11 +78,11 @@ void SetPopupState(u32 type, u32 choice_idx) { u32 fakematch; MemClear(gBG1Buffer, sizeof gBG1Buffer); - gUnk_020227E8[0]._0.WORD = 0xf; - gUnk_020227E8[1]._0.WORD = 0xf; - gUnk_020227E8[2]._0.WORD = 0xf; - gUnk_020227E8[3]._0.WORD = 0xf; - *(&gUnk_020227E8[choice_idx]._0.BYTES.byte0 + 1) = fakematch = 1; + gUnk_020227E8[0].w[0] = 0xf; + gUnk_020227E8[1].w[0] = 0xf; + gUnk_020227E8[2].w[0] = 0xf; + gUnk_020227E8[3].w[0] = 0xf; + *(gUnk_020227E8[choice_idx].s + 1) = fakematch = 1; MemCopy(&sDefaultFont, &font, sizeof font); opt = &sPopupOptions[type]; @@ -531,7 +533,7 @@ u32 GetFlagBankOffset(u32 idx) { return gLocalFlagBanks[a_hdr->flag_bank]; } -void RegisterTransitionManager(void* mgr, void (*onEnter)(), void (*onExit)()) { +void RegisterTransitionHandler(void* mgr, void (*onEnter)(), void (*onExit)()) { if (gMain.substate != GAMEMAIN_SUBTASK) { gArea.transitionManager = mgr; gArea.onEnter = onEnter; @@ -826,7 +828,7 @@ void sub_080533CC(void) { *p2++ = *p1++; *p2++ = *p1++; *p2++ = *p1++; - gUsedPalettes |= 1 << 3; + USE_PALETTE(3); } void UpdateTimerCallbacks(void) { |
