papermario/src/code_ebd0_len_6a0.c

60 lines
1.4 KiB
C
Raw Normal View History

2020-08-04 08:49:11 +02:00
#include "common.h"
2020-08-12 23:13:09 +02:00
void func_800337D0(s16 new_alpha) {
game_status* gameStatus = *gGameStatusPtr;
2020-08-12 23:13:09 +02:00
gameStatus->boot_alpha = new_alpha;
}
2020-08-04 08:49:11 +02:00
void func_800337E0(s16 arg0) {
game_status* gameStatus = *gGameStatusPtr;
2020-08-12 23:13:09 +02:00
gameStatus->boot_red = arg0;
gameStatus->boot_green = arg0;
gameStatus->boot_blue = arg0;
}
2020-08-04 08:49:11 +02:00
s16 func_800337F8(subtract_val) {
game_status* gameStatus = *gGameStatusPtr;
2020-08-12 23:13:09 +02:00
if (gameStatus->boot_alpha != 0) {
gameStatus->boot_alpha -= subtract_val;
2020-08-13 00:18:27 +02:00
if (gameStatus->boot_alpha << 16 < 0) {
2020-08-12 23:13:09 +02:00
gameStatus->boot_alpha = 0;
}
2020-08-12 23:13:09 +02:00
} else {
return 1;
}
return 0;
}
2020-08-04 08:49:11 +02:00
s16 func_80033830(add_val) {
game_status* gameStatus = *gGameStatusPtr;
2020-08-12 23:13:09 +02:00
if (gameStatus->boot_alpha != 0xFF) {
gameStatus->boot_alpha += add_val;
2020-08-13 07:03:47 +02:00
if ((gameStatus->boot_alpha > 0xFF)) {
2020-08-12 23:13:09 +02:00
gameStatus->boot_alpha = 0xFF;
}
2020-08-12 23:13:09 +02:00
} else {
return 1;
}
return 0;
}
2020-08-04 08:49:11 +02:00
void func_80033874(void) {
2020-08-12 23:13:09 +02:00
func_80137D88(0, (*gGameStatusPtr)->boot_alpha);
func_80137E10(0, (*gGameStatusPtr)->boot_blue, (*gGameStatusPtr)->boot_green, (*gGameStatusPtr)->boot_red);
}
2020-08-13 07:03:47 +02:00
void start_battle_countdown(void) {
D_800A0900 = 5;
}
2020-08-04 08:49:11 +02:00
INCLUDE_ASM(code_ebd0_len_6a0, step_battle);
INCLUDE_ASM(code_ebd0_len_6a0, func_80033B54);
INCLUDE_ASM(code_ebd0_len_6a0, func_80033B88);
INCLUDE_ASM(code_ebd0_len_6a0, func_80033BC0);
INCLUDE_ASM(code_ebd0_len_6a0, func_80033E64);