Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Macro for __FILE__ & __LINE__ when possible #559

Merged
merged 23 commits into from
Jul 5, 2022
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
c20c4ee
First batch some overlay
Baoulettes Jun 26, 2022
2e793f0
Almost all overlay
Baoulettes Jun 26, 2022
e6c3c71
effect & gamestate
Baoulettes Jun 26, 2022
a9b1695
kaleido stuffs
Baoulettes Jun 26, 2022
9ea4e24
more overlay
Baoulettes Jun 26, 2022
ac48cae
more left over from code folder
Baoulettes Jun 26, 2022
4a3905b
remaining hardcoded line and file
Baoulettes Jun 27, 2022
146fbb0
Open & Close _DISP __FILE__ & __LINE__ clean up
Baoulettes Jun 27, 2022
9e06677
Some if (1) {} remove
Baoulettes Jun 27, 2022
1cdaf45
LOG_xxxx __FILE__ , __LINE__ cleaned
Baoulettes Jun 27, 2022
73d9baf
ASSERT macro __FILE__ __LINE__
Baoulettes Jun 27, 2022
d627ec3
mtx without line/file in functions
Baoulettes Jun 27, 2022
cd0cea2
" if (1) {} " & "if (0) {}" and tab/white place
Baoulettes Jun 27, 2022
0ef8463
Merge branch 'HarbourMasters:develop' into openclose_disp_macro
Baoulettes Jun 28, 2022
4606929
LogUtils as macro
Baoulettes Jun 28, 2022
0d85caa
GameState_, GameAlloc_, SystemArena_ & ZeldaArena_
Baoulettes Jun 28, 2022
6b4ceef
Revert "GameState_, GameAlloc_, SystemArena_ & ZeldaArena_"
Baoulettes Jun 28, 2022
ceae019
Like last commit but as macro
Baoulettes Jun 28, 2022
c319631
Fix matrix not using macros
Baoulettes Jul 4, 2022
b038ba5
Merge branch 'HarbourMasters:develop' into openclose_disp_macro
Baoulettes Jul 4, 2022
6d298cb
use function not macro
Baoulettes Jul 4, 2022
193b634
DebugArena_* functions
Baoulettes Jul 4, 2022
98e3f7a
Merge branch 'HarbourMasters:develop' into openclose_disp_macro
Baoulettes Jul 5, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
87 changes: 57 additions & 30 deletions soh/include/macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,31 +86,64 @@
#define CHECK_FLAG_ALL(flags, mask) (((flags) & (mask)) == (mask))

#ifndef NDEBUG
#define LOG(exp, value, format, file, line) \
#define LOG(exp, value, format) \
do { \
LogUtils_LogThreadId(file, line); \
LogUtils_LogThreadId(__FILE__, __FILE__); \
osSyncPrintf(exp " = " format "\n", value); \
} while (0)
#else
#define LOG(exp, value, format, file, line) ((void)0)
#define LOG(exp, value, format) ((void)0)
#endif

#ifndef NDEBUG
#define LOG_STRING(string, file, line) LOG(#string, string, "%s", file, line)
#define LOG_ADDRESS(exp, value, file, line) LOG(exp, value, "%08x", file, line)
#define LOG_TIME(exp, value, file, line) LOG(exp, value, "%lld", file, line)
#define LOG_NUM(exp, value, file, line) LOG(exp, value, "%d", file, line)
#define LOG_HEX(exp, value, file, line) LOG(exp, value, "%x", file, line)
#define LOG_FLOAT(exp, value, file, line) LOG(exp, value, "%f", file, line)
#define LOG_STRING(string) LOG(#string, string, "%s")
#define LOG_ADDRESS(exp, value) LOG(exp, value, "%p")
#define LOG_TIME(exp, value) LOG(exp, value, "%lld")
#define LOG_NUM(exp, value) LOG(exp, value, "%d")
#define LOG_HEX(exp, value) LOG(exp, value, "%x")
#define LOG_FLOAT(exp, value) LOG(exp, value, "%f")
#else
#define LOG_STRING(string, file, line) ((void)0)
#define LOG_ADDRESS(exp, value, file, line) ((void)0)
#define LOG_TIME(exp, value, file, line) ((void)0)
#define LOG_NUM(exp, value, file, line) ((void)0)
#define LOG_HEX(exp, value, file, line) ((void)0)
#define LOG_FLOAT(exp, value, file, line) ((void)0)
#define LOG_STRING(string) ((void)0)
#define LOG_ADDRESS(exp, value) ((void)0)
#define LOG_TIME(exp, value) ((void)0)
#define LOG_NUM(exp, value) ((void)0)
#define LOG_HEX(exp, value) ((void)0)
#define LOG_FLOAT(exp, value) ((void)0)
#endif

