Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/ending/code_80280000.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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];
Expand Down
38 changes: 21 additions & 17 deletions src/ending/code_80281C40.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down Expand Up @@ -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();
}
4 changes: 2 additions & 2 deletions src/ending/code_80281C40.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 x, s32 y, const char* str, s32 value);
void render_podium_ceremony(void);

extern s32 gGotoMenu;
Expand Down
4 changes: 2 additions & 2 deletions src/ending/podium_ceremony_actors.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
}
Expand Down Expand Up @@ -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();
Expand Down
3 changes: 1 addition & 2 deletions src/ending/podium_ceremony_actors.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,14 @@ 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;
extern ActorInitParams initInitUnk;
extern ActorInitParams initBurst;

extern Gfx* D_802874D4;
extern s32 D_802874FC;
extern Mat4 D_80287500;

#endif
2 changes: 1 addition & 1 deletion src/render_objects.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/render_objects.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Loading