Cleanup of main.c
This commit is contained in:
+8
-8
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user