// LogUtils as macro
#ifndef NDEBUG
#define LOG_POINTER(val, max, ptr, name) LogUtils_LogPointer(val, max, ptr, name, __FILE__, __LINE__)
#define LOG_CHECK_BOUNDARY(name, value, unk) LogUtils_CheckBoundary(name, value, unk, __FILE__, __LINE__)
#define LOG_CHECK_NULL_POINTER(exp, ptr) LogUtils_CheckNullPointer(exp, ptr,__FILE__, __LINE__)
#define LOG_CHECK_VALID_POINTER(exp, ptr) LogUtils_CheckValidPointer(exp, ptr,__FILE__, __LINE__)
#define LOG_THREAD_ID() LogUtils_LogThreadId(__FILE__, __LINE__)
#define LOG_HUNGUP_THREAD() LogUtils_HungupThread(__FILE__, __LINE__)
#else
#define LOG_POINTER(val, max, ptr, name) ((void)0)
#define LOG_CHECKBOUNDARY(name, value, unk) ((void)0)
#define LOG_CHECK_NULL_POINTER(exp, ptr) ((void)0)
#define LOG_CHECK_VALID_POINTER(exp, ptr) ((void)0)
#define LOG_THREAD_ID() ((void)0)
#define LOG_HUNGUP_THREAD() ((void)0)
#endif

#define MATRIX_TOMTX(dest) Matrix_ToMtx(dest, __FILE__, __LINE__)
#define MATRIX_NEWMTX(gfxCtx) Matrix_NewMtx(gfxCtx, __FILE__, __LINE__)
#define MATRIX_CHECKFLOATS(mf) Matrix_CheckFloats(mf, __FILE__, __LINE__)

#define ZELDA_ARENA_MALLOC_DEBUG(size) ZeldaArena_MallocDebug(size, __FILE__, __LINE__)
#define ZELDA_ARENA_MALLOC_RDEBUG(size) ZeldaArena_MallocRDebug(size, __FILE__, __LINE__)
#define ZELDA_ARENA_REALLOC_DEBUG(ptr, newSize) ZeldaArena_ReallocDebug(ptr, newSize, __FILE__, __LINE__)
#define ZELDA_ARENA_FREE_DEBUG(ptr) ZeldaArena_FreeDebug(ptr, __FILE__, __LINE__)

#define SYSTEM_ARENA_MALLOC_DEBUG(size) SystemArena_MallocDebug(size, __FILE__, __LINE__)
#define SYSTEM_ARENA_MALLOC_RDEBUG(size) SystemArena_MallocRDebug(size, __FILE__, __LINE__)
#define SYSTEM_ARENA_REALLOC_DEBUG(ptr, newSize) SystemArena_ReallocDebug(ptr, newSize, __FILE__, __LINE__)
#define SYSTEM_ARENA_FREE_DEBUG(ptr) SystemArena_FreeDebug(ptr, __FILE__, __LINE__)

#define GAMESTATE_ALLOC_MC(gameState, size) GameState_Alloc(gameState, size, __FILE__, __LINE__);

