mirror of
https://github.com/n64decomp/mk64
synced 2026-08-26 15:36:41 -04:00
Podium Debug PR
This commit is contained in:
@@ -69,7 +69,7 @@ void func_80280038(void) {
|
||||
render_object(PLAYER_ONE + SCREEN_MODE_1P);
|
||||
render_player_snow_effect(PLAYER_ONE + SCREEN_MODE_1P);
|
||||
ceremony_transition_sliding_borders();
|
||||
func_80281C40();
|
||||
podium_debug_draw_prints();
|
||||
init_rdp();
|
||||
func_80093F10();
|
||||
init_rdp();
|
||||
@@ -102,7 +102,7 @@ void credits_loop(void) {
|
||||
}
|
||||
} else {
|
||||
|
||||
D_802874FC = 0;
|
||||
gPodiumDebugPrintIdx = 0;
|
||||
func_80283648(camera);
|
||||
temp_f12 = camera->lookAt[0] - camera->pos[0];
|
||||
temp = camera->lookAt[1] - camera->pos[1];
|
||||
|
||||
+21
-17
@@ -16,34 +16,35 @@
|
||||
#include "render_player.h"
|
||||
#include "defines.h"
|
||||
|
||||
struct UnkStruct80287560 {
|
||||
s16 unk0;
|
||||
s16 unk2;
|
||||
s32 unk4;
|
||||
s32 unk8;
|
||||
struct PodiumDebugPrintData {
|
||||
s16 x;
|
||||
s16 y;
|
||||
s32 value;
|
||||
const char* str;
|
||||
}; // 0xC
|
||||
|
||||
/** bss **/
|
||||
s32 gGotoMenu;
|
||||
s32 D_80287554;
|
||||
s32 D_80281C40_pad[2];
|
||||
struct UnkStruct80287560 D_80287560[30];
|
||||
static struct PodiumDebugPrintData sDebugPrintData[30];
|
||||
|
||||
void func_80281C40(void) {
|
||||
void podium_debug_draw_prints(void) {
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < D_802874FC; i++) {
|
||||
func_800579F8(D_80287560[i].unk0, D_80287560[i].unk2, (char*) D_80287560[i].unk8, D_80287560[i].unk4);
|
||||
for (i = 0; i < gPodiumDebugPrintIdx; i++) {
|
||||
render_podium_debug_prints([i].x, sDebugPrintData[i].y, (char*) sDebugPrintData[i].str, sDebugPrintData[i].value);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80281CB4(s32 arg0, s32 arg1, s32 arg2, s32 arg3) {
|
||||
if (D_802874FC < 0x1E) {
|
||||
D_80287560[D_802874FC].unk0 = arg0;
|
||||
D_80287560[D_802874FC].unk2 = arg1;
|
||||
D_80287560[D_802874FC].unk4 = arg3;
|
||||
D_80287560[D_802874FC].unk8 = arg2;
|
||||
D_802874FC++;
|
||||
// Allows printing a str and value
|
||||
UNUSED void podium_debug_print(s32 x, s32 y, const char* str, s32 value) {
|
||||
if (gPodiumDebugPrintIdx < 30) {
|
||||
sDebugPrintData[gPodiumDebugPrintIdx].x = x;
|
||||
sDebugPrintData[gPodiumDebugPrintIdx].y = y;
|
||||
sDebugPrintData[gPodiumDebugPrintIdx].value = value;
|
||||
sDebugPrintData[gPodiumDebugPrintIdx].str = str;
|
||||
gPodiumDebugPrintIdx += 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,6 +91,9 @@ void render_podium_ceremony(void) {
|
||||
gSPDisplayList(gDisplayListHead++, VIRTUAL_TO_PHYSICAL2(&D_80284EE0));
|
||||
func_80093F10();
|
||||
ceremony_transition_sliding_borders();
|
||||
func_80281C40();
|
||||
|
||||
// Example of debug print if it was used
|
||||
// podium_debug_print(10, 10, "my test str", 5);
|
||||
podium_debug_draw_prints();
|
||||
init_rdp();
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
/* Function Prototypes */
|
||||
|
||||
void func_80281C40(void);
|
||||
void func_80281CB4(s32, s32, s32, s32);
|
||||
void podium_debug_draw_prints(void);
|
||||
void podium_debug_print(s32, s32, s32, s32);
|
||||
void render_podium_ceremony(void);
|
||||
|
||||
extern s32 gGotoMenu;
|
||||
|
||||
@@ -70,7 +70,7 @@ struct_D_802874D8 D_802874D8; // 31 bytes
|
||||
// u8 D_802874F5;
|
||||
// u8 D_802874F6;
|
||||
CeremonyActor* sPodiumActorList;
|
||||
s32 D_802874FC;
|
||||
s32 gPodiumDebugPrintIdx;
|
||||
|
||||
void func_80280650(void) {
|
||||
}
|
||||
@@ -447,7 +447,7 @@ void func_80281540(void) {
|
||||
|
||||
void podium_ceremony_loop(void) {
|
||||
gMatrixObjectCount = 0;
|
||||
D_802874FC = 0;
|
||||
gPodiumDebugPrintIdx = 0;
|
||||
update_camera_podium_ceremony();
|
||||
func_80028F70();
|
||||
func_80022744();
|
||||
|
||||
@@ -102,7 +102,7 @@ void podium_ceremony_loop(void);
|
||||
|
||||
extern struct_D_802874D8 D_802874D8;
|
||||
extern CeremonyActor* sPodiumActorList;
|
||||
extern s32 D_802874FC;
|
||||
extern s32 gPodiumDebugPrintIdx;
|
||||
|
||||
extern ActorInitParams initBalloon;
|
||||
extern ActorInitParams initCone;
|
||||
@@ -110,7 +110,6 @@ extern ActorInitParams initInitUnk;
|
||||
extern ActorInitParams initBurst;
|
||||
|
||||
extern Gfx* D_802874D4;
|
||||
extern s32 D_802874FC;
|
||||
extern Mat4 D_80287500;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -4799,7 +4799,7 @@ UNUSED void func_800579B8(s32 arg0, s32 arg1, char* arg2) {
|
||||
func_80057778();
|
||||
}
|
||||
|
||||
void func_800579F8(s32 arg0, s32 arg1, char* arg2, u32 arg3) {
|
||||
void render_podium_debug_prints(s32 arg0, s32 arg1, char* arg2, u32 arg3) {
|
||||
load_debug_font();
|
||||
debug_print_string(&arg0, &arg1, arg2);
|
||||
debug_print_number(&arg0, &arg1, arg3, 10);
|
||||
|
||||
@@ -420,7 +420,7 @@ void func_800578B0(s32, s32, char*, u32);
|
||||
void func_80057908(s32, s32, char*, u32);
|
||||
void func_80057960(s32, s32, char*, u32);
|
||||
void func_800579B8(s32, s32, char*);
|
||||
void func_800579F8(s32, s32, char*, u32);
|
||||
void render_podium_debug_prints(s32, s32, char*, u32);
|
||||
void func_80057A50(s32, s32, char*, u32);
|
||||
void func_80057AA8(s32, s32, char*, u32);
|
||||
void func_80057B14(s32, s32, char*, u32);
|
||||
|
||||
Reference in New Issue
Block a user