mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-07-16 10:02:59 -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
|
@ -280,8 +280,6 @@ void EffectBlure_UpdateFlags(EffectBlureElement* elem) {
|
|||
f32 sp30;
|
||||
f32 sp2C;
|
||||
|
||||
if (1) {} // Necessary to match
|
||||
|
||||
Math_Vec3s_DiffToVec3f(&sp64, &elem->p1, &prev->p1);
|
||||
Math_Vec3s_DiffToVec3f(&sp58, &elem->p2, &prev->p2);
|
||||
Math_Vec3s_DiffToVec3f(&sp4C, &next->p1, &elem->p1);
|
||||
|
@ -345,7 +343,6 @@ void EffectBlure_GetComputedValues(EffectBlure* this, s32 index, f32 ratio, Vec3
|
|||
|
||||
vec1->x = (sp30.x * 0.5f * mode4Param * ratio) + elem->p1.x;
|
||||
vec1->y = (sp30.y * 0.5f * mode4Param * ratio) + elem->p1.y;
|
||||
if (1) {} // Necessary to match
|
||||
vec1->z = (sp30.z * 0.5f * mode4Param * ratio) + elem->p1.z;
|
||||
|
||||
vec2->x = -(sp30.x * 0.5f * mode4Param * ratio) + elem->p2.x;
|
||||
|
@ -382,11 +379,11 @@ void EffectBlure_GetComputedValues(EffectBlure* this, s32 index, f32 ratio, Vec3
|
|||
}
|
||||
|
||||
void EffectBlure_SetupSmooth(EffectBlure* this, GraphicsContext* gfxCtx) {
|
||||
OPEN_DISPS(gfxCtx, "../z_eff_blure.c", 809);
|
||||
OPEN_DISPS(gfxCtx);
|
||||
|
||||
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x26);
|
||||
|
||||
CLOSE_DISPS(gfxCtx, "../z_eff_blure.c", 813);
|
||||
CLOSE_DISPS(gfxCtx);
|
||||
}
|
||||
|
||||
// original name: "SQ_NoInterpolate_disp"
|
||||
|
@ -403,7 +400,7 @@ void EffectBlure_DrawElemNoInterpolation(EffectBlure* this, EffectBlureElement*
|
|||
Vec3f sp60;
|
||||
Vec3f sp54;
|
||||
|
||||
OPEN_DISPS(gfxCtx, "../z_eff_blure.c", 838);
|
||||
OPEN_DISPS(gfxCtx);
|
||||
|
||||
Math_Vec3s_ToVec3f(&sp6C, &this->elements[0].p2);
|
||||
|
||||
|
@ -433,8 +430,6 @@ void EffectBlure_DrawElemNoInterpolation(EffectBlure* this, EffectBlureElement*
|
|||
vtx[0].v.cn[2] = sp78.b;
|
||||
vtx[0].v.cn[3] = sp78.a;
|
||||
|
||||
if (1) {} // Necessary to match
|
||||
|
||||
sp60.x = sp8C.x;
|
||||
sp60.y = sp8C.y;
|
||||
sp60.z = sp8C.z;
|
||||
|
@ -464,8 +459,6 @@ void EffectBlure_DrawElemNoInterpolation(EffectBlure* this, EffectBlureElement*
|
|||
vtx[2].v.cn[2] = sp7C.b;
|
||||
vtx[2].v.cn[3] = sp7C.a;
|
||||
|
||||
if (1) {} // Necessary to match
|
||||
|
||||
sp60.x = sp84.x;
|
||||
sp60.y = sp84.y;
|
||||
sp60.z = sp84.z;
|
||||
|
@ -483,7 +476,7 @@ void EffectBlure_DrawElemNoInterpolation(EffectBlure* this, EffectBlureElement*
|
|||
gSP2Triangles(POLY_XLU_DISP++, 0, 1, 2, 0, 0, 2, 3, 0);
|
||||
}
|
||||
|
||||
CLOSE_DISPS(gfxCtx, "../z_eff_blure.c", 932);
|
||||
CLOSE_DISPS(gfxCtx);
|
||||
}
|
||||
|
||||
void EffectBlure_DrawElemHermiteInterpolation(EffectBlure* this, EffectBlureElement* elem, s32 index,
|
||||
|
@ -514,7 +507,7 @@ void EffectBlure_DrawElemHermiteInterpolation(EffectBlure* this, EffectBlureElem
|
|||
Color_RGBA8 sp144;
|
||||
Vec3f sp138;
|
||||
|
||||
OPEN_DISPS(gfxCtx, "../z_eff_blure.c", 971);
|
||||
OPEN_DISPS(gfxCtx);
|
||||
|
||||
Math_Vec3s_ToVec3f(&sp138, &this->elements[0].p2);
|
||||
|
||||
|
@ -535,7 +528,7 @@ void EffectBlure_DrawElemHermiteInterpolation(EffectBlure* this, EffectBlureElem
|
|||
Vec3f sp118;
|
||||
Vec3f sp10C;
|
||||
|
||||
ASSERT(index - 1 >= 0, "index - 1 >= 0", "../z_eff_blure.c", 1005);
|
||||
ASSERT(index - 1 >= 0);
|
||||
|
||||
ratio = (f32)(elem - 1)->timer / (f32)this->elemDuration;
|
||||
EffectBlure_GetComputedValues(this, index - 1, ratio, &sp1EC, &sp1E4, &sp1DC, &sp1D8);
|
||||
|
@ -555,7 +548,7 @@ void EffectBlure_DrawElemHermiteInterpolation(EffectBlure* this, EffectBlureElem
|
|||
Vec3f sp100;
|
||||
Vec3f spF4;
|
||||
|
||||
ASSERT(index + 2 < this->numElements, "index + 2 < this2->now_edge_num", "../z_eff_blure.c", 1032);
|
||||
ASSERT(index + 2 < this->numElements);
|
||||
|
||||
ratio = (f32)(elem + 2)->timer / (f32)this->elemDuration;
|
||||
EffectBlure_GetComputedValues(this, index + 2, ratio, &sp1EC, &sp1E4, &sp1DC, &sp1D8);
|
||||
|
@ -656,7 +649,7 @@ void EffectBlure_DrawElemHermiteInterpolation(EffectBlure* this, EffectBlureElem
|
|||
gSP2Triangles(POLY_XLU_DISP++, 12, 13, 15, 0, 12, 15, 14, 0);
|
||||
}
|
||||
|
||||
CLOSE_DISPS(gfxCtx, "../z_eff_blure.c", 1184);
|
||||
CLOSE_DISPS(gfxCtx);
|
||||
}
|
||||
|
||||
void EffectBlure_DrawSmooth(EffectBlure* this2, GraphicsContext* gfxCtx) {
|
||||
|
@ -668,7 +661,7 @@ void EffectBlure_DrawSmooth(EffectBlure* this2, GraphicsContext* gfxCtx) {
|
|||
MtxF sp5C;
|
||||
Mtx* mtx;
|
||||
|
||||
OPEN_DISPS(gfxCtx, "../z_eff_blure.c", 1201);
|
||||
OPEN_DISPS(gfxCtx);
|
||||
|
||||
if (this->numElements < 2) {
|
||||
return;
|
||||
|
@ -710,19 +703,19 @@ void EffectBlure_DrawSmooth(EffectBlure* this2, GraphicsContext* gfxCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
CLOSE_DISPS(gfxCtx, "../z_eff_blure.c", 1263);
|
||||
CLOSE_DISPS(gfxCtx);
|
||||
}
|
||||
|
||||
void EffectBlure_SetupSimple(GraphicsContext* gfxCtx, EffectBlure* this, Vtx* vtx) {
|
||||
OPEN_DISPS(gfxCtx, "../z_eff_blure.c", 1280);
|
||||
OPEN_DISPS(gfxCtx);
|
||||
|
||||
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x26);
|
||||
|
||||
CLOSE_DISPS(gfxCtx, "../z_eff_blure.c", 1285);
|
||||
CLOSE_DISPS(gfxCtx);
|
||||
}
|
||||
|
||||
void EffectBlure_SetupSimpleAlt(GraphicsContext* gfxCtx, EffectBlure* this, Vtx* vtx) {
|
||||
OPEN_DISPS(gfxCtx, "../z_eff_blure.c", 1294);
|
||||
OPEN_DISPS(gfxCtx);
|
||||
|
||||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x26);
|
||||
|
@ -743,7 +736,7 @@ void EffectBlure_SetupSimpleAlt(GraphicsContext* gfxCtx, EffectBlure* this, Vtx*
|
|||
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, this->altEnvColor.r, this->altEnvColor.g, this->altEnvColor.b, this->altEnvColor.a);
|
||||
|
||||
CLOSE_DISPS(gfxCtx, "../z_eff_blure.c", 1329);
|
||||
CLOSE_DISPS(gfxCtx);
|
||||
}
|
||||
|
||||
void (*sSetupHandlers[])(GraphicsContext* gfxCtx, EffectBlure* this, Vtx* vtx) = {
|
||||
|
@ -757,7 +750,7 @@ s32 D_80115788 = 0; // unused
|
|||
void EffectBlure_DrawSimpleVertices(GraphicsContext* gfxCtx, EffectBlure* this, Vtx* vtx) {
|
||||
Mtx* mtx;
|
||||
|
||||
OPEN_DISPS(gfxCtx, "../z_eff_blure.c", 1356);
|
||||
OPEN_DISPS(gfxCtx);
|
||||
|
||||
sSetupHandlers[this->drawMode](gfxCtx, this, vtx);
|
||||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
|
@ -785,8 +778,6 @@ void EffectBlure_DrawSimpleVertices(GraphicsContext* gfxCtx, EffectBlure* this,
|
|||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
}
|
||||
|
||||
if (1) {} // Necessary to match
|
||||
|
||||
gSPVertex(POLY_XLU_DISP++, &vtx[j], 4, 0);
|
||||
gSP2Triangles(POLY_XLU_DISP++, 0, 1, 3, 0, 0, 3, 2, 0);
|
||||
|
||||
|
@ -829,7 +820,7 @@ void EffectBlure_DrawSimpleVertices(GraphicsContext* gfxCtx, EffectBlure* this,
|
|||
}
|
||||
}
|
||||
|
||||
CLOSE_DISPS(gfxCtx, "../z_eff_blure.c", 1452);
|
||||
CLOSE_DISPS(gfxCtx);
|
||||
}
|
||||
|
||||
Vtx_t D_8011578C[] = {
|
||||
|
@ -949,7 +940,7 @@ void EffectBlure_Draw(void* thisx, GraphicsContext* gfxCtx) {
|
|||
s32 phi_t2;
|
||||
|
||||
FrameInterpolation_RecordOpenChild(this, 0);
|
||||
OPEN_DISPS(gfxCtx, "../z_eff_blure.c", 1596);
|
||||
OPEN_DISPS(gfxCtx);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, &gMtxClear, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
|
@ -1044,8 +1035,7 @@ void EffectBlure_Draw(void* thisx, GraphicsContext* gfxCtx) {
|
|||
} else {
|
||||
gSP1Quadrangle(POLY_XLU_DISP++, j - 2, j - 1, j + 1, j, 0);
|
||||
|
||||
if (1) {} // Necessary to match
|
||||
|
||||
|
||||
if (this->unkFlag == 1) {
|
||||
phi_t2 = 0;
|
||||
}
|
||||
|
@ -1061,6 +1051,6 @@ void EffectBlure_Draw(void* thisx, GraphicsContext* gfxCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
CLOSE_DISPS(gfxCtx, "../z_eff_blure.c", 1823);
|
||||
CLOSE_DISPS(gfxCtx);
|
||||
FrameInterpolation_RecordCloseChild();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue