diff options
author | PikalaxALT <PikalaxALT@gmail.com> | 2020-04-10 20:16:31 -0400 |
---|---|---|
committer | PikalaxALT <PikalaxALT@gmail.com> | 2020-04-10 20:16:31 -0400 |
commit | ec0edfd1985287212220d886dcf8243b0949bd28 (patch) | |
tree | 8e1a281c5b0c71ba079a49d2f3ad671b50b3ec6b /src/main.c | |
parent | 2cb171b9fd7882dbc638fec213ed5f698abd2496 (diff) |
Cleanup of main.c
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/main.c b/src/main.c index a4c844144..1573a2c5b 100644 --- a/src/main.c +++ b/src/main.c @@ -132,7 +132,7 @@ void AgbMain() InitMapMusic(); ClearDma3Requests(); ResetBgs(); - InitHeap(gHeap, 0x1C000); + InitHeap(gHeap, HEAP_SIZE); SetDefaultFontsPointer(); gSoftResetDisabled = FALSE; @@ -162,7 +162,7 @@ void AgbMain() DoSoftReset(); } - if (sub_80582E0() == 1) + if (Overworld_SendKeysToLinkIsRunning() == TRUE) { gLinkTransferringData = TRUE; UpdateLinkAndCallCallbacks(); @@ -173,7 +173,7 @@ void AgbMain() gLinkTransferringData = FALSE; UpdateLinkAndCallCallbacks(); - if (sub_8058274() == 1) + if (Overworld_RecvKeysFromLinkIsRunning() == 1) { gMain.newKeys = 0; ClearSpriteCopyRequests(); @@ -293,16 +293,16 @@ static void ReadKeys(void) gMain.heldKeys = gMain.heldKeysRaw; // Remap L to A if the L=A option is enabled. - if (gSaveBlock2Ptr->optionsButtonMode == 2) + if (gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_L_EQUALS_A) { - if (gMain.newKeys & L_BUTTON) + if (JOY_NEW(L_BUTTON)) gMain.newKeys |= A_BUTTON; - if (gMain.heldKeys & L_BUTTON) + if (JOY_HELD(L_BUTTON)) gMain.heldKeys |= A_BUTTON; } - if (gMain.newKeys & gMain.watchedKeysMask) + if (JOY_NEW(gMain.watchedKeysMask)) gMain.watchedKeysPressed = TRUE; } @@ -323,7 +323,7 @@ void InitIntrHandlers(void) REG_IME = 1; - EnableInterrupts(0x1); + EnableInterrupts(INTR_FLAG_VBLANK); } void SetVBlankCallback(IntrCallback callback) |