Skip to content
Merged
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
19 changes: 13 additions & 6 deletions src/game/decomp_credits.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void Task_OllieLogoMoves(void);

// 1
// -------
// x^4 + 0.5
// x^4 + 1
s32 logoOllieMove(s32 frameNum)
{
s32 qTime = (Q_DIV(Q(frameNum), Q(GBA_FRAMES_PER_SECOND)));
Expand Down Expand Up @@ -289,16 +289,23 @@ void TaskDestructor_DecompCredits(struct Task *t)
CreateTitleScreen();
}

// Colors the screen behind the "Press START ..." text white
// Changes background colors depending on the current horizontal line
void customHBlank(void)
{
u16 vcount = REG_VCOUNT;
// NOTE:
// We have to use direct accesses to palette memory here instead of
// SET_PALETTE_COLOR_BG() and GET_PALETTE_COLOR_OBJ() because those are only taken into account
// at the end of the frame, while this HBlank-code need to update colors while the frame gets drawn;
int_vcount vcount = REG_VCOUNT;
if ((vcount >= DISPLAY_HEIGHT - 16 - 1) && (vcount < DISPLAY_HEIGHT - 1)) {
SET_PALETTE_COLOR_BG(0, 0, RGB_WHITE);
// "PRESS START to continue"
((u16 *)BG_PLTT)[0] = RGB_WHITE;
} else if ((vcount >= (DISPLAY_HEIGHT / 2) - 1) && (vcount < DISPLAY_HEIGHT - 1)) {
SET_PALETTE_COLOR_BG(0, 0, GET_PALETTE_COLOR_OBJ(3, 0));
// Logo background (JaceCear)
((u16 *)BG_PLTT)[0] = ((u16 *)OBJ_PLTT)[3 * PALETTE_LEN_4BPP];
} else {
SET_PALETTE_COLOR_BG(0, 0, GET_PALETTE_COLOR_OBJ(2, 0));
// Logo background (freshollie)
((u16 *)BG_PLTT)[0] = ((u16 *)OBJ_PLTT)[2 * PALETTE_LEN_4BPP];
}
}
#endif
Loading