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 0d85caaf7e.

* 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
+20 -21
View File
@@ -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++,
@@ -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++,
@@ -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++,
@@ -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++,
@@ -239,8 +239,8 @@ 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);
@@ -248,8 +248,8 @@ void func_800C1E9C(PreRender* this, Gfx** gfxp) {
}
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);
@@ -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);
}
@@ -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);
@@ -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)) {