2020-10-03 15:22:44 +00:00
|
|
|
#include "global.h"
|
|
|
|
#include "vt.h"
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-12 01:52:50 +00:00
|
|
|
void func_80092320(PreNMIContext* this) {
|
|
|
|
this->state.running = false;
|
|
|
|
this->state.init = NULL;
|
|
|
|
this->state.size = 0;
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2020-10-12 01:52:50 +00:00
|
|
|
void PreNMI_Update(PreNMIContext* this) {
|
2020-03-17 04:31:30 +00:00
|
|
|
osSyncPrintf(VT_COL(YELLOW, BLACK) "prenmi_move\n" VT_RST);
|
|
|
|
|
|
|
|
// Strings existing only in rodata
|
2021-02-14 00:49:40 +00:00
|
|
|
if (0) {
|
|
|
|
osSyncPrintf("../z_prenmi.c");
|
|
|
|
osSyncPrintf("(int)volume = %d\n");
|
|
|
|
}
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-12 01:52:50 +00:00
|
|
|
if (this->timer == 0) {
|
2022-06-03 19:43:30 +00:00
|
|
|
ViConfig_UpdateVi(true);
|
2020-10-12 01:52:50 +00:00
|
|
|
func_80092320(this);
|
2020-03-17 04:31:30 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2020-10-12 01:52:50 +00:00
|
|
|
this->timer--;
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2020-10-12 01:52:50 +00:00
|
|
|
void PreNMI_Draw(PreNMIContext* this) {
|
|
|
|
GraphicsContext* gfxCtx = this->state.gfxCtx;
|
2020-03-17 04:31:30 +00:00
|
|
|
|
|
|
|
osSyncPrintf(VT_COL(YELLOW, BLACK) "prenmi_draw\n" VT_RST);
|
|
|
|
|
2020-08-29 23:00:17 +00:00
|
|
|
OPEN_DISPS(gfxCtx, "../z_prenmi.c", 96);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-29 21:31:09 +00:00
|
|
|
gSPSegment(POLY_OPA_DISP++, 0x00, NULL);
|
2020-03-17 04:31:30 +00:00
|
|
|
func_80095248(gfxCtx, 0, 0, 0);
|
|
|
|
func_800940B0(gfxCtx);
|
2020-10-29 21:31:09 +00:00
|
|
|
gDPSetFillColor(POLY_OPA_DISP++, (GPACK_RGBA5551(255, 255, 255, 1) << 16) | GPACK_RGBA5551(255, 255, 255, 1));
|
|
|
|
gDPFillRectangle(POLY_OPA_DISP++, 0, this->timer + 100, SCREEN_WIDTH - 1, this->timer + 100);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-08-29 23:00:17 +00:00
|
|
|
CLOSE_DISPS(gfxCtx, "../z_prenmi.c", 112);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2020-10-12 01:52:50 +00:00
|
|
|
void PreNMI_Main(GameState* thisx) {
|
|
|
|
PreNMIContext* this = (PreNMIContext*)thisx;
|
2020-10-13 00:44:22 +00:00
|
|
|
|
2020-10-12 01:52:50 +00:00
|
|
|
PreNMI_Update(this);
|
|
|
|
PreNMI_Draw(this);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-10-12 01:52:50 +00:00
|
|
|
this->state.unk_A0 = 1;
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2020-10-12 01:52:50 +00:00
|
|
|
void PreNMI_Destroy(GameState* thisx) {
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2020-10-12 01:52:50 +00:00
|
|
|
void PreNMI_Init(GameState* thisx) {
|
|
|
|
PreNMIContext* this = (PreNMIContext*)thisx;
|
|
|
|
|
|
|
|
this->state.main = PreNMI_Main;
|
|
|
|
this->state.destroy = PreNMI_Destroy;
|
|
|
|
this->timer = 30;
|
|
|
|
this->unk_A8 = 10;
|
2020-03-17 04:31:30 +00:00
|
|
|
|
|
|
|
R_UPDATE_RATE = 1;
|
|
|
|
}
|