2020-10-03 15:22:44 +00:00
|
|
|
#include "global.h"
|
|
|
|
#include "vt.h"
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-03-22 21:19:43 +00:00
|
|
|
void func_80092320(PreNMIContext* prenmiCtx) {
|
2020-03-17 04:31:30 +00:00
|
|
|
prenmiCtx->state.running = false;
|
|
|
|
prenmiCtx->state.init = NULL;
|
|
|
|
prenmiCtx->state.size = 0;
|
|
|
|
}
|
|
|
|
|
2020-03-22 21:19:43 +00:00
|
|
|
void PreNMI_Update(PreNMIContext* prenmiCtx) {
|
2020-03-17 04:31:30 +00:00
|
|
|
osSyncPrintf(VT_COL(YELLOW, BLACK) "prenmi_move\n" VT_RST);
|
|
|
|
|
|
|
|
// Strings existing only in rodata
|
|
|
|
("../z_prenmi.c");
|
|
|
|
("(int)volume = %d\n");
|
|
|
|
|
2020-03-22 21:19:43 +00:00
|
|
|
if (prenmiCtx->timer == 0) {
|
2020-03-17 04:31:30 +00:00
|
|
|
ViConfig_UpdateVi(1);
|
|
|
|
func_80092320(prenmiCtx);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
prenmiCtx->timer--;
|
|
|
|
}
|
|
|
|
|
2020-03-22 21:19:43 +00:00
|
|
|
void PreNMI_Draw(PreNMIContext* prenmiCtx) {
|
2020-03-17 04:31:30 +00:00
|
|
|
GraphicsContext* gfxCtx = prenmiCtx->state.gfxCtx;
|
|
|
|
|
|
|
|
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-08-29 23:00:17 +00:00
|
|
|
gSPSegment(oGfxCtx->polyOpa.p++, 0x00, NULL);
|
2020-03-17 04:31:30 +00:00
|
|
|
func_80095248(gfxCtx, 0, 0, 0);
|
|
|
|
func_800940B0(gfxCtx);
|
2020-08-29 23:00:17 +00:00
|
|
|
gDPSetFillColor(oGfxCtx->polyOpa.p++, (GPACK_RGBA5551(255, 255, 255, 1) << 16) | GPACK_RGBA5551(255, 255, 255, 1));
|
|
|
|
gDPFillRectangle(oGfxCtx->polyOpa.p++, 0, prenmiCtx->timer + 100, SCREEN_WIDTH - 1, prenmiCtx->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-03-22 21:19:43 +00:00
|
|
|
void PreNMI_Main(PreNMIContext* prenmiCtx) {
|
2020-03-17 04:31:30 +00:00
|
|
|
PreNMI_Update(prenmiCtx);
|
|
|
|
PreNMI_Draw(prenmiCtx);
|
|
|
|
|
|
|
|
prenmiCtx->state.unk_A0 = 1;
|
|
|
|
}
|
|
|
|
|
2020-03-22 21:19:43 +00:00
|
|
|
void PreNMI_Destroy(PreNMIContext* prenmiCtx) {
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2020-03-22 21:19:43 +00:00
|
|
|
void PreNMI_Init(PreNMIContext* prenmiCtx) {
|
2020-03-17 04:31:30 +00:00
|
|
|
prenmiCtx->state.main = PreNMI_Main;
|
|
|
|
prenmiCtx->state.destroy = PreNMI_Destroy;
|
|
|
|
prenmiCtx->timer = 30;
|
|
|
|
prenmiCtx->unk_A8 = 10;
|
|
|
|
|
|
|
|
R_UPDATE_RATE = 1;
|
|
|
|
}
|