mirror of
https://github.com/pmret/papermario.git
synced 2024-10-18 18:52:41 +02:00
b4ee2f8a75
* matched appendGfx_intro_logos * create 38F00.c * 3 evt functions * wip * match func_80259AAC * match 8 decoration funcs * fix warnings * fix merge issue * cleaning up * renamed data file * PR suggestion
41 lines
1.1 KiB
C
41 lines
1.1 KiB
C
#include "common.h"
|
|
|
|
void intro_logos_set_fade_alpha(s16 alpha) {
|
|
gGameStatusPtr->bootAlpha = alpha;
|
|
}
|
|
|
|
void intro_logos_set_fade_color(s16 color) {
|
|
gGameStatusPtr->bootRed = color;
|
|
gGameStatusPtr->bootGreen = color;
|
|
gGameStatusPtr->bootBlue = color;
|
|
}
|
|
|
|
s32 intro_logos_fade_in(s16 subtractAlpha) {
|
|
if (gGameStatusPtr->bootAlpha != 0) {
|
|
gGameStatusPtr->bootAlpha -= subtractAlpha;
|
|
if (gGameStatusPtr->bootAlpha < 0) {
|
|
gGameStatusPtr->bootAlpha = 0;
|
|
}
|
|
} else {
|
|
return TRUE;
|
|
}
|
|
return FALSE;
|
|
}
|
|
|
|
s32 intro_logos_fade_out(s16 addAlpha) {
|
|
if (gGameStatusPtr->bootAlpha != 255) {
|
|
gGameStatusPtr->bootAlpha += addAlpha;
|
|
if (gGameStatusPtr->bootAlpha > 255) {
|
|
gGameStatusPtr->bootAlpha = 255;
|
|
}
|
|
} else {
|
|
return TRUE;
|
|
}
|
|
return FALSE;
|
|
}
|
|
|
|
void intro_logos_update_fade(void) {
|
|
set_screen_overlay_params_front(0, gGameStatusPtr->bootAlpha);
|
|
set_screen_overlay_color(0, gGameStatusPtr->bootBlue, gGameStatusPtr->bootGreen, gGameStatusPtr->bootRed);
|
|
}
|