1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-03 06:24:30 +00:00

Misc Cleanup (#1585)

* misc cleanup

* more fake matches

* revert for sym
This commit is contained in:
engineer124 2023-11-22 20:19:31 +11:00 committed by GitHub
parent 2aaa286cf8
commit f2c06ce441
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
45 changed files with 134 additions and 161 deletions

View file

@ -139,12 +139,7 @@ void func_8087E040(BgHakaMeganeBG* this, PlayState* play) {
void func_8087E10C(BgHakaMeganeBG* this, PlayState* play) {
this->dyna.actor.velocity.y += 1.0f;
if (this->dyna.actor.velocity.y > 20.0f) {
this->dyna.actor.velocity.y = 20.0f;
} else {
this->dyna.actor.velocity.y = this->dyna.actor.velocity.y;
}
this->dyna.actor.velocity.y = CLAMP_MAX(this->dyna.actor.velocity.y, 20.0f);
if (this->unk_16A != 0) {
this->unk_16A--;

View file

@ -354,7 +354,7 @@ void BgSpot06Objects_LockSwimToSurface(BgSpot06Objects* this, PlayState* play) {
cos = Math_CosS(this->dyna.actor.shape.rot.x) * 4.3f;
this->dyna.actor.world.pos.x += (cos * Math_SinS(this->dyna.actor.shape.rot.y));
this->dyna.actor.world.pos.z += (cos * Math_CosS(this->dyna.actor.shape.rot.y));
this->dyna.actor.world.pos.y = this->dyna.actor.world.pos.y - 1.3f;
this->dyna.actor.world.pos.y -= 1.3f;
BgSpot06Objects_LockSpawnWaterRipples(this, play, 0);
if (Math_ScaledStepToS(&this->dyna.actor.shape.rot.x, 0, 0x260) != 0) {

View file

@ -373,7 +373,7 @@ void BgSpot08Iceblock_FloatRotating(BgSpot08Iceblock* this, PlayState* play) {
BgSpot08Iceblock_Bobbing(this);
BgSpot08Iceblock_SinkUnderPlayer(this);
BgSpot08Iceblock_SetWaterline(this);
this->dyna.actor.world.rot.y = this->dyna.actor.world.rot.y + 0x190;
this->dyna.actor.world.rot.y += 0x190;
this->dyna.actor.shape.rot.y = this->dyna.actor.world.rot.y;
BgSpot08Iceblock_Roll(this, play);
}

View file

@ -145,7 +145,7 @@ static s16 D_808B6088[] = { 0, 1, 2, 3, 4 };
void func_808B4C30(BgSpot16Bombstone* this) {
this->switchFlag = (this->actor.params >> 8) & 0x3F;
this->actor.params = this->actor.params & 0xFF;
this->actor.params &= 0xFF;
}
void func_808B4C4C(BgSpot16Bombstone* this, PlayState* play) {

View file

@ -249,7 +249,7 @@ void func_808B7D50(BgSpot18Basket* this, PlayState* play) {
Math_StepToS(&this->unk_210, 0xBB8, 0x64);
}
this->dyna.actor.shape.rot.y = this->dyna.actor.shape.rot.y + this->unk_210;
this->dyna.actor.shape.rot.y += this->unk_210;
if (this->unk_216 < 70) {
Math_StepToF(&this->unk_208, 100.0f, 2.0f);

View file

@ -45,7 +45,7 @@ void BgYdanHasi_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(thisx, sInitChain);
this->type = ((thisx->params >> 8) & 0x3F);
thisx->params = thisx->params & 0xFF;
thisx->params &= 0xFF;
waterBox = &play->colCtx.colHeader->waterBoxes[1];
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
if (thisx->params == HASI_WATER) {

View file

@ -168,7 +168,6 @@ void BgYdanSp_UpdateFloorWebCollision(BgYdanSp* this) {
void BgYdanSp_BurnWeb(BgYdanSp* this, PlayState* play) {
this->timer = 30;
this = this;
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
Flags_SetSwitch(play, this->isDestroyedSwitchFlag);
if (this->dyna.actor.params == WEB_FLOOR) {
@ -312,11 +311,7 @@ void BgYdanSp_FloorWebIdle(BgYdanSp* this, PlayState* play) {
if (this->unk_16C < 0.1f) {
this->timer = 14;
}
if (this->unk_16C < 2.0f) {
this->unk_16C = 2.0f;
} else {
this->unk_16C = this->unk_16C;
}
this->unk_16C = CLAMP_MIN(this->unk_16C, 2.0f);
}
}
if (this->timer != 0) {

View file

@ -107,9 +107,9 @@ void BgZg_Init(Actor* thisx, PlayState* play) {
CollisionHeader_GetVirtual(&gTowerCollapseBarsCol, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
if ((func_808C0CC8(this) == 8) || (func_808C0CC8(this) == 9)) {
this->dyna.actor.scale.x = this->dyna.actor.scale.x * 1.3f;
this->dyna.actor.scale.z = this->dyna.actor.scale.z * 1.3f;
this->dyna.actor.scale.y = this->dyna.actor.scale.y * 1.2f;
this->dyna.actor.scale.x *= 1.3f;
this->dyna.actor.scale.z *= 1.3f;
this->dyna.actor.scale.y *= 1.2f;
}
this->action = 0;

View file

@ -1410,7 +1410,7 @@ void BossDodongo_DeathCutscene(BossDodongo* this, PlayState* play) {
this->actor.velocity.y = 15.0f;
Actor_PlaySfx(&this->actor, NA_SE_EN_DODO_K_COLI2);
if (this->unk_1A2 == 0) {
this->unk_1A0 = this->unk_1A0 + 1;
this->unk_1A0++;
if (this->unk_1A0 >= 4) {
this->unk_1A0 = 0;
}

View file

@ -1851,10 +1851,8 @@ void BossGanon_PoundFloor(BossGanon* this, PlayState* play) {
switch (this->unk_1C2) {
case 0:
targetPosX = Math_SinS(this->unk_1A2 * 1280);
targetPosX = targetPosX * this->fwork[GDF_CENTER_POS];
targetPosZ = Math_CosS(this->unk_1A2 * 1792);
targetPosZ = targetPosZ * this->fwork[GDF_CENTER_POS];
targetPosX = Math_SinS(this->unk_1A2 * 1280) * this->fwork[GDF_CENTER_POS];
targetPosZ = Math_CosS(this->unk_1A2 * 1792) * this->fwork[GDF_CENTER_POS];
Math_ApproachF(&this->actor.world.pos.x, targetPosX, 0.05f, this->fwork[GDF_FWORK_0]);
Math_ApproachF(&this->actor.world.pos.z, targetPosZ, 0.05f, this->fwork[GDF_FWORK_0]);
@ -1987,11 +1985,8 @@ void BossGanon_ChargeBigMagic(BossGanon* this, PlayState* play) {
SkelAnime_Update(&this->skelAnime);
targetPosX = Math_SinS(this->unk_1A2 * 1280);
targetPosX = targetPosX * this->fwork[GDF_CENTER_POS];
targetPosZ = Math_CosS(this->unk_1A2 * 1792);
targetPosZ = targetPosZ * this->fwork[GDF_CENTER_POS];
targetPosX = Math_SinS(this->unk_1A2 * 1280) * this->fwork[GDF_CENTER_POS];
targetPosZ = Math_CosS(this->unk_1A2 * 1792) * this->fwork[GDF_CENTER_POS];
Math_ApproachF(&this->actor.world.pos.x, targetPosX, 0.05f, this->fwork[GDF_FWORK_0]);
Math_ApproachF(&this->actor.world.pos.z, targetPosZ, 0.05, this->fwork[GDF_FWORK_0]);
@ -2556,7 +2551,7 @@ void BossGanon_Vulnerable(BossGanon* this, PlayState* play) {
case 2:
sCape->minDist = 0.0f;
this->actor.velocity.y = this->actor.velocity.y - 0.5f;
this->actor.velocity.y -= 0.5f;
if (this->actor.world.pos.y < 40.0f) {
this->actor.world.pos.y = 40.0f;
@ -3721,8 +3716,8 @@ void BossGanon_GenShadowTexture(u8* tex, BossGanon* this, PlayState* play) {
Matrix_MultVec3f(&sp7C, &sp70);
sp70.x = sp70.x * 0.28f;
sp70.y = sp70.y * 0.28f;
sp70.x *= 0.28f;
sp70.y *= 0.28f;
baseX = (s32)(sp70.x + 32.0f);
baseY = (s16)sp70.y * 0x40;
@ -4436,9 +4431,9 @@ void func_808E2544(Actor* thisx, PlayState* play) {
this->unk_1F0.y = Rand_CenteredFloat(200.0f) + dorf->unk_1FC.y;
this->unk_1F0.z = Rand_CenteredFloat(700.0f) + dorf->unk_1FC.z;
this->unk_1F0.x = this->unk_1F0.x + ((this->unk_1F0.x - this->actor.world.pos.x) * 100.0f);
this->unk_1F0.y = this->unk_1F0.y + ((this->unk_1F0.y - this->actor.world.pos.y) * 100.0f);
this->unk_1F0.z = this->unk_1F0.z + ((this->unk_1F0.z - this->actor.world.pos.z) * 100.0f);
this->unk_1F0.x += (this->unk_1F0.x - this->actor.world.pos.x) * 100.0f;
this->unk_1F0.y += (this->unk_1F0.y - this->actor.world.pos.y) * 100.0f;
this->unk_1F0.z += (this->unk_1F0.z - this->actor.world.pos.z) * 100.0f;
numEffects = 10;
break;

View file

@ -445,7 +445,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) {
this->unk_39C = 14;
this->unk_398 = 0;
this->actor.world.pos.x = -200.0f;
this->actor.world.pos.y = this->actor.world.pos.y - 30.0f;
this->actor.world.pos.y -= 30.0f;
this->actor.world.pos.z = -200.0f;
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_OPENING_GANON);
} else {

View file

@ -2022,14 +2022,14 @@ void BossTw_TwinrovaIntroCS(BossTw* this, PlayState* play) {
Actor_SetScale(&sKotakePtr->actor, 0.014999999f);
}
} else {
sKoumePtr->actor.shape.rot.y = sKoumePtr->actor.shape.rot.y + (s16)this->subCamYawStep;
sKoumePtr->actor.shape.rot.y += (s16)this->subCamYawStep;
}
} else {
if ((this->work[CS_TIMER_1] % 8) == 0) {
Actor_PlaySfx(&sKoumePtr->actor, NA_SE_EN_TWINROBA_ROLL);
}
sKoumePtr->actor.shape.rot.y = sKoumePtr->actor.shape.rot.y + (s16)this->subCamYawStep;
sKoumePtr->actor.shape.rot.y += (s16)this->subCamYawStep;
Math_ApproachF(&this->subCamYawStep, 12288.0f, 1.0f, 384.0f);
if (Animation_OnFrame(&sKoumePtr->skelAnime, this->workf[ANIM_SW_TGT])) {
@ -2182,14 +2182,14 @@ void BossTw_TwinrovaIntroCS(BossTw* this, PlayState* play) {
this->spawnPortalAlpha = 0.0f;
}
} else {
sKotakePtr->actor.shape.rot.y = sKotakePtr->actor.shape.rot.y + (s16)this->subCamYawStep;
sKotakePtr->actor.shape.rot.y += (s16)this->subCamYawStep;
}
} else {
if ((this->work[CS_TIMER_1] % 8) == 0) {
Actor_PlaySfx(&sKotakePtr->actor, NA_SE_EN_TWINROBA_ROLL);
}
sKotakePtr->actor.shape.rot.y = sKotakePtr->actor.shape.rot.y + (s16)this->subCamYawStep;
sKotakePtr->actor.shape.rot.y += (s16)this->subCamYawStep;
Math_ApproachF(&this->subCamYawStep, 12288.0f, 1.0f, 384.0f);
if (Animation_OnFrame(&sKotakePtr->skelAnime, this->workf[ANIM_SW_TGT])) {
@ -3951,7 +3951,7 @@ void BossTw_BlastFire(BossTw* this, PlayState* play) {
this->actor.world.pos.y = -2000.0f;
Matrix_MtxFToYXZRotS(&player2->shieldMf, &blastDir, 0);
blastDir.x = -blastDir.x;
blastDir.y = blastDir.y + 0x8000;
blastDir.y += 0x8000;
Math_ApproachS(&this->magicDir.x, blastDir.x, 0xA, 0x800);
Math_ApproachS(&this->magicDir.y, blastDir.y, 0xA, 0x800);

View file

@ -922,7 +922,7 @@ void BossVa_BodyIntro(BossVa* this, PlayState* play) {
sSubCamEyeMaxVelFrac.z = sSubCamEyeMaxVelFrac.x;
sSubCamAtMaxVelFrac = sSubCamEyeMaxVelFrac;
sSubCamAtMaxVelFrac.z = sSubCamAtMaxVelFrac.z * 1.75f;
sSubCamAtMaxVelFrac.z *= 1.75f;
this->timer--;
if (this->timer == 0) {

View file

@ -1572,7 +1572,7 @@ void DemoGt_Draw7(DemoGt* this, PlayState* play) {
sp64 = kREG(75);
sp62 = kREG(74) + 0x7FEC;
sp60 = kREG(74) + 0x7FEC;
sp60 = sp60 + 0x4000;
sp60 += 0x4000;
sp5C = Graph_Alloc(gfxCtx, sizeof(Mtx));
sp40 = 1.0f - Math_CosS(sp6E);

View file

@ -137,16 +137,10 @@ void func_809B05F0(EnAni* this, PlayState* play) {
}
void func_809B064C(EnAni* this, PlayState* play) {
u16 textId;
u16 textId = Text_GetFaceReaction(play, 0xA);
s16 yawDiff;
u16 textId2;
textId2 = Text_GetFaceReaction(play, 0xA);
textId = textId2 & 0xFFFF;
if (!textId) {}
if (textId2 == 0) {
if (textId == 0) {
textId = !IS_DAY ? 0x5051 : 0x5050;
}

View file

@ -242,7 +242,7 @@ void EnBoom_Update(Actor* thisx, PlayState* play) {
if (!(player->stateFlags1 & PLAYER_STATE1_29)) {
this->actionFunc(this, play);
Actor_SetFocus(&this->actor, 0.0f);
this->activeTimer = this->activeTimer + 1;
this->activeTimer++;
}
}

View file

@ -80,7 +80,8 @@ void EnBx_Init(Actor* thisx, PlayState* play) {
thisx->scale.x = thisx->scale.z = 0.01f;
thisx->scale.y = 0.03f;
thisx->world.pos.y = thisx->world.pos.y - 100.0f;
thisx->world.pos.y -= 100.0f;
for (i = 0; i < 4; i++) {
this->unk_184[i] = sp48;
if (i == 0) {

View file

@ -696,7 +696,7 @@ void func_80A03610(EnElf* this, PlayState* play) {
Math_SmoothStepToF(&this->unk_2B8, 30.0f, 0.1f, 4.0f, 1.0f);
this->unk_28C.x = Math_CosS(this->unk_2AC) * this->unk_2B8;
this->unk_28C.y = this->unk_28C.y + this->unk_2B4;
this->unk_28C.y += this->unk_2B4;
switch (this->unk_2AA) {
case 0:

View file

@ -426,7 +426,7 @@ void EnFirefly_Fall(EnFirefly* this, PlayState* play) {
this->actor.colorFilterTimer = 40;
} else {
Math_ScaledStepToS(&this->actor.shape.rot.x, 0x6800, 0x200);
this->actor.shape.rot.y = this->actor.shape.rot.y - 0x300;
this->actor.shape.rot.y -= 0x300;
if (this->timer != 0) {
this->timer--;
}

View file

@ -242,7 +242,7 @@ void EnFloormas_SetupTurn(EnFloormas* this) {
if (this->actor.scale.x > 0.004f) {
this->actionTarget = (rotDelta * (2.0f / 30.0f));
} else {
this->skelAnime.playSpeed = this->skelAnime.playSpeed + this->skelAnime.playSpeed;
this->skelAnime.playSpeed *= 2.0f;
this->actionTarget = rotDelta * (2.0f / 15.0f);
}
this->actionFunc = EnFloormas_Turn;

View file

@ -710,8 +710,8 @@ void EnGoma_Update(Actor* thisx, PlayState* play) {
this->actionFunc(this, play);
Actor_MoveXZGravity(&this->actor);
this->actor.world.pos.x = this->actor.world.pos.x + this->shieldKnockbackVel.x;
this->actor.world.pos.z = this->actor.world.pos.z + this->shieldKnockbackVel.z;
this->actor.world.pos.x += this->shieldKnockbackVel.x;
this->actor.world.pos.z += this->shieldKnockbackVel.z;
Math_ApproachZeroF(&this->shieldKnockbackVel.x, 1.0f, 3.0f);
Math_ApproachZeroF(&this->shieldKnockbackVel.z, 1.0f, 3.0f);

View file

@ -806,11 +806,11 @@ s32 EnHeishi2_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3
break;
default:
if (limbIndex == 9) {
rot->x = rot->x + this->unk_26C.y;
rot->x += this->unk_26C.y;
}
if (limbIndex == 16) {
rot->x = rot->x + this->unk_260.y;
rot->z = rot->z + this->unk_260.z;
rot->x += this->unk_260.y;
rot->z += this->unk_260.z;
}
}

View file

@ -562,15 +562,15 @@ void EnHorse_UpdateIngoRaceInfo(EnHorse* this, PlayState* play, RaceInfo* raceIn
playerDist = this->actor.xzDistToPlayer;
if (playerDist < 130.0f || this->jntSph.elements[0].info.ocElemFlags & OCELEM_HIT) {
if (Math_SinS(this->actor.yawTowardsPlayer - this->actor.world.rot.y) > 0.0f) {
this->actor.world.rot.y = this->actor.world.rot.y - 280;
this->actor.world.rot.y -= 280;
} else {
this->actor.world.rot.y = this->actor.world.rot.y + 280;
this->actor.world.rot.y += 280;
}
} else if (playerDist < 300.0f) {
if (Math_SinS(this->actor.yawTowardsPlayer - this->actor.world.rot.y) > 0.0f) {
this->actor.world.rot.y = this->actor.world.rot.y + 280;
this->actor.world.rot.y += 280;
} else {
this->actor.world.rot.y = this->actor.world.rot.y - 280;
this->actor.world.rot.y -= 280;
}
}
this->actor.shape.rot.y = this->actor.world.rot.y;
@ -750,7 +750,7 @@ void EnHorse_Init(Actor* thisx, PlayState* play2) {
this->riderPos = this->actor.world.pos;
this->noInputTimer = 0;
this->noInputTimerMax = 0;
this->riderPos.y = this->riderPos.y + 70.0f;
this->riderPos.y += 70.0f;
if (DREG(4) == 0) {
DREG(4) = 70;
@ -1172,7 +1172,7 @@ void EnHorse_MountedTurn(EnHorse* this, PlayState* play) {
EnHorse_StartReversingInterruptable(this);
} else if (Math_CosS(stickAngle) <= 0.7071) { // cos(45 degrees)
clampedYaw = CLAMP(stickAngle, -800.0f, 800.0f);
this->actor.world.rot.y = this->actor.world.rot.y + clampedYaw;
this->actor.world.rot.y += clampedYaw;
this->actor.shape.rot.y = this->actor.world.rot.y;
} else {
EnHorse_StartWalkingInterruptable(this);
@ -1931,7 +1931,7 @@ void EnHorse_FollowPlayer(EnHorse* this, PlayState* play) {
this->stateFlags &= ~ENHORSE_LAND2_SOUND;
this->unk_21C = this->unk_228;
} else if (this->stateFlags & ENHORSE_TURNING_TO_PLAYER) {
this->actor.world.rot.y = this->actor.world.rot.y + this->followPlayerTurnSpeed;
this->actor.world.rot.y += this->followPlayerTurnSpeed;
this->actor.shape.rot.y = this->actor.world.rot.y;
if (this->curFrame > 25.0f) {
if (!(this->stateFlags & ENHORSE_LAND2_SOUND)) {
@ -2755,7 +2755,7 @@ void EnHorse_BridgeJumpInit(EnHorse* this, PlayState* play) {
this->stateFlags |= ENHORSE_JUMPING;
this->animationIdx = ENHORSE_ANIM_HIGH_JUMP;
y = this->skin.skelAnime.jointTable->y;
y = y * 0.01f;
y *= 0.01f;
this->bridgeJumpStart = this->actor.world.pos;
this->bridgeJumpStart.y += y;
this->bridgeJumpYVel =
@ -3106,7 +3106,7 @@ void EnHorse_BgCheckSlowMoving(EnHorse* this, PlayState* play) {
yOffset = 40.0f;
}
Math_Vec3f_Copy(&start, &this->actor.world.pos);
start.y = start.y + yOffset;
start.y += yOffset;
Math_Vec3f_Copy(&end, &start);
end.x += 30.0f * Math_SinS(this->actor.world.rot.y);
@ -3370,7 +3370,7 @@ void EnHorse_RegenBoost(EnHorse* this, PlayState* play) {
this->boostTimer++;
if (this->boostRegenTime <= 0) {
this->numBoosts = this->numBoosts + 1;
this->numBoosts++;
if (!EN_HORSE_CHECK_4(this)) {
Audio_PlaySfxGeneral(NA_SE_SY_CARROT_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
@ -3697,9 +3697,9 @@ void EnHorse_PostDraw(Actor* thisx, PlayState* play, Skin* skin) {
if (!(this->stateFlags & ENHORSE_CALC_RIDER_POS)) {
Skin_GetLimbPos(skin, 30, &riderOffset, &this->riderPos);
this->riderPos.x = this->riderPos.x - this->actor.world.pos.x;
this->riderPos.y = this->riderPos.y - this->actor.world.pos.y;
this->riderPos.z = this->riderPos.z - this->actor.world.pos.z;
this->riderPos.x -= this->actor.world.pos.x;
this->riderPos.y -= this->actor.world.pos.y;
this->riderPos.z -= this->actor.world.pos.z;
} else {
this->stateFlags &= ~ENHORSE_CALC_RIDER_POS;
}
@ -3712,7 +3712,7 @@ void EnHorse_PostDraw(Actor* thisx, PlayState* play, Skin* skin) {
if (Rand_ZeroOne() < 0.6f) {
this->dustFlags |= 1;
Skin_GetLimbPos(skin, 28, &hoofOffset, &this->frontRightHoof);
this->frontRightHoof.y = this->frontRightHoof.y - 5.0f;
this->frontRightHoof.y -= 5.0f;
}
} else {
if (this->action == ENHORSE_ACT_STOPPING) {

View file

@ -556,7 +556,7 @@ void EnPeehat_Larva_StateSeekPlayer(EnPeehat* this, PlayState* play) {
Actor_PlaySfx(&this->actor, NA_SE_EN_PIHAT_SM_FLY - SFX_FLAG);
if (this->colQuad.base.atFlags & AT_BOUNCED) {
this->actor.colChkInfo.health = 0;
this->colQuad.base.acFlags = this->colQuad.base.acFlags & ~AC_BOUNCED;
this->colQuad.base.acFlags &= ~AC_BOUNCED;
EnPeehat_SetStateAttackRecoil(this);
} else if ((this->colQuad.base.atFlags & AT_HIT) || (this->colCylinder.base.acFlags & AC_HIT) ||
(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {

View file

@ -30,7 +30,7 @@ void EnRiverSound_Init(Actor* thisx, PlayState* play) {
this->playSfx = false;
this->pathIndex = (this->actor.params >> 8) & 0xFF;
this->actor.params = this->actor.params & 0xFF;
this->actor.params &= 0xFF;
if (this->actor.params >= RS_GANON_TOWER_0) {
// Incrementally increase volume of NA_BGM_GANON_TOWER for each new room during the climb of Ganon's Tower

View file

@ -629,7 +629,6 @@ s32 func_80AFEDF8(EnSkj* this, PlayState* play) {
s16 yawDiff;
if (this->actor.xzDistToPlayer < this->unk_2EC) {
this = this;
if (func_8002DDE4(play) != 0) {
return 1;
}

View file

@ -90,9 +90,9 @@ s32 func_80B0BE20(EnSw* this, CollisionPoly* poly) {
if (temp_f0 < 0.001f) {
return 0;
}
this->unk_37C.x = this->unk_37C.x * (1.0f / temp_f0);
this->unk_37C.y = this->unk_37C.y * (1.0f / temp_f0);
this->unk_37C.z = this->unk_37C.z * (1.0f / temp_f0);
this->unk_37C.x *= 1.0f / temp_f0;
this->unk_37C.y *= 1.0f / temp_f0;
this->unk_37C.z *= 1.0f / temp_f0;
this->unk_364 = polyNormal;
this->unk_3D8.xx = this->unk_370.x;
this->unk_3D8.yx = this->unk_370.y;

View file

@ -125,7 +125,7 @@ void EnWallmas_Init(Actor* thisx, PlayState* play) {
Collider_SetCylinder(play, &this->collider, thisx, &sCylinderInit);
CollisionCheck_SetInfo(&thisx->colChkInfo, &sDamageTable, &sColChkInfoInit);
this->switchFlag = (u8)(thisx->params >> 0x8);
thisx->params = thisx->params & 0xFF;
thisx->params &= 0xFF;
if (thisx->params == WMT_FLAG) {
if (Flags_GetSwitch(play, this->switchFlag) != 0) {
@ -365,7 +365,7 @@ void EnWallmas_ReturnToCeiling(EnWallmas* this, PlayState* play) {
SkelAnime_Update(&this->skelAnime);
if (this->skelAnime.curFrame > 20.0f) {
this->timer += 9;
this->actor.world.pos.y = this->actor.world.pos.y + 30.0f;
this->actor.world.pos.y += 30.0f;
}
if (Animation_OnFrame(&this->skelAnime, 20.0f) != 0) {
@ -437,9 +437,9 @@ void EnWallmas_TakePlayer(EnWallmas* this, PlayState* play) {
player->actor.world.pos.z = this->actor.world.pos.z;
if (this->timer < 0) {
this->actor.world.pos.y = this->actor.world.pos.y + 2.0f;
this->actor.world.pos.y += 2.0f;
} else {
this->actor.world.pos.y = this->actor.world.pos.y + 10.0f;
this->actor.world.pos.y += 10.0f;
}
if (!LINK_IS_ADULT) {
@ -461,7 +461,7 @@ void EnWallmas_TakePlayer(EnWallmas* this, PlayState* play) {
Actor_PlaySfx(&this->actor, NA_SE_EN_FALL_UP);
}
this->timer = this->timer + 2;
this->timer += 2;
} else {
Math_StepToF(&this->actor.world.pos.y, player->actor.world.pos.y + (!LINK_IS_ADULT ? 30.0f : 50.0f), 5.0f);
}

View file

@ -677,7 +677,6 @@ void ObjSwitch_CrystalOn(ObjSwitch* this, PlayState* play) {
if ((this->jntSph.col.base.acFlags & AC_HIT) && !(this->prevColFlags & AC_HIT) &&
this->disableAcTimer <= 0) {
this->disableAcTimer = 10;
play = play;
ObjSwitch_CrystalTurnOffInit(this);
ObjSwitch_SetOff(this, play);
}

View file

@ -2659,7 +2659,7 @@ s32 func_8083499C(Player* this, PlayState* play) {
/**
* The actual sword weapon is not handled here. See `Player_ActionChange_7` for melee weapon usage.
* This upper body action allows for shielding or changing held items while a sword is in hand.
*/
*/
s32 Player_UpperAction_Sword(Player* this, PlayState* play) {
if (func_80834758(play, this) || func_8083499C(this, play)) {
return 1;
@ -11274,7 +11274,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) {
this->cylinder.dim.yShift = phi_f12 - this->actor.world.pos.y;
if (this->stateFlags1 & PLAYER_STATE1_22) {
this->cylinder.dim.height = this->cylinder.dim.height * 0.8f;
this->cylinder.dim.height *= 0.8f;
}
Collider_UpdateCylinder(&this->actor, &this->cylinder);
@ -11440,9 +11440,9 @@ void Player_DrawGameplay(PlayState* play, Player* this, s32 lod, Gfx* cullDList,
}
D_8085486C = (-sp5C * 4) + 36;
D_8085486C = D_8085486C * D_8085486C;
D_8085486C = SQ(D_8085486C);
D_8085486C = (s32)((Math_CosS(D_8085486C) * 100.0f) + 100.0f) + 55.0f;
D_8085486C = D_8085486C * (sp5C * (1.0f / 9.0f));
D_8085486C *= sp5C * (1.0f / 9.0f);
}
Matrix_SetTranslateRotateYXZ(this->actor.world.pos.x, this->actor.world.pos.y + 2.0f,

View file

@ -59,10 +59,10 @@ u32 EffectSsGRipple_Init(PlayState* play, u32 index, EffectSs* this, void* initP
return 1;
}
void EffectSsGRipple_DrawRipple(PlayState* play, EffectSs* this, void* segment) {
GraphicsContext* gfxCtx = play->state.gfxCtx;
void EffectSsGRipple_DrawRipple(PlayState* play2, EffectSs* this, void* segment) {
PlayState* play = play2;
f32 radius;
s32 pad;
GraphicsContext* gfxCtx = play->state.gfxCtx;
MtxF mfTrans;
MtxF mfScale;
MtxF mfResult;
@ -71,8 +71,6 @@ void EffectSsGRipple_DrawRipple(PlayState* play, EffectSs* this, void* segment)
OPEN_DISPS(gfxCtx, "../z_eff_ss_g_ripple.c", 199);
if (play) {}
radius = this->rRadius * 0.0025f;
if ((this->rWaterBoxNum != -1) && (this->rWaterBoxNum < play->colCtx.colHeader->numWaterBoxes)) {

View file

@ -80,7 +80,7 @@ void EffectSsIcePiece_Draw(PlayState* play, u32 index, EffectSs* this) {
void EffectSsIcePiece_Update(PlayState* play, u32 index, EffectSs* this) {
this->rPitch += this->rRotSpeed;
this->velocity.x = this->velocity.x * 0.85f;
this->velocity.y = this->velocity.y * 0.85f;
this->velocity.z = this->velocity.z * 0.85f;
this->velocity.x *= 0.85f;
this->velocity.y *= 0.85f;
this->velocity.z *= 0.85f;
}