#define SET_NEXT_GAMESTATE(curState, newInit, newStruct) \
do { \
(curState)->init = newInit; \
Expand Down Expand Up @@ -140,34 +173,34 @@ extern GraphicsContext* __gfxCtx;
// __gfxCtx shouldn't be used directly.
// Use the DISP macros defined above when writing to display buffers.
#ifndef NDEBUG
#define OPEN_DISPS(gfxCtx, file, line) \
#define OPEN_DISPS(gfxCtx) \
{ \
void FrameInterpolation_RecordOpenChild(const void* a, int b); \
FrameInterpolation_RecordOpenChild(file, line); \
FrameInterpolation_RecordOpenChild(__FILE__, __LINE__); \
GraphicsContext* __gfxCtx; \
Gfx* dispRefs[4]; \
__gfxCtx = gfxCtx; \
(void)__gfxCtx; \
Graph_OpenDisps(dispRefs, gfxCtx, file, line)
Graph_OpenDisps(dispRefs, gfxCtx, __FILE__, __LINE__)
#else
#define OPEN_DISPS(gfxCtx, file, line) \
#define OPEN_DISPS(gfxCtx) \
{ \
void FrameInterpolation_RecordOpenChild(const void* a, int b); \
FrameInterpolation_RecordOpenChild(file, line); \
FrameInterpolation_RecordOpenChild(__FILE__, __LINE__); \
GraphicsContext* __gfxCtx; \
__gfxCtx = gfxCtx; \
(void)__gfxCtx;
#endif

#ifndef NDEBUG
#define CLOSE_DISPS(gfxCtx, file, line) \
#define CLOSE_DISPS(gfxCtx) \
{void FrameInterpolation_RecordCloseChild(void); \
FrameInterpolation_RecordCloseChild();} \
Graph_CloseDisps(dispRefs, gfxCtx, file, line); \
Graph_CloseDisps(dispRefs, gfxCtx, __FILE__, __LINE__); \
} \
(void)0
#else
#define CLOSE_DISPS(gfxCtx, file, line) \
#define CLOSE_DISPS(gfxCtx) \
{void FrameInterpolation_RecordCloseChild(void); \
FrameInterpolation_RecordCloseChild();} \
(void)0; \
Expand All @@ -190,13 +223,7 @@ extern GraphicsContext* __gfxCtx;

#define VTX_T(x,y,z,s,t,cr,cg,cb,a) { { x, y, z }, 0, { s, t }, { cr, cg, cb, a } }

#ifdef NDEBUG
#define ASSERT(cond, msg, file, line) ((void)0)
#elif defined(REAL_ASSERT_MACRO)
#define ASSERT(cond, msg, file, line) ((cond) ? ((void)0) : __assert(#cond, __FILE__, __LINE__))
#else
#define ASSERT(cond, msg, file, line) ((cond) ? ((void)0) : __assert(msg, file, line))
#endif
#define ASSERT(expression) (void)((!!(expression)) || (__assert(#expression, __FILE__, (unsigned)(__LINE__)), 0))

#define gDPSetTileCustom(pkt, fmt, siz, width, height, pal, cms, cmt, masks, maskt, shifts, shiftt) \
do { \
Expand Down
4 changes: 2 additions & 2 deletions soh/soh/Enhancements/debugger/colViewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -698,13 +698,13 @@ void DrawColViewer() {
return;
}

OPEN_DISPS(gGlobalCtx->state.gfxCtx, "", 0);
OPEN_DISPS(gGlobalCtx->state.gfxCtx);

opaDl.push_back(gsSPEndDisplayList());
gSPDisplayList(POLY_OPA_DISP++, opaDl.data());

xluDl.push_back(gsSPEndDisplayList());
gSPDisplayList(POLY_XLU_DISP++, xluDl.data());

CLOSE_DISPS(gGlobalCtx->state.gfxCtx, "", 0);
CLOSE_DISPS(gGlobalCtx->state.gfxCtx);
}
2 changes: 1 addition & 1 deletion soh/soh/z_play_otr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ extern "C" void OTRGameplay_SpawnScene(GlobalContext* globalCtx, s32 sceneNum, s

scene->unk_13 = 0;

//ASSERT(globalCtx->sceneSegment != NULL, "this->sceneSegment != NULL", "../z_play.c", 4960);
//ASSERT(globalCtx->sceneSegment != NULL);
//gSegments[2] = VIRTUAL_TO_PHYSICAL(globalCtx->sceneSegment);

OTRGameplay_InitScene(globalCtx, spawn);
Expand Down
4 changes: 2 additions & 2 deletions soh/soh/z_scene_otr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@ extern "C" s32 OTRfunc_8009728C(GlobalContext* globalCtx, RoomContext* roomCtx,
roomCtx->curRoom.segment = NULL;
roomCtx->status = 1;

ASSERT(roomNum < globalCtx->numRooms, "read_room_ID < game_play->room_rom_address.num", "../z_room.c", 1009);
ASSERT(roomNum < globalCtx->numRooms);

if (roomNum >= globalCtx->numRooms)
return 0; // UH OH
Expand All @@ -918,7 +918,7 @@ extern "C" s32 OTRfunc_8009728C(GlobalContext* globalCtx, RoomContext* roomCtx,

osCreateMesgQueue(&roomCtx->loadQueue, &roomCtx->loadMsg, 1);
//DmaMgr_SendRequest2(&roomCtx->dmaRequest, roomCtx->unk_34, globalCtx->roomList[roomNum].vromStart, size, 0,
//&roomCtx->loadQueue, NULL, "../z_room.c", 1036);
//&roomCtx->loadQueue, NULL, __FILE__, __LINE__);

auto roomData = OTRGlobals::Instance->context->GetResourceManager()->LoadResource(globalCtx->roomList[roomNum].fileName);
roomCtx->status = 1;
Expand Down
2 changes: 1 addition & 1 deletion soh/src/boot/z_locale.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ void Locale_Init(void) {
default:
osSyncPrintf(VT_COL(RED, WHITE));
osSyncPrintf("z_locale_init: 日本用かアメリカ用か判別できません\n");
LogUtils_HungupThread("../z_locale.c", 118);
LOG_HUNGUP_THREAD();
osSyncPrintf(VT_RST);
break;
}
Expand Down
14 changes: 5 additions & 9 deletions soh/src/boot/z_std_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ s32 DmaMgr_DmaRomToRam(uintptr_t rom, uintptr_t ram, size_t size) {
osCreateMesgQueue(&queue, &msg, 1);

while (size > buffSize) {
if (1) {} // Necessary to match

ioMsg.hdr.pri = OS_MESG_PRI_NORMAL;
ioMsg.hdr.retQueue = &queue;
Expand Down Expand Up @@ -92,7 +91,6 @@ s32 DmaMgr_DmaRomToRam(uintptr_t rom, uintptr_t ram, size_t size) {
ram += buffSize;
}

if (1) {} // Also necessary to match

ioMsg.hdr.pri = OS_MESG_PRI_NORMAL;
ioMsg.hdr.retQueue = &queue;
Expand Down Expand Up @@ -125,9 +123,9 @@ s32 DmaMgr_DmaRomToRam(uintptr_t rom, uintptr_t ram, size_t size) {
s32 DmaMgr_DmaHandler(OSPiHandle* pihandle, OSIoMesg* mb, s32 direction) {
s32 ret;

ASSERT(pihandle == gCartHandle, "pihandle == carthandle", "../z_std_dma.c", 530);
ASSERT(direction == OS_READ, "direction == OS_READ", "../z_std_dma.c", 531);
ASSERT(mb != NULL, "mb != NULL", "../z_std_dma.c", 532);
ASSERT(pihandle == gCartHandle);
ASSERT(direction == OS_READ);
ASSERT(mb != NULL);

if (D_80009460 == 10) {
osSyncPrintf("%10lld サウンドDMA %08x %08x %08x (%d)\n", OS_CYCLES_TO_USEC(osGetTime()), mb->dramAddr,
Expand Down Expand Up @@ -249,7 +247,6 @@ void DmaMgr_ProcessMsg(DmaRequest* req) {

while (iter->vromEnd) {
if (vrom >= iter->vromStart && vrom < iter->vromEnd) {
if (1) {} // Necessary to match

if (iter->romEnd == 0) {
if (iter->vromEnd < vrom + size) {
Expand Down Expand Up @@ -354,8 +351,7 @@ s32 DmaMgr_SendRequestImpl(DmaRequest* req, uintptr_t ram, uintptr_t vrom, size_
osSyncPrintf("%c", 7);
osSyncPrintf(VT_FGCOL(RED));
osSyncPrintf("dmaEntryMsgQが一杯です。キューサイズの再検討をおすすめします。");
LOG_NUM("(sizeof(dmaEntryMsgBufs) / sizeof(dmaEntryMsgBufs[0]))", ARRAY_COUNT(sDmaMgrMsgs),
"../z_std_dma.c", 952);
LOG_NUM("(sizeof(dmaEntryMsgBufs) / sizeof(dmaEntryMsgBufs[0]))", ARRAY_COUNT(sDmaMgrMsgs));
osSyncPrintf(VT_RST);
}
}
Expand Down Expand Up @@ -417,7 +413,7 @@ void DmaMgr_Init(void) {
{
osSyncPrintf("_bootSegmentRomStart(%08x) != dma_rom_ad[0].rom_b(%08x)\n", _bootSegmentRomStart,
gDmaDataTable[0].vromEnd);
Fault_AddHungupAndCrash("../z_std_dma.c", 1055);
Fault_AddHungupAndCrash(__FILE__, __LINE__);
}
#endif

Expand Down
41 changes: 20 additions & 21 deletions soh/src/code/PreRender.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ void func_800C0F28(PreRender* this, Gfx** gfxp, void* buf, void* bufSave) {
s32 x2;
s32 dx;

LogUtils_CheckNullPointer("this", this, "../PreRender.c", 215);
LogUtils_CheckNullPointer("glistpp", gfxp, "../PreRender.c", 216);
LOG_CHECK_NULL_POINTER("this", this);
LOG_CHECK_NULL_POINTER("glistpp", gfxp);
gfx = *gfxp;
LogUtils_CheckNullPointer("glistp", gfx, "../PreRender.c", 218);
LOG_CHECK_NULL_POINTER("glistp", gfx);

gDPPipeSync(gfx++);
gDPSetOtherMode(gfx++,
Expand Down Expand Up @@ -89,10 +89,10 @@ void func_800C1258(PreRender* this, Gfx** gfxp) {
s32 y2;
s32 dy;

LogUtils_CheckNullPointer("this", this, "../PreRender.c", 278);
LogUtils_CheckNullPointer("glistpp", gfxp, "../PreRender.c", 279);
LOG_CHECK_NULL_POINTER("this", this);
LOG_CHECK_NULL_POINTER("glistpp", gfxp);
gfx = *gfxp;
LogUtils_CheckNullPointer("glistp", gfx, "../PreRender.c", 281);
LOG_CHECK_NULL_POINTER("glistp", gfx);

gDPPipeSync(gfx++);
gDPSetOtherMode(gfx++,
Expand Down Expand Up @@ -139,10 +139,10 @@ void func_800C170C(PreRender* this, Gfx** gfxp, void* fbuf, void* fbufSave, u32
s32 x2;
s32 dx;

LogUtils_CheckNullPointer("this", this, "../PreRender.c", 343);
LogUtils_CheckNullPointer("glistpp", gfxp, "../PreRender.c", 344);
LOG_CHECK_NULL_POINTER("this", this);
LOG_CHECK_NULL_POINTER("glistpp", gfxp);
gfx = *gfxp;
LogUtils_CheckNullPointer("glistp", gfx, "../PreRender.c", 346);
LOG_CHECK_NULL_POINTER("glistp", gfx);

gDPPipeSync(gfx++);
gDPSetOtherMode(gfx++,
Expand Down Expand Up @@ -195,10 +195,10 @@ void func_800C1B24(PreRender* this, Gfx** gfxp, void* fbuf, void* cvgSave) {
s32 x2;
s32 dx;

LogUtils_CheckNullPointer("this", this, "../PreRender.c", 422);
LogUtils_CheckNullPointer("glistpp", gfxp, "../PreRender.c", 423);
LOG_CHECK_NULL_POINTER("this", this);
LOG_CHECK_NULL_POINTER("glistpp", gfxp);
gfx = *gfxp;
LogUtils_CheckNullPointer("glistp", gfx, "../PreRender.c", 425);
LOG_CHECK_NULL_POINTER("glistp", gfx);

gDPPipeSync(gfx++);
gDPSetOtherMode(gfx++,
Expand Down Expand Up @@ -239,17 +239,17 @@ void func_800C1B24(PreRender* this, Gfx** gfxp, void* fbuf, void* cvgSave) {
}

void func_800C1E9C(PreRender* this, Gfx** gfxp) {
LogUtils_CheckNullPointer("this->zbuf_save", this->zbufSave, "../PreRender.c", 481);
LogUtils_CheckNullPointer("this->zbuf", this->zbuf, "../PreRender.c", 482);
LOG_CHECK_NULL_POINTER("this->zbuf_save", this->zbufSave);
LOG_CHECK_NULL_POINTER("this->zbuf", this->zbuf);

if ((this->zbufSave != NULL) && (this->zbuf != NULL)) {
func_800C0F28(this, gfxp, this->zbuf, this->zbufSave);
}
}

void func_800C1F20(PreRender* this, Gfx** gfxp) {
LogUtils_CheckNullPointer("this->fbuf_save", this->fbufSave, "../PreRender.c", 495);
LogUtils_CheckNullPointer("this->fbuf", this->fbuf, "../PreRender.c", 496);
LOG_CHECK_NULL_POINTER("this->fbuf_save", this->fbufSave);
LOG_CHECK_NULL_POINTER("this->fbuf", this->fbuf);

if ((this->fbufSave != NULL) && (this->fbuf != NULL)) {
func_800C1AE8(this, gfxp, this->fbuf, this->fbufSave);
Expand All @@ -275,7 +275,7 @@ void func_800C1FA4(PreRender* this, Gfx** gfxp) {

void func_800C20B4(PreRender* this, Gfx** gfxp) {
func_800C1FA4(this, gfxp);
LogUtils_CheckNullPointer("this->cvg_save", this->cvgSave, "../PreRender.c", 532);
LOG_CHECK_NULL_POINTER("this->cvg_save", this->cvgSave);
if (this->cvgSave != NULL) {
func_800C1B24(this, gfxp, this->fbuf, this->cvgSave);
}
Expand All @@ -293,10 +293,10 @@ void func_800C213C(PreRender* this, Gfx** gfxp) {
s32 rtile = 1;

if (this->cvgSave != NULL) {
LogUtils_CheckNullPointer("this", this, "../PreRender.c", 563);
LogUtils_CheckNullPointer("glistpp", gfxp, "../PreRender.c", 564);
LOG_CHECK_NULL_POINTER("this", this);
LOG_CHECK_NULL_POINTER("glistpp", gfxp);
gfx = *gfxp;
LogUtils_CheckNullPointer("glistp", gfx, "../PreRender.c", 566);
LOG_CHECK_NULL_POINTER("glistp", gfx);

gDPPipeSync(gfx++);
gDPSetEnvColor(gfx++, 255, 255, 255, 32);
Expand Down Expand Up @@ -435,7 +435,6 @@ void func_800C2500(PreRender* this, s32 x, s32 y) {
}
}
}
if (1) {}
if (pxR2 > buffR[i]) {
for (j = 1; j < 15; j += 2) {
if ((i != j) && (buffR[j] <= buffR[i]) && (buffA[j] == 7)) {
Expand Down
5 changes: 0 additions & 5 deletions soh/src/code/audio_load.c
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,6 @@ void AudioLoad_RelocateFont(s32 fontId, SoundFontData* mem, RelocInfo* relocInfo
#define BASE_OFFSET(x) (void*)((u32)(x) + (u32)(mem))

reloc2 = ptrs[0];
if (1) {}
if ((reloc2 != 0 || !gUseLegacySD) && (numDrums != 0))
{
ptrs[0] = BASE_OFFSET(reloc2);
Expand Down Expand Up @@ -963,7 +962,6 @@ void AudioLoad_RelocateFont(s32 fontId, SoundFontData* mem, RelocInfo* relocInfo
}

reloc2 = ptrs[1];
if (1) {}
if ((reloc2 != 0 || !gUseLegacySD) && (numSfx != 0)) {
ptrs[1] = BASE_OFFSET(reloc2);
for (i = 0; i < numSfx; i++) {
Expand Down Expand Up @@ -1805,7 +1803,6 @@ void AudioLoad_FinishAsyncLoad(AudioAsyncLoad* asyncLoad) {
u32 sampleBankId2;
RelocInfo relocInfo;

if (1) {}
switch (ASYNC_TBLTYPE(retMsg)) {
case SEQUENCE_TABLE:
AudioLoad_SetSeqLoadStatus(ASYNC_ID(retMsg), ASYNC_STATUS(retMsg));
Expand All @@ -1829,7 +1826,6 @@ void AudioLoad_FinishAsyncLoad(AudioAsyncLoad* asyncLoad) {
}

doneMsg.data32 = asyncLoad->retMsg;
if (1) {}
asyncLoad->status = LOAD_STATUS_WAITING;
osSendMesg(asyncLoad->retQueue, doneMsg, OS_MESG_NOBLOCK);
}
Expand Down Expand Up @@ -2139,7 +2135,6 @@ s32 AudioLoad_GetSamplesForFont(s32 fontId, SoundFontSample** sampleSet) {

for (i = 0; i < numDrums; i++) {
Drum* drum = Audio_GetDrum(fontId, i);
if (1) {}
if (drum != NULL) {
numSamples = AudioLoad_AddToSampleSet(drum->sound.sample, numSamples, sampleSet);
}
Expand Down
Loading