Skip to content

Commit

Permalink
ohgodwhat
Browse files Browse the repository at this point in the history
that printf shouldve been called only once 😅

Also moved the window clean step _after_ the reset since it was messing
with the main menu.
  • Loading branch information
ev1l0rd committed Apr 12, 2018
1 parent f22a8c3 commit 18d0162
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions source/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,6 @@ int main()
break;
}

if (previous_state != state && state != FAILURE)
{
consoleSelect(&topScreen);
consoleClear();
printf("%s\n\n", main_string);
previous_state = state;
}

if (kDown & KEY_L && not_busy)
{
profile_num = 0;
Expand All @@ -76,11 +68,19 @@ int main()
state = MAIN_SCREEN;
}

if (previous_state != state && state != FAILURE)
{
consoleSelect(&topScreen);
consoleClear();
printf("%s\n\n", main_string);
previous_state = state;
}

switch(state){
case MAIN_SCREEN:
if (intro_unseen)
{
printf("Press A to continue.\nYou can press L at any time to reset your choices.");
printf("Press A to continue.\nYou can press L at any time to start over.");
intro_unseen = false;
}

Expand Down Expand Up @@ -193,23 +193,23 @@ int main()
{
profile_num = 0;
consoleSelect(&bottomScreenRight);
printf("Save 1 selected.\n");
printf("Save 1 selected.\n\n");
consoleSelect(&topScreen);
state = OPEN_SAVE;
}
if (kDown & KEY_B && saves_list.profile1) // Save 2 was chosen
{
profile_num = 1;
consoleSelect(&bottomScreenRight);
printf("Save 2 selected.\n");
printf("Save 2 selected.\n\n");
consoleSelect(&topScreen);
state = OPEN_SAVE;
}
if (kDown & KEY_X && saves_list.profile2) // Save 3 was chosen
{
profile_num = 2;
consoleSelect(&bottomScreenRight);
printf("Save 3 selected.\n");
printf("Save 3 selected.\n\n");
consoleSelect(&topScreen);
state = OPEN_SAVE;
}
Expand Down Expand Up @@ -267,7 +267,7 @@ int main()
if (kDown & KEY_B)
{
consoleSelect(&bottomScreenRight);
printf("Not enabling fusion mode.\n");
printf("Not enabling fusion mode.\n\n");
consoleSelect(&topScreen);
state = THE_WIZARD_IS_BUSY;
}
Expand Down Expand Up @@ -299,7 +299,10 @@ int main()

case SUCCESS:
if (exit_unseen)
printf("Amiibo's have been unlocked for the selected save file. Press START to exit.");
{
printf("Amiibo's have been unlocked for the selected save file.\nPress START to exit.");
exit_unseen = false;
}
break;

case FAILURE:
Expand Down

0 comments on commit 18d0162

Please sign in to comment.