summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ending/code_80280000.c4
-rw-r--r--src/ending/code_80281C40.c40
-rw-r--r--src/ending/code_80281C40.h6
-rw-r--r--src/ending/podium_ceremony_actors.c6
-rw-r--r--src/ending/podium_ceremony_actors.h3
-rw-r--r--src/render_objects.c2
-rw-r--r--src/render_objects.h2
7 files changed, 33 insertions, 30 deletions
diff --git a/src/ending/code_80280000.c b/src/ending/code_80280000.c
index 0ae8b934e..b9e75622f 100644
--- a/src/ending/code_80280000.c
+++ b/src/ending/code_80280000.c
@@ -81,7 +81,7 @@ void func_80280038(Camera* camera) {
render_object(gScreenOneCtx);
render_player_snow_effect(camera);
ceremony_transition_sliding_borders();
- func_80281C40();
+ podium_debug_draw_prints();
init_rdp();
func_80093F10();
init_rdp();
@@ -116,7 +116,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];
diff --git a/src/ending/code_80281C40.c b/src/ending/code_80281C40.c
index 08470accf..2ec58951d 100644
--- a/src/ending/code_80281C40.c
+++ b/src/ending/code_80281C40.c
@@ -20,41 +20,42 @@
#include "engine/tracks/Track.h"
#include "port/Game.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;
}
}
extern Gfx D_80284F70[];
extern Gfx D_80284EE0[];
-void func_80281D00(void) {
+void render_podium_ceremony(void) {
Camera* camera = gScreenOneCtx->camera;
UNUSED s32 pad[3];
u16 perspNorm;
@@ -99,6 +100,9 @@ void func_80281D00(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();
}
diff --git a/src/ending/code_80281C40.h b/src/ending/code_80281C40.h
index 23f356284..33ebb4cf1 100644
--- a/src/ending/code_80281C40.h
+++ b/src/ending/code_80281C40.h
@@ -3,9 +3,9 @@
/* Function Prototypes */
-void func_80281C40(void);
-void func_80281CB4(s32, s32, s32, s32);
-void func_80281D00(void);
+void podium_debug_draw_prints(void);
+void podium_debug_print(s32, s32, s32, s32);
+void render_podium_ceremony(void);
extern s32 gGotoMenu;
extern u16 gIsInQuitToMenuTransition;
diff --git a/src/ending/podium_ceremony_actors.c b/src/ending/podium_ceremony_actors.c
index 72e11a813..8b7ac2dcf 100644
--- a/src/ending/podium_ceremony_actors.c
+++ b/src/ending/podium_ceremony_actors.c
@@ -77,7 +77,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) {
}
@@ -467,7 +467,7 @@ void podium_ceremony_loop(void) {
Editor_ClearMatrix();
CM_TickEditor();
gMatrixObjectCount = 0;
- D_802874FC = 0;
+ gPodiumDebugPrintIdx = 0;
update_camera_podium_ceremony();
func_80028F70();
func_80022744();
@@ -478,7 +478,7 @@ void podium_ceremony_loop(void) {
func_8001C14C();
update_vehicles();
}
- func_80281D00();
+ render_podium_ceremony();
func_80281540();
#if DVDL
display_dvdl();
diff --git a/src/ending/podium_ceremony_actors.h b/src/ending/podium_ceremony_actors.h
index 0a05e1892..c5c8a2173 100644
--- a/src/ending/podium_ceremony_actors.h
+++ b/src/ending/podium_ceremony_actors.h
@@ -104,7 +104,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;
@@ -112,7 +112,6 @@ extern ActorInitParams initInitUnk;
extern ActorInitParams initBurst;
extern Gfx* D_802874D4;
-extern s32 D_802874FC;
extern Mat4 D_80287500;
#endif
diff --git a/src/render_objects.c b/src/render_objects.c
index 1c22699e0..b73df9738 100644
--- a/src/render_objects.c
+++ b/src/render_objects.c
@@ -3954,7 +3954,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);
diff --git a/src/render_objects.h b/src/render_objects.h
index 175943e94..74a673af9 100644
--- a/src/render_objects.h
+++ b/src/render_objects.h
@@ -364,7 +364,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);