mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-07-30 03:28:55 -07:00
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:
parent
a9c3c7541e
commit
a5df9dddf0
467 changed files with 3081 additions and 3459 deletions
|
@ -89,9 +89,8 @@ void TransitionUnk_InitGraphics(TransitionUnk* this) {
|
|||
gDPPipeSync(gfx++);
|
||||
gSPEndDisplayList(gfx++);
|
||||
|
||||
LOG_NUM("this->col * (1 + this->row * (1 + 7 + 1)) + 1 + 1", this->col * (1 + this->row * 9) + 2, "../z_fbdemo.c",
|
||||
144);
|
||||
LOG_NUM("gp - this->gfxtbl", gfx - this->gfx, "../z_fbdemo.c", 145);
|
||||
LOG_NUM("this->col * (1 + this->row * (1 + 7 + 1)) + 1 + 1", this->col * (1 + this->row * 9) + 2);
|
||||
LOG_NUM("gp - this->gfxtbl", gfx - this->gfx);
|
||||
}
|
||||
|
||||
void TransitionUnk_InitData(TransitionUnk* this) {
|
||||
|
@ -112,19 +111,19 @@ void TransitionUnk_Destroy(TransitionUnk* this) {
|
|||
Sleep_Msec(100);
|
||||
|
||||
if (this->unk_0C != NULL) {
|
||||
SystemArena_FreeDebug(this->unk_0C, "../z_fbdemo.c", 180);
|
||||
SYSTEM_ARENA_FREE_DEBUG(this->unk_0C);
|
||||
this->unk_0C = NULL;
|
||||
}
|
||||
if (this->vtxFrame1 != NULL) {
|
||||
SystemArena_FreeDebug(this->vtxFrame1, "../z_fbdemo.c", 181);
|
||||
SYSTEM_ARENA_FREE_DEBUG(this->vtxFrame1);
|
||||
this->vtxFrame1 = NULL;
|
||||
}
|
||||
if (this->vtxFrame2 != NULL) {
|
||||
SystemArena_FreeDebug(this->vtxFrame2, "../z_fbdemo.c", 182);
|
||||
SYSTEM_ARENA_FREE_DEBUG(this->vtxFrame2);
|
||||
this->vtxFrame2 = NULL;
|
||||
}
|
||||
if (this->gfx != NULL) {
|
||||
SystemArena_FreeDebug(this->gfx, "../z_fbdemo.c", 183);
|
||||
SYSTEM_ARENA_FREE_DEBUG(this->gfx);
|
||||
this->gfx = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -135,27 +134,27 @@ TransitionUnk* TransitionUnk_Init(TransitionUnk* this, s32 row, s32 col) {
|
|||
this->frame = 0;
|
||||
this->row = row;
|
||||
this->col = col;
|
||||
this->unk_0C = SystemArena_MallocDebug((row + 1) * sizeof(TransitionUnkData) * (col + 1), "../z_fbdemo.c", 195);
|
||||
this->vtxFrame1 = SystemArena_MallocDebug((row + 1) * sizeof(Vtx) * (col + 1), "../z_fbdemo.c", 196);
|
||||
this->vtxFrame2 = SystemArena_MallocDebug((row + 1) * sizeof(Vtx) * (col + 1), "../z_fbdemo.c", 197);
|
||||
this->gfx = SystemArena_MallocDebug((this->col * (1 + this->row * 9) + 2) * sizeof(Gfx), "../z_fbdemo.c", 198);
|
||||
this->unk_0C = SYSTEM_ARENA_MALLOC_DEBUG((row + 1) * sizeof(TransitionUnkData) * (col + 1));
|
||||
this->vtxFrame1 = SYSTEM_ARENA_MALLOC_DEBUG((row + 1) * sizeof(Vtx) * (col + 1));
|
||||
this->vtxFrame2 = SYSTEM_ARENA_MALLOC_DEBUG((row + 1) * sizeof(Vtx) * (col + 1));
|
||||
this->gfx = SYSTEM_ARENA_MALLOC_DEBUG((this->col * (1 + this->row * 9) + 2) * sizeof(Gfx));
|
||||
|
||||
if (this->unk_0C == NULL || this->vtxFrame1 == NULL || this->vtxFrame2 == NULL || this->gfx == NULL) {
|
||||
osSyncPrintf("fbdemo_init allocation error\n");
|
||||
if (this->unk_0C != NULL) {
|
||||
SystemArena_FreeDebug(this->unk_0C, "../z_fbdemo.c", 202);
|
||||
SYSTEM_ARENA_FREE_DEBUG(this->unk_0C);
|
||||
this->unk_0C = NULL;
|
||||
}
|
||||
if (this->vtxFrame1 != NULL) {
|
||||
SystemArena_FreeDebug(this->vtxFrame1, "../z_fbdemo.c", 203);
|
||||
SYSTEM_ARENA_FREE_DEBUG(this->vtxFrame1);
|
||||
this->vtxFrame1 = NULL;
|
||||
}
|
||||
if (this->vtxFrame2 != NULL) {
|
||||
SystemArena_FreeDebug(this->vtxFrame2, "../z_fbdemo.c", 204);
|
||||
SYSTEM_ARENA_FREE_DEBUG(this->vtxFrame2);
|
||||
this->vtxFrame2 = NULL;
|
||||
}
|
||||
if (this->gfx != NULL) {
|
||||
SystemArena_FreeDebug(this->gfx, "../z_fbdemo.c", 205);
|
||||
SYSTEM_ARENA_FREE_DEBUG(this->gfx);
|
||||
this->gfx = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue