diff --git a/src/code/z_camera.c b/src/code/z_camera.c index 7c8047c00d..2bca956d51 100644 --- a/src/code/z_camera.c +++ b/src/code/z_camera.c @@ -1871,7 +1871,7 @@ 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 (!sp98) {} + if (1) {} anim->swing.swingUpdateRateTimer--; } else { camera->yawUpdateRateInv = Camera_LERPCeilF(norm3->yawUpdateSpeed, camera->yawUpdateRateInv, sp98, 0.1f); @@ -3371,7 +3371,6 @@ s32 Camera_KeepOn3(Camera* camera) { sp82 = atToEyeAdj.pitch; playerHeadPos = camPlayerPosRot->pos; playerHeadPos.y += playerHeight; - if (!temp_f0) {} Camera_Vec3fVecSphGeoAdd(&anim->atTarget, &playerHeadPos, &targetToPlayerDir); angleCnt = ARRAY_COUNT(D_8011D3B0); i = 0; @@ -6734,7 +6733,7 @@ s32 Camera_Special9(Camera* camera) { } break; } - if (!camera->globalCtx->state.frames) {} + if (1) {} spAC = playerPosRot->pos; spAC.y += playerYOffset; camera->dist = OLib_Vec3fDist(&spAC, eye); diff --git a/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c b/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c index b9d172655c..cbf79b8256 100644 --- a/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c +++ b/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c @@ -181,15 +181,14 @@ void BgJya1flift_DelayMove(BgJya1flift* this, GlobalContext* globalCtx) { } } -void BgJya1flift_Update(Actor* thisx, GlobalContext* globalCtx) { +void BgJya1flift_Update(Actor* thisx, GlobalContext* globalCtx2) { BgJya1flift* this = THIS; - s32 pad; + GlobalContext* globalCtx = globalCtx2; s32 tempIsRiding; // Room 0 is the first room and 6 is the room that the lift starts on if (globalCtx->roomCtx.curRoom.num == 6 || globalCtx->roomCtx.curRoom.num == 0) { this->actionFunc(this, globalCtx); - if (globalCtx) {} tempIsRiding = func_8004356C(&this->dyna) ? true : false; if ((this->actionFunc == BgJya1flift_Move) || (this->actionFunc == BgJya1flift_DelayMove)) { if (tempIsRiding) { diff --git a/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c b/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c index ec0c91383a..2ed9f68415 100644 --- a/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c +++ b/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c @@ -1098,7 +1098,6 @@ void DemoEffect_UpdateLightEffect(DemoEffect* this, GlobalContext* globalCtx) { } if (globalCtx->sceneNum == SCENE_TOKINOMA && gSaveContext.sceneSetupIndex == 14) { - // do {} while(0) necessary to match do { if (globalCtx->csCtx.npcActions[this->csActionId]->action == 2) { Audio_PlayActorSound2(&this->actor, NA_SE_EV_LIGHT_GATHER - SFX_FLAG); diff --git a/src/overlays/actors/ovl_En_Bom/z_en_bom.c b/src/overlays/actors/ovl_En_Bom/z_en_bom.c index bae8cbeb72..acfbcd50c0 100644 --- a/src/overlays/actors/ovl_En_Bom/z_en_bom.c +++ b/src/overlays/actors/ovl_En_Bom/z_en_bom.c @@ -219,14 +219,15 @@ void EnBom_Explode(EnBom* this, GlobalContext* globalCtx) { } } -void EnBom_Update(Actor* thisx, GlobalContext* globalCtx) { +void EnBom_Update(Actor* thisx, GlobalContext* globalCtx2) { Vec3f effVelocity = { 0.0f, 0.0f, 0.0f }; Vec3f bomb2Accel = { 0.0f, 0.1f, 0.0f }; Vec3f effAccel = { 0.0f, 0.0f, 0.0f }; Vec3f effPos; Vec3f dustAccel = { 0.0f, 0.6f, 0.0f }; Color_RGBA8 dustColor = { 255, 255, 255, 255 }; - s32 pad[2]; + s32 pad; + GlobalContext* globalCtx = globalCtx2; EnBom* this = THIS; thisx->gravity = -1.2f; @@ -314,7 +315,6 @@ void EnBom_Update(Actor* thisx, GlobalContext* globalCtx) { } Audio_PlayActorSound2(thisx, NA_SE_IT_BOMB_EXPLOSION); - if (globalCtx) {}; globalCtx->envCtx.unk_8C[1][0] = globalCtx->envCtx.unk_8C[1][1] = globalCtx->envCtx.unk_8C[1][2] = 0xFA; globalCtx->envCtx.unk_8C[0][0] = globalCtx->envCtx.unk_8C[0][1] = globalCtx->envCtx.unk_8C[0][2] = 0xFA; Camera_AddQuake(&globalCtx->mainCamera, 2, 0xB, 8); diff --git a/src/overlays/actors/ovl_En_Cow/z_en_cow.c b/src/overlays/actors/ovl_En_Cow/z_en_cow.c index ecf1aa0c8a..68728bce94 100644 --- a/src/overlays/actors/ovl_En_Cow/z_en_cow.c +++ b/src/overlays/actors/ovl_En_Cow/z_en_cow.c @@ -294,15 +294,14 @@ void func_809DFA84(EnCow* this, GlobalContext* globalCtx) { } } -void EnCow_Update(Actor* thisx, GlobalContext* globalCtx) { +void EnCow_Update(Actor* thisx, GlobalContext* globalCtx2) { EnCow* this = THIS; - s32 pad; + GlobalContext* globalCtx = globalCtx2; s16 targetX; s16 targetY; Player* player = PLAYER; CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->colliders[0].base); - if (globalCtx) {} // necessary to match CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->colliders[1].base); Actor_MoveForward(thisx); Actor_UpdateBgCheckInfo(globalCtx, thisx, 0.0f, 0.0f, 0.0f, 4); diff --git a/src/overlays/actors/ovl_En_Gs/z_en_gs.c b/src/overlays/actors/ovl_En_Gs/z_en_gs.c index 77842cc175..7386793458 100644 --- a/src/overlays/actors/ovl_En_Gs/z_en_gs.c +++ b/src/overlays/actors/ovl_En_Gs/z_en_gs.c @@ -513,14 +513,12 @@ void func_80A4F77C(EnGs* this) { this->unk_19C = 3; } -void EnGs_Update(Actor* thisx, GlobalContext* globalCtx) { - s32 pad; +void EnGs_Update(Actor* thisx, GlobalContext* globalCtx2) { + GlobalContext* globalCtx = globalCtx2; EnGs* this = THIS; Actor_SetFocus(&this->actor, 23.0f); - if (globalCtx) {}; if (!(this->unk_19E & 0x10)) { - if (globalCtx) {}; if (this->collider.base.acFlags & AC_HIT) { this->unk_19F = 0; this->collider.base.acFlags &= ~AC_HIT; diff --git a/src/overlays/actors/ovl_En_Insect/z_en_insect.c b/src/overlays/actors/ovl_En_Insect/z_en_insect.c index b6047b37aa..dc4698aafb 100644 --- a/src/overlays/actors/ovl_En_Insect/z_en_insect.c +++ b/src/overlays/actors/ovl_En_Insect/z_en_insect.c @@ -164,8 +164,9 @@ void func_80A7C058(EnInsect* this) { } } -void EnInsect_Init(Actor* thisx, GlobalContext* globalCtx) { +void EnInsect_Init(Actor* thisx, GlobalContext* globalCtx2) { EnInsect* this = THIS; + GlobalContext* globalCtx = globalCtx2; f32 rand; s16 temp_s2; s32 count; @@ -205,15 +206,11 @@ void EnInsect_Init(Actor* thisx, GlobalContext* globalCtx) { Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_INSECT, this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, this->actor.shape.rot.x, this->actor.shape.rot.y, this->actor.shape.rot.z, 3); - - if (globalCtx) {} } } func_80A7D39C(this); - if (1) {} - D_80A7DEB8++; } else { rand = Rand_ZeroOne(); @@ -349,7 +346,7 @@ void func_80A7C86C(EnInsect* this, GlobalContext* globalCtx) { yaw -= 0x2000; } } - if (globalCtx) {} + if (globalCtx) {} // Must be 'globalCtx' Math_ScaledStepToS(&this->actor.world.rot.y, yaw, 2000); } this->actor.shape.rot.y = this->actor.world.rot.y; @@ -450,7 +447,7 @@ void func_80A7CE60(EnInsect* this) { void func_80A7CEC0(EnInsect* this, GlobalContext* globalCtx) { f32 temp_f0; s16 temp_v1; - s16 padding; + s16 pad; s16 sp4E; Vec3f sp40; s32 phi_v0; diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c index c4ae70e5e6..65b6c1f732 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -3923,8 +3923,6 @@ s32 func_80839034(GlobalContext* globalCtx, Player* this, CollisionPoly* poly, s f32 linearVel; s32 yaw; - if (1) {} - if (this->actor.category == ACTORCAT_PLAYER) { sp3C = 0; @@ -4641,8 +4639,6 @@ void func_8083AE40(Player* this, s16 objectId) { LOG_HEX("size", size, "../z_player.c", 9090); ASSERT(size <= 1024 * 8, "size <= 1024 * 8", "../z_player.c", 9091); - if (gObjectTable[objectId].vromEnd) {} - DmaMgr_SendRequest2(&this->giObjectDmaRequest, (u32)this->giObjectSegment, gObjectTable[objectId].vromStart, size, 0, &this->giObjectLoadQueue, NULL, "../z_player.c", 9099); } @@ -9805,7 +9801,6 @@ void func_80848C74(GlobalContext* globalCtx, Player* this) { EffectSsFireTail_SpawnFlameOnPlayer(globalCtx, flameScale, i, flameIntensity); } - if (1) {} } if (spawnedFlame) { @@ -10381,12 +10376,10 @@ void func_8084A0E8(GlobalContext* globalCtx, Player* this, s32 lod, Gfx* cullDLi CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_player.c", 19328); } -void Player_Draw(Actor* thisx, GlobalContext* globalCtx) { - s32 pad; +void Player_Draw(Actor* thisx, GlobalContext* globalCtx2) { + GlobalContext* globalCtx = globalCtx2; Player* this = THIS; - if (1) {} - OPEN_DISPS(globalCtx->state.gfxCtx, "../z_player.c", 19346); if (!(this->stateFlags2 & 0x20000000)) {