diff options
| author | MegaMech <MegaMech@users.noreply.github.com> | 2025-07-15 12:15:50 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-15 12:15:50 -0600 |
| commit | 4868fadcb94ac1c6b9752925eb73bbcbcf3803c3 (patch) | |
| tree | b6d46b13d039df3ae3457275f59eaf33d74c9adf | |
| parent | 01f6b9a1ce73b96921e401957bc66cd24fe70264 (diff) | |
Fix podium ceremony scene (#464)
* Update podium_ceremony_actors.c
* Update podium_ceremony_actors.h
* Update code_80281780.c
| -rw-r--r-- | src/ending/code_80281780.c | 2 | ||||
| -rw-r--r-- | src/ending/podium_ceremony_actors.c | 12 | ||||
| -rw-r--r-- | src/ending/podium_ceremony_actors.h | 1 |
3 files changed, 7 insertions, 8 deletions
diff --git a/src/ending/code_80281780.c b/src/ending/code_80281780.c index 2cddad580..46a3bd2b3 100644 --- a/src/ending/code_80281780.c +++ b/src/ending/code_80281780.c @@ -95,8 +95,6 @@ void func_802818BC(void) { void setup_podium_ceremony(void) { Camera* camera = &cameras[0]; - clear_podium_actors(); - gCurrentCourseId = COURSE_ROYAL_RACEWAY; SelectPodiumCeremony(); D_800DC5B4 = (u16) 1; diff --git a/src/ending/podium_ceremony_actors.c b/src/ending/podium_ceremony_actors.c index a80aeb129..4edfbff87 100644 --- a/src/ending/podium_ceremony_actors.c +++ b/src/ending/podium_ceremony_actors.c @@ -132,10 +132,6 @@ CeremonyActor* new_actor(ActorInitParams* arg0) { return actor; } -void clear_podium_actors() { - memset(&sPodiumActorList, 0, sizeof(CeremonyActor)); -} - u16 random_u16_credits(void) { u16 temp1, temp2; @@ -308,8 +304,14 @@ void unused_80280FA0(UNUSED CeremonyActor* actor) { void unused_80280FA8(UNUSED CeremonyActor* actor) { } +/* + * Original game only cleared D_802874D8.actorTimer. + * However, the whole struct needs to be cleared otherwise, the + * podium racers do not reset to their starting positions + * and some of the camera scenes or positions get mixed up. + */ void balloons_and_fireworks_init(void) { - D_802874D8.actorTimer = 0; + memset(&D_802874D8, 0, sizeof(struct_D_802874D8)); // podium fix sPodiumActorList = (CeremonyActor*) get_next_available_memory_addr(sizeof(CeremonyActor) * 200); bzero(sPodiumActorList, (sizeof(CeremonyActor) * 200)); new_actor(&initDummy); diff --git a/src/ending/podium_ceremony_actors.h b/src/ending/podium_ceremony_actors.h index f7646bb24..fb3499c71 100644 --- a/src/ending/podium_ceremony_actors.h +++ b/src/ending/podium_ceremony_actors.h @@ -100,7 +100,6 @@ void func_80281530(void); void func_80281538(void); void func_80281540(void); void podium_ceremony_loop(void); -void clear_podium_actors(void); extern struct_D_802874D8 D_802874D8; extern CeremonyActor* sPodiumActorList; |
