Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/agbmain.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
#include "structs/game_state.h"
#include "structs/display.h"

/**
* @brief 23C | 464 | Main loop of the game
*
*/
void agbmain(void)
{
InitializeGame();
Expand All @@ -29,7 +33,7 @@ void agbmain(void)

UpdateInput();
SoftResetCheck();

//Increment frame counters
APPLY_DELTA_TIME_INC(gFrameCounter8Bit);
APPLY_DELTA_TIME_INC(gFrameCounter16Bit);

Expand Down Expand Up @@ -111,9 +115,9 @@ void agbmain(void)
case GM_FILE_SELECT:
if (FileSelectMenuMainLoop())
{
if (gSubGameMode2 == 1)
if (gSubGameMode2 == 1)//If Continuing File
gMainGameMode = GM_INGAME;
else if (gSubGameMode2 == 2)
else if (gSubGameMode2 == 2)//If starting New File
gMainGameMode = GM_INGAME;
else if (gSubGameMode2 == 4)
gMainGameMode = GM_FUSION_GALLERY;
Expand Down
5 changes: 4 additions & 1 deletion src/intro.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,10 @@ static void IntroInit(void)

IntroVBlank();
}

/**
* @brief 803b0 | 1A0 | Processes the OAM for the intro text
*
*/
static void IntroTextProcessOam(void)
{
const u16* src;
Expand Down
28 changes: 14 additions & 14 deletions src/menus/file_select.c
Original file line number Diff line number Diff line change
Expand Up @@ -4379,11 +4379,11 @@ u32 FileSelectMenuMainLoop(void)

switch (gSubGameMode1)
{
case 0:
case 0: // Init
gSubGameMode2 = 0;
gCutsceneToSkip = 0;
FileSelectInit();
gSubGameMode1--;
FileSelectInit();//sets SubGameMode1 to 2
gSubGameMode1--;//Then decrease it to 1, so the next frame it will apply the fading
break;

case 1:
Expand Down Expand Up @@ -5331,7 +5331,7 @@ static u8 FileSelectUpdateSubMenu(void)

switch (FILE_SELECT_DATA.currentSubMenu)
{
case 0:
case 0: // Main menu
result = 0;
#ifdef REGION_EU
CheckForMaintainedInput(MAINTAINED_INPUT_SPEED_FAST);
Expand Down Expand Up @@ -5407,18 +5407,18 @@ static u8 FileSelectUpdateSubMenu(void)
}
}

if (!result)
if (!result)// 0 = no input
break;

if (result == 1)
if (result == 1)//1 = moved cursor
{
FileSelectUpdateCursor(CURSOR_POSE_MOVING, FILE_SELECT_DATA.fileSelectCursorPosition);
if (FILE_SELECT_DATA.fileSelectCursorPosition < FILE_SELECT_CURSOR_POSITION_COPY)
FileSelectPlayMenuSound(MENU_SOUND_REQUEST_CURSOR);
else
FileSelectPlayMenuSound(MENU_SOUND_REQUEST_SUB_MENU_CURSOR);
}
else if (result == 2)
else if (result == 2)// 2 = pressed B, go back to title
{
FadeMusic(0);
#ifdef REGION_JP
Expand All @@ -5429,10 +5429,10 @@ static u8 FileSelectUpdateSubMenu(void)
gLanguage = gSaveFilesInfo[FILE_SELECT_DATA.fileSelectCursorPosition].language;
}
#endif // REGION_JP
gSubGameMode2 = 3;
gSubGameMode2 = 3; // Go to title screen
return TRUE;
}
else if (result == 3)
else if (result == 3) // 3 = pressed A, open sub menu
{
result = FALSE;

Expand Down Expand Up @@ -5487,7 +5487,7 @@ static u8 FileSelectUpdateSubMenu(void)
}
break;

case 1:
case 1: // File selection sub menu
result = FileSelectProcessFileSelection();
if (result == FALSE)
break;
Expand Down Expand Up @@ -5624,7 +5624,7 @@ static u32 FileSelectCheckInputtingTimeAttackCode(void)
}

/**
* @brief 7d62c | dd0 |
* @brief 7d62c | dd0 | Handles File Sub Menu (CurrentSubMenu = 1)
*
* @return u8 Leaving,
*/
Expand All @@ -5642,7 +5642,7 @@ static u8 FileSelectProcessFileSelection(void)

switch (FILE_SELECT_DATA.subMenuStage)
{
case 0:
case 0: // Initialize File Sub Menu
gMostRecentSaveFile = FILE_SELECT_DATA.fileSelectCursorPosition;

offset = (FILE_SELECT_DATA.fileSelectCursorPosition + 1) * 3;
Expand Down Expand Up @@ -5759,7 +5759,7 @@ static u8 FileSelectProcessFileSelection(void)
FILE_SELECT_DATA.inputtedTimeAttack = FALSE;
FILE_SELECT_DATA.subMenuStage = 7;

case 7:
case 7://"start game" Sub Menu
action = UCHAR_MAX;

if (gChangedInput & KEY_A)
Expand Down Expand Up @@ -5801,7 +5801,7 @@ static u8 FileSelectProcessFileSelection(void)
unk_7e3fc(0, (u8)action);
break;

case 8:
case 8://start game pressed, check if continue or new
if (gSaveFilesInfo[FILE_SELECT_DATA.fileSelectCursorPosition].exists || gSaveFilesInfo[FILE_SELECT_DATA.fileSelectCursorPosition].introPlayed)
{
if (gSaveFilesInfo[FILE_SELECT_DATA.fileSelectCursorPosition].timeAttack || FILE_SELECT_DATA.inputtedTimeAttack)
Expand Down
2 changes: 1 addition & 1 deletion src/sprites_ai/chozo_ball.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#define CHOZO_BALL_FLICKER_TIMER work0

/**
* 162b0 | 94 | Spawns an message banner depending on the chozo statue sprite ID
* @brief 162b0 | 94 | Spawns an message banner depending on the chozo statue sprite ID
*
* @param spriteId Chozo statue sprite ID
*/
Expand Down
Loading