Use Macro for __FILE__ & __LINE__ when possible (#559)

* First batch some overlay

* Almost all overlay

* effect & gamestate

* kaleido stuffs

* more overlay

* more left over from code folder

* remaining hardcoded line and file

* Open & Close _DISP __FILE__ & __LINE__ clean up

* Some if (1) {} remove

* LOG_xxxx __FILE__ , __LINE__ cleaned

* ASSERT macro __FILE__ __LINE__

* mtx without line/file in functions

* " if (1) {} " & "if (0) {}" and tab/white place

* LogUtils as macro

* GameState_, GameAlloc_, SystemArena_ & ZeldaArena_

* Revert "GameState_, GameAlloc_, SystemArena_ & ZeldaArena_"

This reverts commit 0d85caaf7e342648c01a15fe21e93637352dc596.

* Like last commit but as macro

* Fix matrix not using macros

* use function not macro

* DebugArena_* functions
GameAlloc_MallocDebug
BgCheck_PosErrorCheck as macros
removed issues with ; in macro file
This commit is contained in:
Baoulettes
2022-07-06 01:29:34 +02:00
committed by GitHub
parent a9c3c7541e
commit a5df9dddf0
467 changed files with 3081 additions and 3459 deletions

View File

@@ -29,7 +29,7 @@ SpeedMeterTimeEntry sSpeedMeterTimeEntryArray[] = {
gDPPipeSync(gfx);
void SpeedMeter_InitImpl(SpeedMeter* this, u32 arg1, u32 y) {
LogUtils_CheckNullPointer("this", this, "../speed_meter.c", 181);
LOG_CHECK_NULL_POINTER("this", this);
this->unk_18 = arg1;
this->y = y;
}
@@ -55,7 +55,7 @@ void SpeedMeter_DrawTimeEntries(SpeedMeter* this, GraphicsContext* gfxCtx) {
uly = this->y;
lry = this->y + 2;
OPEN_DISPS(gfxCtx, "../speed_meter.c", 225);
OPEN_DISPS(gfxCtx);
/*! @bug if gIrqMgrRetraceTime is 0, CLOSE_DISPS will never be reached */
if (gIrqMgrRetraceTime == 0) {
@@ -98,7 +98,7 @@ void SpeedMeter_DrawTimeEntries(SpeedMeter* this, GraphicsContext* gfxCtx) {
OVERLAY_DISP = gfx;
CLOSE_DISPS(gfxCtx, "../speed_meter.c", 276);
CLOSE_DISPS(gfxCtx);
}
void SpeedMeter_InitAllocEntry(SpeedMeterAllocEntry* this, u32 maxval, u32 val, u16 backColor, u16 foreColor, u32 ulx,
@@ -120,10 +120,10 @@ void SpeedMeter_DrawAllocEntry(SpeedMeterAllocEntry* this, GraphicsContext* gfxC
if (this->maxval == 0) {
osSyncPrintf(VT_FGCOL(RED));
LOG_NUM("this->maxval", this->maxval, "../speed_meter.c", 313);
LOG_NUM("this->maxval", this->maxval);
osSyncPrintf(VT_RST);
} else {
OPEN_DISPS(gfxCtx, "../speed_meter.c", 318);
OPEN_DISPS(gfxCtx);
View_Init(&view, gfxCtx);
view.flags = 0xA;
@@ -146,7 +146,7 @@ void SpeedMeter_DrawAllocEntry(SpeedMeterAllocEntry* this, GraphicsContext* gfxC
gDPPipeSync(gfx++);
OVERLAY_DISP = gfx;
CLOSE_DISPS(gfxCtx, "../speed_meter.c", 339);
CLOSE_DISPS(gfxCtx);
}
}