mirror of
https://github.com/pmret/papermario.git
synced 2026-04-08 23:00:12 -04:00
* fixing segment * redoing subtree * git subrepo clone https://github.com/ethteck/splat.git tools/splat subrepo: subdir: "tools/splat" merged: "99cf514297" upstream: origin: "https://github.com/ethteck/splat.git" branch: "master" commit: "99cf514297" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo" commit: "2f68596" * fix symbol_addrs * sweet victory * reformat collision_main_lateral.s * Lots of matches, fixed diff.py issue, improved coverage.py * some more * update symbol_addrs * git subrepo pull tools/splat subrepo: subdir: "tools/splat" merged: "c46026725a" upstream: origin: "https://github.com/ethteck/splat.git" branch: "master" commit: "c46026725a" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo" commit: "2f68596" * update symbol_addrs * fix disasm * 2 mo * Jenkinsfile * PR comments * check_input_status_menu, removing some macros * a few funcs * assist updates * UnkAlphaFunc * UnkPartnerPosFuncs * Deleting stuff * oopz * dead_syms.txt, UnkNpcAIFunc14 * update symbol_addrs * cleanup * symbol_addrs * cleanup
100 lines
2.4 KiB
C
100 lines
2.4 KiB
C
#include "common.h"
|
|
#include "nu/nusys.h"
|
|
|
|
void gfxRetrace_Callback(s32);
|
|
void gfxPreNMI_Callback(void);
|
|
void gfx_task_main(void);
|
|
|
|
extern s32* D_80073E00;
|
|
extern s32 D_80073E04;
|
|
extern s16 D_80073E08;
|
|
extern s16 D_80073E0A;
|
|
extern s32* D_8009A680;
|
|
|
|
#ifdef NON_MATCHING
|
|
// Control flow issue w/ PANIC
|
|
void boot_main(void) {
|
|
OSViMode* viMode;
|
|
if (osTvType == OS_TV_NTSC) {
|
|
viMode = &osViModeTable[OS_TV_NTSC];
|
|
} else if (osTvType == OS_TV_MPAL) {
|
|
viMode = &osViModeTable[OS_TV_MPAL];
|
|
} else {
|
|
PANIC();
|
|
}
|
|
|
|
osViSetMode(viMode);
|
|
|
|
osViSetSpecialFeatures(OS_VI_GAMMA_OFF | OS_VI_GAMMA_DITHER_OFF | OS_VI_DIVOT_ON | OS_VI_DITHER_FILTER_ON);
|
|
nuGfxDisplayOff();
|
|
crash_create_monitor();
|
|
func_80025C60();
|
|
nuGfxInitEX2();
|
|
(*gGameStatusPtr)->contBitPattern = nuContInit();
|
|
func_8002D160();
|
|
func_802B2000();
|
|
func_802B203C();
|
|
nuGfxFuncSet(gfxRetrace_Callback);
|
|
nuGfxPreNMIFuncSet(gfxPreNMI_Callback);
|
|
{
|
|
// Required to match
|
|
s32* randSeed = &gRandSeed;
|
|
(*randSeed) += osGetCount();
|
|
}
|
|
nuGfxDisplayOn();
|
|
|
|
while (TRUE) {}
|
|
}
|
|
#else
|
|
INCLUDE_ASM(void, "code_1370_len_7d0", boot_main, void);
|
|
#endif
|
|
|
|
void gfxRetrace_Callback(s32 arg0) {
|
|
s32* temp_80073E00 = &D_80073E00;
|
|
|
|
if (*temp_80073E00 != 0) {
|
|
if (*temp_80073E00 == 1) {
|
|
nuGfxTaskAllEndWait();
|
|
if (arg0 == 0) {
|
|
void* fb = osViGetCurrentFramebuffer();
|
|
s32* temp_8009A680 = &D_8009A680;
|
|
|
|
temp_8009A680[2] = fb;
|
|
temp_8009A680[1] = fb;
|
|
temp_8009A680[0] = fb;
|
|
D_80073E04 = fb;
|
|
nuGfxSetCfb(temp_8009A680, 3);
|
|
osViSwapBuffer(*temp_8009A680);
|
|
*temp_80073E00 = 2;
|
|
}
|
|
}
|
|
if (D_80073E00 == 2) {
|
|
gfx_task_main();
|
|
}
|
|
} else {
|
|
s16* temp_80073E0A = &D_80073E0A;
|
|
|
|
*temp_80073E0A ^= 1;
|
|
if (*temp_80073E0A == 0) {
|
|
s16* temp_80073E08;
|
|
|
|
step_game_loop();
|
|
temp_80073E08 = &D_80073E08;
|
|
*temp_80073E08 = 1;
|
|
|
|
if (arg0 < 3) {
|
|
*temp_80073E08 = 0;
|
|
gfx_task_background();
|
|
gfx_draw_frame();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
INCLUDE_ASM(void, "code_1370_len_7d0", gfx_task_main);
|
|
|
|
void gfxPreNMI_Callback(void) {
|
|
D_80073E00 = 1;
|
|
nuContRmbForceStop();
|
|
}
|