papermario/src/intro_logos.c
Ethan Roseman ed9727a34e
Various decomp, use of SCREEN_WIDTH and SCREEN_HEIGHT, etc (#340)
* Update symbol_addrs

* effects.h and cleanup

* effect code generation!

* func_80024A784

* state_step_demo

* meh

* work on gfx_task_main and cleanup

* state_step_intro

* set_custom_gfx
2021-07-23 03:48:30 +09:00

41 lines
1.0 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;
}
s16 intro_logos_fade_in(s16 subtractAlpha) {
if (gGameStatusPtr->bootAlpha != 0) {
gGameStatusPtr->bootAlpha -= subtractAlpha;
if (gGameStatusPtr->bootAlpha << 16 < 0) {
gGameStatusPtr->bootAlpha = 0;
}
} else {
return 1;
}
return 0;
}
s32 intro_logos_fade_out(s16 addAlpha) {
if (gGameStatusPtr->bootAlpha != 255) {
gGameStatusPtr->bootAlpha += addAlpha;
if (gGameStatusPtr->bootAlpha > 255) {
gGameStatusPtr->bootAlpha = 255;
}
} else {
return 1;
}
return 0;
}
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);
}