1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-05-09 18:43:45 +00:00

C23 Compatibility

This commit is contained in:
Tharo 2025-05-04 22:43:04 +01:00
parent 1bef144995
commit 063ded531b
2 changed files with 9 additions and 1 deletions

View file

@ -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);

View file

@ -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);