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:
@@ -949,7 +949,6 @@ s32 func_800458D4(Camera* camera, VecSph* eyeAtDir, f32 arg2, f32* arg3, s16 arg
|
||||
eyeAtAngle = Math_FAtan2F(deltaY, OLib_Vec3fDistXZ(&camera->at, &camera->eye));
|
||||
|
||||
if (eyeAtAngle > DEGF_TO_RADF(OREG(32))) {
|
||||
if (1) {}
|
||||
phi_f2 = 1.0f - sinf(DEGF_TO_RADF(eyeAtAngle - OREG(32)));
|
||||
} else if (eyeAtAngle < DEGF_TO_RADF(OREG(33))) {
|
||||
phi_f2 = 1.0f - sinf(DEGF_TO_RADF(OREG(33)) - eyeAtAngle);
|
||||
@@ -1876,7 +1875,6 @@ s32 Camera_Normal3(Camera* camera) {
|
||||
camera->yawUpdateRateInv, sp98, 0.1f);
|
||||
camera->pitchUpdateRateInv = Camera_LERPCeilF((f32)OREG(7) + (anim->swing.swingUpdateRateTimer * 2),
|
||||
camera->pitchUpdateRateInv, sp94, 0.1f);
|
||||
if (1) {}
|
||||
anim->swing.swingUpdateRateTimer--;
|
||||
} else {
|
||||
camera->yawUpdateRateInv = Camera_LERPCeilF(norm3->yawUpdateSpeed, camera->yawUpdateRateInv, sp98, 0.1f);
|
||||
@@ -5401,7 +5399,6 @@ s32 Camera_Unique9(Camera* camera) {
|
||||
}
|
||||
|
||||
spB4 = scratchSph.r;
|
||||
if (1) {}
|
||||
scratchSph.r =
|
||||
!(spB4 < anim->curKeyFrame->eyeTargetInit.z)
|
||||
? Camera_LERPCeilF(anim->curKeyFrame->eyeTargetInit.z, spB4, anim->curKeyFrame->lerpStepScale, 1.0f)
|
||||
@@ -6666,7 +6663,6 @@ s32 Camera_Special9(Camera* camera) {
|
||||
sCameraInterfaceFlags = params->interfaceFlags;
|
||||
|
||||
switch (camera->animState) {
|
||||
if (1) {}
|
||||
|
||||
case 0:
|
||||
camera->unk_14C &= ~(0x4 | 0x2);
|
||||
@@ -6751,7 +6747,6 @@ s32 Camera_Special9(Camera* camera) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (1) {}
|
||||
spAC = playerPosRot->pos;
|
||||
spAC.y += playerYOffset;
|
||||
camera->dist = OLib_Vec3fDist(&spAC, eye);
|
||||
@@ -6762,7 +6757,7 @@ s32 Camera_Special9(Camera* camera) {
|
||||
}
|
||||
|
||||
Camera* Camera_Create(View* view, CollisionContext* colCtx, GlobalContext* globalCtx) {
|
||||
Camera* newCamera = ZeldaArena_MallocDebug(sizeof(*newCamera), "../z_camera.c", 9370);
|
||||
Camera* newCamera = ZELDA_ARENA_MALLOC_DEBUG(sizeof(*newCamera));
|
||||
|
||||
if (newCamera != NULL) {
|
||||
osSyncPrintf(VT_FGCOL(BLUE) "camera: create --- allocate %d byte" VT_RST "\n", sizeof(*newCamera) * 4);
|
||||
@@ -6776,7 +6771,7 @@ Camera* Camera_Create(View* view, CollisionContext* colCtx, GlobalContext* globa
|
||||
void Camera_Destroy(Camera* camera) {
|
||||
if (camera != NULL) {
|
||||
osSyncPrintf(VT_FGCOL(BLUE) "camera: destroy ---" VT_RST "\n");
|
||||
ZeldaArena_FreeDebug(camera, "../z_camera.c", 9391);
|
||||
ZELDA_ARENA_FREE_DEBUG(camera);
|
||||
} else {
|
||||
osSyncPrintf(VT_COL(YELLOW, BLACK) "camera: destroy: already cleared\n" VT_RST);
|
||||
}
|
||||
@@ -7782,7 +7777,6 @@ s16 Camera_ChangeSettingFlags(Camera* camera, s16 setting, s16 flags) {
|
||||
}
|
||||
|
||||
if (flags & 8) {
|
||||
if (1) {}
|
||||
camera->camDataIdx = camera->prevCamDataIdx;
|
||||
camera->prevCamDataIdx = -1;
|
||||
} else if (!(flags & 4)) {
|
||||
|
||||
Reference in New Issue
Block a user