diff options
| author | Tharo <17233964+Thar0@users.noreply.github.com> | 2025-05-05 10:31:35 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-05 05:31:35 -0400 |
| commit | 2a8785ffef2a12f185986d52eb17c9faf92f86be (patch) | |
| tree | c24df03e183ed02ea9682bc5ea3cc8aa5f4f0b6b /src | |
| parent | 1bef144995ce6da6cd5f30194594542069a7143d (diff) | |
C23 Compatibility (#2525)
Diffstat (limited to 'src')
| -rw-r--r-- | src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c | 6 | ||||
| -rw-r--r-- | src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.h | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c index b9a55b7ee..75c942820 100644 --- a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c +++ b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c @@ -125,8 +125,10 @@ void KaleidoScope_DrawPlayerWork(PlayState* play) { BOOTS_EQUIP_TO_PLAYER(CUR_EQUIP_VALUE(EQUIP_TYPE_BOOTS))); } +#ifndef AVOID_UB // Wrong prototype; this function is called with `play` even though it has no arguments void KaleidoScope_ProcessPlayerPreRender(PlayState* play); +#endif void KaleidoScope_DrawEquipment(PlayState* play) { static s16 sEquipTimer = 0; @@ -592,8 +594,12 @@ void KaleidoScope_DrawEquipment(PlayState* play) { } if ((pauseCtx->mainState == PAUSE_MAIN_STATE_7) && (sEquipTimer == 9)) { +#ifndef AVOID_UB //! @bug: This function shouldn't take any arguments KaleidoScope_ProcessPlayerPreRender(play); +#else + KaleidoScope_ProcessPlayerPreRender(); +#endif } gSPSegment(POLY_OPA_DISP++, 0x07, pauseCtx->playerSegment); diff --git a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.h b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.h index 5a9923443..27454ee1f 100644 --- a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.h +++ b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.h @@ -184,7 +184,9 @@ Gfx* KaleidoScope_QuadTextureIA4(Gfx* gfx, void* texture, s16 width, s16 height, Gfx* KaleidoScope_QuadTextureIA8(Gfx* gfx, void* texture, s16 width, s16 height, u16 point); void KaleidoScope_MoveCursorToSpecialPos(struct PlayState* play, u16 specialPos); void KaleidoScope_DrawQuadTextureRGBA32(GraphicsContext* gfxCtx, void* texture, u16 width, u16 height, u16 point); -void KaleidoScope_ProcessPlayerPreRender(); +#ifdef AVOID_UB +void KaleidoScope_ProcessPlayerPreRender(void); +#endif void KaleidoScope_SetupPlayerPreRender(struct PlayState* play); void KaleidoScope_DrawCursor(struct PlayState* play, u16 pageIndex); void KaleidoScope_UpdateDungeonMap(struct PlayState* play); |
