1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-12-27 23:36:22 +00:00

Remove and change some fake matches (#910)

* remove fake match

* remove another fake match

* move globalCtx temp

* remove more fake matches

* remove commented lines

* this is it I promise
This commit is contained in:
louist103 2021-08-19 18:14:23 -04:00 committed by GitHub
parent 0042acb539
commit 17c79a8f60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 17 additions and 33 deletions

View file

@ -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);

View file

@ -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) {

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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;

View file

@ -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;

View file

@ -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)) {