Skip to content

Commit 6d52684

Browse files
authored
Format script improvements and use strict name checks (zeldaret#1275)
* Prioritize using clang-tidy 6 and improve format.sh * Use clang-tidy-6.0 when available since it's better at applying 'readability-inconsistent-declaration-parameter-name' * Add -m32 and -Wno-everything to compiler options to avoid unwanted errors and warnings * Remove -fsyntax-only since it serves no purpose in the context of clang-tidy * Apply clang-tidy fixes for argument names * Run format.sh again * Use 'Strict' option instead of relying on clang-tidy 6 * Run format script * Add --fix-notes to clang-tidy options for version 13+
1 parent 017a3aa commit 6d52684

File tree

106 files changed

+244
-219
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+244
-219
lines changed

.clang-tidy

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@ WarningsAsErrors: ''
33
HeaderFilterRegex: '(src|include)\/.*\.h$'
44
FormatStyle: 'file'
55
CheckOptions:
6+
# Require argument names to match exactly (instead of allowing a name to be a prefix/suffix of another)
7+
# Note: 'true' is expected by clang-tidy 12+ but '1' is used for compatibility with older versions
8+
- key: readability-inconsistent-declaration-parameter-name.Strict
9+
value: 1

assets/xml/textures/backgrounds.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,4 +243,4 @@
243243
<Texture Name="gZoraShopBg2TLUT" OutName="zora_shop_tlut2" Format="rgba16" Width="16" Height="16" Offset="0x200"/>
244244
</File>
245245

246-
</Root>
246+
</Root>

format.sh

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
11
#!/usr/bin/env bash
22

3+
# Clang-Format version and options (see .clang-format for rules applied)
4+
# Version 11 is used when available for more consistency between contributors
35
FORMAT_VER="11"
46
FORMAT_OPTS="-i -style=file"
7+
8+
# Clang-Tidy options (see .clang-tidy for checks enabled)
59
TIDY_OPTS="-p . --fix --fix-errors"
6-
COMPILER_OPTS="-fno-builtin -fsyntax-only -std=gnu90 -Iinclude -Isrc -Ibuild -I. -D_LANGUAGE_C -DNON_MATCHING"
10+
11+
# Compiler options used with Clang-Tidy
12+
# Normal warnings are disabled with -Wno-everything to focus only on tidying
13+
INCLUDES="-Iinclude -Isrc -Ibuild -I."
14+
DEFINES="-D_LANGUAGE_C -DNON_MATCHING"
15+
COMPILER_OPTS="-fno-builtin -std=gnu90 -m32 -Wno-everything ${INCLUDES} ${DEFINES}"
16+
17+
TIDY_VERSION_REGEX="LLVM version ([0-9]+)"
718

819
# https://backreference.org/2010/05/23/sanitizing-files-with-no-trailing-newline/index.html
920
# "gets the last character of the file pipes it into read, which will exit with
@@ -34,18 +45,28 @@ else
3445
fi
3546
fi
3647

37-
if [ ! $(command -v clang-tidy) ]
48+
if [ $(command -v clang-tidy) ]
3849
then
50+
CLANG_TIDY="clang-tidy"
51+
else
3952
echo "clang-tidy not found. Exiting."
4053
exit 1
4154
fi
4255

56+
# Try to detect the clang-tidy version and add --fix-notes for version 13+
57+
# This is used to ensure all fixes are applied properly in recent versions
58+
if [[ $(${CLANG_TIDY} --version) =~ $TIDY_VERSION_REGEX ]]; then
59+
if (( ${BASH_REMATCH[1]} >= 13 )); then
60+
TIDY_OPTS="${TIDY_OPTS} --fix-notes"
61+
fi
62+
fi
63+
4364
if (( $# > 0 )); then
4465
echo "Formatting file(s) $*"
4566
echo "Running clang-format..."
4667
${CLANG_FORMAT} ${FORMAT_OPTS} "$@"
4768
echo "Running clang-tidy..."
48-
clang-tidy ${TIDY_OPTS} "$@" -- ${COMPILER_OPTS} &> /dev/null
69+
${CLANG_TIDY} ${TIDY_OPTS} "$@" -- ${COMPILER_OPTS} &> /dev/null
4970
echo "Adding missing final new lines..."
5071
add_final_newline "$@"
5172
echo "Done formatting file(s) $*"
@@ -56,7 +77,7 @@ echo "Formatting C files. This will take a bit"
5677
echo "Running clang-format..."
5778
${CLANG_FORMAT} ${FORMAT_OPTS} src/**/*.c
5879
echo "Running clang-tidy..."
59-
clang-tidy ${TIDY_OPTS} src/**/*.c -- ${COMPILER_OPTS} &> /dev/null
80+
${CLANG_TIDY} ${TIDY_OPTS} src/**/*.c -- ${COMPILER_OPTS} &> /dev/null
6081
echo "Adding missing final new lines..."
6182
find src/ -type f -name "*.c" -exec bash -c 'add_final_newline "$@"' bash {} +
6283
find assets/xml/ -type f -name "*.xml" -exec bash -c 'add_final_newline "$@"' bash {} +

include/functions.h

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,7 @@ void CollisionCheck_SpawnRedBlood(PlayState* play, Vec3f* v);
795795
void CollisionCheck_SpawnWaterDroplets(PlayState* play, Vec3f* v);
796796
void CollisionCheck_SpawnShieldParticles(PlayState* play, Vec3f* v);
797797
void CollisionCheck_SpawnShieldParticlesMetal(PlayState* play, Vec3f* v);
798-
void CollisionCheck_SpawnShieldParticlesMetalSound(PlayState* play, Vec3f* v, Vec3f* actorPos);
798+
void CollisionCheck_SpawnShieldParticlesMetalSound(PlayState* play, Vec3f* v, Vec3f* pos);
799799
void CollisionCheck_SpawnShieldParticlesMetal2(PlayState* play, Vec3f* v);
800800
void CollisionCheck_SpawnShieldParticlesWood(PlayState* play, Vec3f* v, Vec3f* actorPos);
801801
s32 CollisionCheck_CylSideVsLineSeg(f32 radius, f32 height, f32 offset, Vec3f* actorPos, Vec3f* itemPos,
@@ -842,7 +842,7 @@ void func_8006D0EC(PlayState* play, Player* player);
842842
void func_8006D684(PlayState* play, Player* player);
843843
void func_8006DC68(PlayState* play, Player* player);
844844
void func_8006DD9C(Actor* actor, Vec3f* arg1, s16 arg2);
845-
s32 Jpeg_Decode(void* data, void* zbuffer, void* workBuff, u32 workSize);
845+
s32 Jpeg_Decode(void* data, void* zbuffer, void* work, u32 workSize);
846846
void KaleidoSetup_Update(PlayState* play);
847847
void KaleidoSetup_Init(PlayState* play);
848848
void KaleidoSetup_Destroy(PlayState* play);
@@ -853,7 +853,7 @@ void Font_LoadOrderedFont(Font* font);
853853
s32 Environment_ZBufValToFixedPoint(s32 zBufferVal);
854854
u16 Environment_GetPixelDepth(s32 x, s32 y);
855855
void Environment_GraphCallback(GraphicsContext* gfxCtx, void* param);
856-
void Environment_Init(PlayState* play, EnvironmentContext* envCtx, s32 unused);
856+
void Environment_Init(PlayState* play2, EnvironmentContext* envCtx, s32 unused);
857857
u8 Environment_SmoothStepToU8(u8* pvalue, u8 target, u8 scale, u8 step, u8 minStep);
858858
u8 Environment_SmoothStepToS8(s8* pvalue, s8 target, u8 scale, u8 step, u8 minStep);
859859
f32 Environment_LerpWeight(u16 max, u16 min, u16 val);
@@ -986,8 +986,8 @@ VecSph* OLib_Vec3fToVecSph(VecSph* dest, Vec3f* vec);
986986
VecSph* OLib_Vec3fToVecSphGeo(VecSph* dest, Vec3f* vec);
987987
VecSph* OLib_Vec3fDiffToVecSphGeo(VecSph* dest, Vec3f* a, Vec3f* b);
988988
Vec3f* OLib_Vec3fDiffRad(Vec3f* dest, Vec3f* a, Vec3f* b);
989-
s16 OnePointCutscene_Init(PlayState* play, s16 csId, s16 timer, Actor* actor, s16 camId);
990-
s16 OnePointCutscene_EndCutscene(PlayState* play, s16 camId);
989+
s16 OnePointCutscene_Init(PlayState* play, s16 csId, s16 timer, Actor* actor, s16 parentCamId);
990+
s16 OnePointCutscene_EndCutscene(PlayState* play, s16 subCamId);
991991
s32 OnePointCutscene_Attention(PlayState* play, Actor* actor);
992992
s32 OnePointCutscene_AttentionSetSfx(PlayState* play, Actor* actor, s32 sfxId);
993993
void OnePointCutscene_EnableAttention(void);
@@ -1099,7 +1099,7 @@ s16 Quake_Callback4(QuakeRequest* req, ShakeInfo* shake);
10991099
s16 Quake_Callback5(QuakeRequest* req, ShakeInfo* shake);
11001100
s16 Quake_Callback6(QuakeRequest* req, ShakeInfo* shake);
11011101
s16 Quake_GetFreeIndex(void);
1102-
QuakeRequest* Quake_AddImpl(Camera* cam, u32 callbackIdx);
1102+
QuakeRequest* Quake_AddImpl(Camera* camera, u32 callbackIdx);
11031103
void Quake_Remove(QuakeRequest* req);
11041104
QuakeRequest* Quake_GetRequest(s16 idx);
11051105
QuakeRequest* Quake_SetValue(s16 idx, s16 valueType, s16 value);
@@ -1109,7 +1109,7 @@ s16 Quake_GetCountdown(s16 idx);
11091109
u32 Quake_SetQuakeValues(s16 idx, s16 y, s16 x, s16 zoom, s16 rotZ);
11101110
u32 Quake_SetUnkValues(s16 idx, s16 arg1, SubQuakeRequest14 arg2);
11111111
void Quake_Init(void);
1112-
s16 Quake_Add(Camera* cam, u32 callbackIdx);
1112+
s16 Quake_Add(Camera* camera, u32 callbackIdx);
11131113
u32 Quake_RemoveFromIdx(s16 idx);
11141114
s16 Quake_Calc(Camera* camera, QuakeCamCalc* camData);
11151115
Gfx* Gfx_SetFog(Gfx* gfx, s32 r, s32 g, s32 b, s32 a, s32 near, s32 far);
@@ -1289,7 +1289,7 @@ s32 Skin_ApplyAnimTransformations(Skin* skin, MtxF* limbMatrices, Actor* actor,
12891289
void SkinMatrix_Vec3fMtxFMultXYZW(MtxF* mf, Vec3f* src, Vec3f* xyzDest, f32* wDest);
12901290
void SkinMatrix_Vec3fMtxFMultXYZ(MtxF* mf, Vec3f* src, Vec3f* dest);
12911291
void SkinMatrix_MtxFMtxFMult(MtxF* mfA, MtxF* mfB, MtxF* dest);
1292-
void SkinMatrix_GetClear(MtxF** mf);
1292+
void SkinMatrix_GetClear(MtxF** mfp);
12931293
void SkinMatrix_MtxFCopy(MtxF* src, MtxF* dest);
12941294
s32 SkinMatrix_Invert(MtxF* src, MtxF* dest);
12951295
void SkinMatrix_SetScale(MtxF* mf, f32 x, f32 y, f32 z);
@@ -1305,10 +1305,10 @@ void Sram_InitNewSave(void);
13051305
void Sram_InitDebugSave(void);
13061306
void Sram_OpenSave(SramContext* sramCtx);
13071307
void Sram_WriteSave(SramContext* sramCtx);
1308-
void Sram_VerifyAndLoadAllSaves(FileChooseContext* fileChoose, SramContext* sramCtx);
1309-
void Sram_InitSave(FileChooseContext* fileChoose, SramContext* sramCtx);
1310-
void Sram_EraseSave(FileChooseContext* fileChoose, SramContext* sramCtx);
1311-
void Sram_CopySave(FileChooseContext* fileChoose, SramContext* sramCtx);
1308+
void Sram_VerifyAndLoadAllSaves(FileChooseContext* fileChooseCtx, SramContext* sramCtx);
1309+
void Sram_InitSave(FileChooseContext* fileChooseCtx, SramContext* sramCtx);
1310+
void Sram_EraseSave(FileChooseContext* fileChooseCtx, SramContext* sramCtx);
1311+
void Sram_CopySave(FileChooseContext* fileChooseCtx, SramContext* sramCtx);
13121312
void Sram_WriteSramHeader(SramContext* sramCtx);
13131313
void Sram_InitSram(GameState* gameState, SramContext* sramCtx);
13141314
void Sram_Alloc(GameState* gameState, SramContext* sramCtx);
@@ -1329,8 +1329,8 @@ void func_800AA178(u32);
13291329
View* View_New(GraphicsContext* gfxCtx);
13301330
void View_Free(View* view);
13311331
void View_Init(View*, GraphicsContext*);
1332-
void View_LookAt(View* view, Vec3f* eye, Vec3f* lookAt, Vec3f* up);
1333-
void View_LookAtUnsafe(View* view, Vec3f* eye, Vec3f* lookAt, Vec3f* up);
1332+
void View_LookAt(View* view, Vec3f* eye, Vec3f* at, Vec3f* up);
1333+
void View_LookAtUnsafe(View* view, Vec3f* eye, Vec3f* at, Vec3f* up);
13341334
void View_SetScale(View* view, f32 scale);
13351335
void View_GetScale(View* view, f32* scale);
13361336
void View_SetPerspective(View* view, f32 fovy, f32 zNear, f32 zFar);
@@ -1350,9 +1350,9 @@ void View_Apply(View* view, s32 mask);
13501350
s32 View_ApplyOrthoToOverlay(View* view);
13511351
s32 View_ApplyPerspectiveToOverlay(View* view);
13521352
s32 View_UpdateViewingMatrix(View* view);
1353-
s32 View_ApplyTo(View* view, s32 mask, Gfx** p);
1353+
s32 View_ApplyTo(View* view, s32 mask, Gfx** gfxp);
13541354
s32 View_ErrorCheckEyePosition(f32 eyeX, f32 eyeY, f32 eyeZ);
1355-
void ViMode_LogPrint(OSViMode* viMode);
1355+
void ViMode_LogPrint(OSViMode* osViMode);
13561356
void ViMode_Configure(ViMode* viMode, s32 mode, s32 type, s32 unk_70, s32 unk_74, s32 unk_78, s32 unk_7C, s32 width,
13571357
s32 height, s32 unk_left, s32 unk_right, s32 unk_top, s32 unk_bottom);
13581358
void ViMode_Save(ViMode* viMode);
@@ -1382,22 +1382,22 @@ TransitionUnk* TransitionUnk_Init(TransitionUnk* this, s32 row, s32 col);
13821382
void TransitionUnk_SetData(TransitionUnk* this);
13831383
void TransitionUnk_Draw(TransitionUnk* this, Gfx**);
13841384
void func_800B23E8(TransitionUnk* this);
1385-
void TransitionTriforce_Start(void* this);
1386-
void* TransitionTriforce_Init(void* this);
1387-
void TransitionTriforce_Destroy(void* this);
1388-
void TransitionTriforce_Update(void* this, s32 updateRate);
1389-
void TransitionTriforce_SetColor(void* this, u32 color);
1390-
void TransitionTriforce_SetType(void* this, s32 type);
1391-
void TransitionTriforce_Draw(void* this, Gfx** gfxP);
1392-
s32 TransitionTriforce_IsDone(void* this);
1393-
void TransitionWipe_Start(void* this);
1394-
void* TransitionWipe_Init(void* this);
1395-
void TransitionWipe_Destroy(void* this);
1396-
void TransitionWipe_Update(void* this, s32 updateRate);
1397-
void TransitionWipe_Draw(void* this, Gfx** gfxP);
1398-
s32 TransitionWipe_IsDone(void* this);
1399-
void TransitionWipe_SetType(void* this, s32 type);
1400-
void TransitionWipe_SetColor(void* this, u32 color);
1385+
void TransitionTriforce_Start(void* thisx);
1386+
void* TransitionTriforce_Init(void* thisx);
1387+
void TransitionTriforce_Destroy(void* thisx);
1388+
void TransitionTriforce_Update(void* thisx, s32 updateRate);
1389+
void TransitionTriforce_SetColor(void* thisx, u32 color);
1390+
void TransitionTriforce_SetType(void* thisx, s32 type);
1391+
void TransitionTriforce_Draw(void* thisx, Gfx** gfxP);
1392+
s32 TransitionTriforce_IsDone(void* thisx);
1393+
void TransitionWipe_Start(void* thisx);
1394+
void* TransitionWipe_Init(void* thisx);
1395+
void TransitionWipe_Destroy(void* thisx);
1396+
void TransitionWipe_Update(void* thisx, s32 updateRate);
1397+
void TransitionWipe_Draw(void* thisx, Gfx** gfxP);
1398+
s32 TransitionWipe_IsDone(void* thisx);
1399+
void TransitionWipe_SetType(void* thisx, s32 type);
1400+
void TransitionWipe_SetColor(void* thisx, u32 color);
14011401
void TransitionCircle_Start(void* thisx);
14021402
void* TransitionCircle_Init(void* thisx);
14031403
void TransitionCircle_Destroy(void* thisx);
@@ -1406,15 +1406,15 @@ void TransitionCircle_Draw(void* thisx, Gfx** gfxP);
14061406
s32 TransitionCircle_IsDone(void* thisx);
14071407
void TransitionCircle_SetType(void* thisx, s32 type);
14081408
void TransitionCircle_SetColor(void* thisx, u32 color);
1409-
void TransitionCircle_SetUnkColor(void* thisx, u32 color);
1410-
void TransitionFade_Start(void* this);
1411-
void* TransitionFade_Init(void* this);
1412-
void TransitionFade_Destroy(void* this);
1413-
void TransitionFade_Update(void* this, s32 updateRate);
1414-
void TransitionFade_Draw(void* this, Gfx** gfxP);
1415-
s32 TransitionFade_IsDone(void* this);
1416-
void TransitionFade_SetColor(void* this, u32 color);
1417-
void TransitionFade_SetType(void* this, s32 type);
1409+
void TransitionCircle_SetUnkColor(void* thisx, u32 unkColor);
1410+
void TransitionFade_Start(void* thisx);
1411+
void* TransitionFade_Init(void* thisx);
1412+
void TransitionFade_Destroy(void* thisx);
1413+
void TransitionFade_Update(void* thisx, s32 updateRate);
1414+
void TransitionFade_Draw(void* thisx, Gfx** gfxP);
1415+
s32 TransitionFade_IsDone(void* thisx);
1416+
void TransitionFade_SetColor(void* thisx, u32 color);
1417+
void TransitionFade_SetType(void* thisx, s32 type);
14181418
void ShrinkWindow_SetVal(s32 value);
14191419
u32 ShrinkWindow_GetVal(void);
14201420
void ShrinkWindow_SetCurrentVal(s32 currentVal);
@@ -1612,21 +1612,21 @@ void ListAlloc_Free(ListAlloc* this, void* data);
16121612
void ListAlloc_FreeAll(ListAlloc* this);
16131613
void Main_LogSystemHeap(void);
16141614
void Main(void* arg);
1615-
OSMesgQueue* PadMgr_LockSerialMesgQueue(PadMgr* padmgr);
1616-
void PadMgr_UnlockSerialMesgQueue(PadMgr* padmgr, OSMesgQueue* serialEventQueue);
1617-
void PadMgr_LockPadData(PadMgr* padmgr);
1618-
void PadMgr_UnlockPadData(PadMgr* padmgr);
1619-
void PadMgr_RumbleControl(PadMgr* padmgr);
1620-
void PadMgr_RumbleStop(PadMgr* padmgr);
1621-
void PadMgr_RumbleReset(PadMgr* padmgr);
1622-
void PadMgr_RumbleSet(PadMgr* padmgr, u8* ctrlrRumbles);
1623-
void PadMgr_ProcessInputs(PadMgr* padmgr);
1624-
void PadMgr_HandleRetraceMsg(PadMgr* padmgr);
1625-
void PadMgr_HandlePreNMI(PadMgr* padmgr);
1615+
OSMesgQueue* PadMgr_LockSerialMesgQueue(PadMgr* padMgr);
1616+
void PadMgr_UnlockSerialMesgQueue(PadMgr* padMgr, OSMesgQueue* serialEventQueue);
1617+
void PadMgr_LockPadData(PadMgr* padMgr);
1618+
void PadMgr_UnlockPadData(PadMgr* padMgr);
1619+
void PadMgr_RumbleControl(PadMgr* padMgr);
1620+
void PadMgr_RumbleStop(PadMgr* padMgr);
1621+
void PadMgr_RumbleReset(PadMgr* padMgr);
1622+
void PadMgr_RumbleSet(PadMgr* padMgr, u8* ctrlrRumbles);
1623+
void PadMgr_ProcessInputs(PadMgr* padMgr);
1624+
void PadMgr_HandleRetraceMsg(PadMgr* padMgr);
1625+
void PadMgr_HandlePreNMI(PadMgr* padMgr);
16261626
// This function must remain commented out, because it is called incorrectly in
16271627
// fault.c (actual bug in game), and the compiler notices and won't compile it
16281628
// void PadMgr_RequestPadData(PadMgr* padmgr, Input* inputs, s32 mode);
1629-
void PadMgr_Init(PadMgr* padmgr, OSMesgQueue* serialEventQueue, IrqMgr* irqMgr, OSId id, OSPri priority, void* stack);
1629+
void PadMgr_Init(PadMgr* padMgr, OSMesgQueue* serialEventQueue, IrqMgr* irqMgr, OSId id, OSPri priority, void* stack);
16301630
void SpeedMeter_InitImpl(SpeedMeter* this, u32 arg1, u32 y);
16311631
void SpeedMeter_Init(SpeedMeter* this);
16321632
void SpeedMeter_Destroy(SpeedMeter* this);
@@ -1875,7 +1875,7 @@ Note* Audio_AllocNote(SequenceLayer* layer);
18751875
void Audio_NoteInitAll(void);
18761876
void Audio_SequenceChannelProcessSound(SequenceChannel* channel, s32 recalculateVolume, s32 applyBend);
18771877
void Audio_SequencePlayerProcessSound(SequencePlayer* seqPlayer);
1878-
f32 Audio_GetPortamentoFreqScale(Portamento* p);
1878+
f32 Audio_GetPortamentoFreqScale(Portamento* portamento);
18791879
s16 Audio_GetVibratoPitchChange(VibratoState* vib);
18801880
f32 Audio_GetVibratoFreqScale(VibratoState* vib);
18811881
void Audio_NoteVibratoUpdate(Note* note);
@@ -2019,7 +2019,7 @@ void* Overlay_AllocateAndLoad(uintptr_t vRomStart, uintptr_t vRomEnd, void* vRam
20192019
void MtxConv_F2L(Mtx* m1, MtxF* m2);
20202020
void MtxConv_L2F(MtxF* m1, Mtx* m2);
20212021
void Overlay_Relocate(void* allocatedVRamAddress, OverlayRelocationSection* overlayInfo, void* vRamStart);
2022-
s32 Overlay_Load(uintptr_t vRomStart, uintptr_t vRomEnd, void* vRamStart, void* vRamEnd, void* allocatedVRamAddress);
2022+
s32 Overlay_Load(uintptr_t vRomStart, uintptr_t vRomEnd, void* vRamStart, void* vRamEnd, void* allocatedVRamAddr);
20232023
// ? func_800FC800(?);
20242024
// ? func_800FC83C(?);
20252025
// ? func_800FCAB4(?);
@@ -2195,7 +2195,7 @@ void guPositionF(f32 mf[4][4], f32 rot, f32 pitch, f32 yaw, f32 scale, f32 x, f3
21952195
void guPosition(Mtx*, f32, f32, f32, f32, f32, f32, f32);
21962196
OSYieldResult osSpTaskYielded(OSTask* task);
21972197
void guRotateF(f32 m[4][4], f32 a, f32 x, f32 y, f32 z);
2198-
void guRotate(Mtx*, f32 angle, f32 x, f32 y, f32 z);
2198+
void guRotate(Mtx*, f32 a, f32 x, f32 y, f32 z);
21992199
s32 osAiSetFrequency(u32 frequency);
22002200
OSThread* __osGetActiveQueue(void);
22012201
void guNormalize(f32* x, f32* y, f32* z);
@@ -2207,7 +2207,7 @@ void guOrthoF(f32[4][4], f32, f32, f32, f32, f32, f32, f32);
22072207
void guOrtho(Mtx*, f32, f32, f32, f32, f32, f32, f32);
22082208
f32 cosf(f32);
22092209
s16 coss(u16);
2210-
void osViSetEvent(OSMesgQueue* mq, OSMesg m, u32 retraceCount);
2210+
void osViSetEvent(OSMesgQueue* mq, OSMesg msg, u32 retraceCount);
22112211
s32 osPfsIsPlug(OSMesgQueue* mq, u8* pattern);
22122212
void __osPfsRequestData(u8 poll);
22132213
void __osPfsGetInitData(u8* pattern, OSContStatus* contData);

src/code/audio_heap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1371,7 +1371,7 @@ void AudioHeap_ChangeStorage(StorageChange* change, Sample* sample) {
13711371
}
13721372
}
13731373

1374-
void AudioHeap_ApplySampleBankCacheInternal(s32 apply, s32 id);
1374+
void AudioHeap_ApplySampleBankCacheInternal(s32 apply, s32 sampleBankId);
13751375

13761376
void AudioHeap_DiscardSampleBank(s32 sampleBankId) {
13771377
AudioHeap_ApplySampleBankCacheInternal(false, sampleBankId);

src/code/audio_load.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,22 @@ typedef struct {
2727
typedef void SoundFontData;
2828

2929
/* forward declarations */
30-
s32 AudioLoad_SyncInitSeqPlayerInternal(s32 playerIdx, s32 seqId, s32 skipTicks);
30+
s32 AudioLoad_SyncInitSeqPlayerInternal(s32 playerIdx, s32 seqId, s32 arg2);
3131
SoundFontData* AudioLoad_SyncLoadFont(u32 fontId);
3232
Sample* AudioLoad_GetFontSample(s32 fontId, s32 instId);
3333
void AudioLoad_ProcessAsyncLoads(s32 resetStatus);
3434
void AudioLoad_ProcessAsyncLoadUnkMedium(AudioAsyncLoad* asyncLoad, s32 resetStatus);
3535
void AudioLoad_ProcessAsyncLoad(AudioAsyncLoad* asyncLoad, s32 resetStatus);
3636
void AudioLoad_RelocateFontAndPreloadSamples(s32 fontId, SoundFontData* fontData, SampleBankRelocInfo* sampleBankReloc,
37-
s32 async);
37+
s32 isAsync);
3838
void AudioLoad_RelocateSample(TunedSample* tunedSample, SoundFontData* fontData, SampleBankRelocInfo* sampleBankReloc);
3939
void AudioLoad_DiscardFont(s32 fontId);
4040
u32 AudioLoad_TrySyncLoadSampleBank(u32 sampleBankId, u32* outMedium, s32 noLoad);
41-
void* AudioLoad_SyncLoad(u32 tableType, u32 tableId, s32* didAllocate);
42-
u32 AudioLoad_GetRealTableIndex(s32 tableType, u32 tableId);
41+
void* AudioLoad_SyncLoad(u32 tableType, u32 id, s32* didAllocate);
42+
u32 AudioLoad_GetRealTableIndex(s32 tableType, u32 id);
4343
void* AudioLoad_SearchCaches(s32 tableType, s32 id);
4444
AudioTable* AudioLoad_GetLoadTable(s32 tableType);
45-
void AudioLoad_SyncDma(u32 devAddr, u8* addr, u32 size, s32 medium);
45+
void AudioLoad_SyncDma(u32 devAddr, u8* ramAddr, u32 size, s32 medium);
4646
void AudioLoad_SyncDmaUnkMedium(u32 devAddr, u8* addr, u32 size, s32 unkMediumParam);
4747
s32 AudioLoad_Dma(OSIoMesg* mesg, u32 priority, s32 direction, u32 devAddr, void* ramAddr, u32 size,
4848
OSMesgQueue* reqQueue, s32 medium, const char* dmaFuncType);

src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
void ArrowFire_Init(Actor* thisx, PlayState* play);
1313
void ArrowFire_Destroy(Actor* thisx, PlayState* play);
1414
void ArrowFire_Update(Actor* thisx, PlayState* play);
15-
void ArrowFire_Draw(Actor* thisx, PlayState* play);
15+
void ArrowFire_Draw(Actor* thisx, PlayState* play2);
1616

1717
void ArrowFire_Charge(ArrowFire* this, PlayState* play);
1818
void ArrowFire_Fly(ArrowFire* this, PlayState* play);

src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
void BgBowlWall_Init(Actor* thisx, PlayState* play);
1616
void BgBowlWall_Destroy(Actor* thisx, PlayState* play);
1717
void BgBowlWall_Update(Actor* thisx, PlayState* play);
18-
void BgBowlWall_Draw(Actor* thisx, PlayState* play);
18+
void BgBowlWall_Draw(Actor* thisx, PlayState* play2);
1919

2020
void BgBowlWall_SpawnBullseyes(BgBowlWall* this, PlayState* play);
2121
void BgBowlWall_WaitForHit(BgBowlWall* this, PlayState* play);

0 commit comments

Comments
 (0)