mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-29 03:34:07 +00:00
Run formatter (#1541)
This commit is contained in:
parent
57ce0cf8d9
commit
185c9cbf1a
4 changed files with 26 additions and 27 deletions
|
@ -47,7 +47,7 @@ u64 __fixunssfdi(f32 a) {
|
||||||
u64 i;
|
u64 i;
|
||||||
} m;
|
} m;
|
||||||
|
|
||||||
__asm__ ("cvt.l.s %0, %1" : "=f"(m.f) : "f"(a));
|
__asm__("cvt.l.s %0, %1" : "=f"(m.f) : "f"(a));
|
||||||
return m.i;
|
return m.i;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -61,7 +61,7 @@ u64 __fixunsdfdi(f64 a) {
|
||||||
u64 i;
|
u64 i;
|
||||||
} m;
|
} m;
|
||||||
|
|
||||||
__asm__ ("cvt.l.d %0, %1" : "=f"(m.f) : "f"(a));
|
__asm__("cvt.l.d %0, %1" : "=f"(m.f) : "f"(a));
|
||||||
return m.i;
|
return m.i;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -74,7 +74,7 @@ s64 __fixsfdi(f32 c) {
|
||||||
s64 i;
|
s64 i;
|
||||||
} m;
|
} m;
|
||||||
|
|
||||||
__asm__ ("cvt.l.s %0, %1" : "=f"(m.f) : "f"(c));
|
__asm__("cvt.l.s %0, %1" : "=f"(m.f) : "f"(c));
|
||||||
return m.i;
|
return m.i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ s64 __fixdfdi(f64 c) {
|
||||||
s64 i;
|
s64 i;
|
||||||
} m;
|
} m;
|
||||||
|
|
||||||
__asm__ ("cvt.l.d %0, %1" : "=f"(m.f) : "f"(c));
|
__asm__("cvt.l.d %0, %1" : "=f"(m.f) : "f"(c));
|
||||||
return m.i;
|
return m.i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ f32 __floatdisf(s64 c) {
|
||||||
register f32 v;
|
register f32 v;
|
||||||
|
|
||||||
m.i = c;
|
m.i = c;
|
||||||
__asm__ ("cvt.s.l %0, %1" : "=f"(v) : "f"(m.f));
|
__asm__("cvt.s.l %0, %1" : "=f"(v) : "f"(m.f));
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ f64 __floatdidf(s64 c) {
|
||||||
register f64 v;
|
register f64 v;
|
||||||
|
|
||||||
m.i = c;
|
m.i = c;
|
||||||
__asm__ ("cvt.d.l %0, %1" : "=f"(v) : "f"(m.f));
|
__asm__("cvt.d.l %0, %1" : "=f"(v) : "f"(m.f));
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,7 +124,7 @@ f32 __floatundisf(u64 c) {
|
||||||
register f32 v;
|
register f32 v;
|
||||||
|
|
||||||
m.i = c;
|
m.i = c;
|
||||||
__asm__ ("cvt.s.l %0, %1" : "=f"(v) : "f"(m.f));
|
__asm__("cvt.s.l %0, %1" : "=f"(v) : "f"(m.f));
|
||||||
if ((s64)c < 0) {
|
if ((s64)c < 0) {
|
||||||
// cvt.s.l assumes signed input, adjust output
|
// cvt.s.l assumes signed input, adjust output
|
||||||
v += 4294967296.0f; // 2^32
|
v += 4294967296.0f; // 2^32
|
||||||
|
@ -141,7 +141,7 @@ f64 __floatundidf(u64 c) {
|
||||||
register f64 v;
|
register f64 v;
|
||||||
|
|
||||||
m.i = c;
|
m.i = c;
|
||||||
__asm__ ("cvt.d.l %0, %1" : "=f"(v) : "f"(m.f));
|
__asm__("cvt.d.l %0, %1" : "=f"(v) : "f"(m.f));
|
||||||
if ((s64)c < 0) {
|
if ((s64)c < 0) {
|
||||||
// cvt.d.l assumes signed input, adjust output
|
// cvt.d.l assumes signed input, adjust output
|
||||||
v += 18446744073709551616.0; // 2^64
|
v += 18446744073709551616.0; // 2^64
|
||||||
|
|
|
@ -69,8 +69,7 @@ void EnBomBowlMan_Init(Actor* thisx, PlayState* play2) {
|
||||||
|
|
||||||
for (i = 0; i < 2; i++) {
|
for (i = 0; i < 2; i++) {
|
||||||
cucco = (EnSyatekiNiw*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_SYATEKI_NIW, cuccoSpawnPos[i].x,
|
cucco = (EnSyatekiNiw*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_SYATEKI_NIW, cuccoSpawnPos[i].x,
|
||||||
cuccoSpawnPos[i].y, cuccoSpawnPos[i].z, 0, 0, 0,
|
cuccoSpawnPos[i].y, cuccoSpawnPos[i].z, 0, 0, 0, SYATEKI_MINIGAME_ALLEY);
|
||||||
SYATEKI_MINIGAME_ALLEY);
|
|
||||||
if (cucco != NULL) {
|
if (cucco != NULL) {
|
||||||
cucco->scale = cuccoScales[i];
|
cucco->scale = cuccoScales[i];
|
||||||
cucco->collider.dim.radius = (s16)cuccoColliderDims[i][0];
|
cucco->collider.dim.radius = (s16)cuccoColliderDims[i][0];
|
||||||
|
|
|
@ -497,9 +497,8 @@ void EnSyatekiNiw_SetupRemove(EnSyatekiNiw* this, PlayState* play) {
|
||||||
|
|
||||||
Actor_SetFocus(&this->actor, this->focusYOffset);
|
Actor_SetFocus(&this->actor, this->focusYOffset);
|
||||||
Actor_GetScreenPos(play, &this->actor, &screenX, &screenY);
|
Actor_GetScreenPos(play, &this->actor, &screenX, &screenY);
|
||||||
if ((this->actor.projectedPos.z > 200.0f) && (this->actor.projectedPos.z < 800.0f)
|
if ((this->actor.projectedPos.z > 200.0f) && (this->actor.projectedPos.z < 800.0f) && (screenX > 0) &&
|
||||||
&& (screenX > 0) && (screenX < SCREEN_WIDTH) && (screenY > 0)
|
(screenX < SCREEN_WIDTH) && (screenY > 0) && (screenY < SCREEN_HEIGHT)) {
|
||||||
&& (screenY < SCREEN_HEIGHT)) {
|
|
||||||
this->actor.speed = 5.0f;
|
this->actor.speed = 5.0f;
|
||||||
this->rotYFlip = Rand_ZeroFloat(1.99f);
|
this->rotYFlip = Rand_ZeroFloat(1.99f);
|
||||||
this->removeStateYaw = Rand_CenteredFloat(8000.0f) + -10000.0f;
|
this->removeStateYaw = Rand_CenteredFloat(8000.0f) + -10000.0f;
|
||||||
|
|
|
@ -165,7 +165,7 @@ typedef enum {
|
||||||
|
|
||||||
static u8 sOwnerHair = FS_OWNER_BALD;
|
static u8 sOwnerHair = FS_OWNER_BALD;
|
||||||
static u8 sIsOwnersHatHooked = false; // hat is on fishing hook
|
static u8 sIsOwnersHatHooked = false; // hat is on fishing hook
|
||||||
static u8 sIsOwnersHatSunk = false; // hat is sinking into pond.
|
static u8 sIsOwnersHatSunk = false; // hat is sinking into pond.
|
||||||
|
|
||||||
static s16 sRodCastState = 0;
|
static s16 sRodCastState = 0;
|
||||||
|
|
||||||
|
@ -986,7 +986,7 @@ void Fishing_Init(Actor* thisx, PlayState* play2) {
|
||||||
|
|
||||||
SkelAnime_Update(&this->skelAnime);
|
SkelAnime_Update(&this->skelAnime);
|
||||||
|
|
||||||
if (thisx->params == EN_FISH_AQUARIUM) {
|
if (thisx->params == EN_FISH_AQUARIUM) {
|
||||||
this->fishState = 100;
|
this->fishState = 100;
|
||||||
Actor_ChangeCategory(play, &play->actorCtx, thisx, ACTORCAT_PROP);
|
Actor_ChangeCategory(play, &play->actorCtx, thisx, ACTORCAT_PROP);
|
||||||
thisx->targetMode = 0;
|
thisx->targetMode = 0;
|
||||||
|
@ -2175,8 +2175,8 @@ void Fishing_UpdateLure(Fishing* this, PlayState* play) {
|
||||||
D_80B7E148 = 520.0f;
|
D_80B7E148 = 520.0f;
|
||||||
sRodLineSpooled = 195.0f;
|
sRodLineSpooled = 195.0f;
|
||||||
|
|
||||||
sRodCastState = sLureEquipped = sLureTimer = D_80B7E0B0 = D_80B7E0B2 = sRodCastTimer = sWiggleAttraction = D_80B7E114 =
|
sRodCastState = sLureEquipped = sLureTimer = D_80B7E0B0 = D_80B7E0B2 = sRodCastTimer = sWiggleAttraction =
|
||||||
D_80B7E150 = 0;
|
D_80B7E114 = D_80B7E150 = 0;
|
||||||
sLure1Rotate = sReelLinePosStep = sLurePosZOffset = 0.0f;
|
sLure1Rotate = sReelLinePosStep = sLurePosZOffset = 0.0f;
|
||||||
|
|
||||||
sLureLineSegPosDelta = zeroVec;
|
sLureLineSegPosDelta = zeroVec;
|
||||||
|
@ -2493,7 +2493,7 @@ void Fishing_UpdateLure(Fishing* this, PlayState* play) {
|
||||||
sLureRot.x = 0.0f;
|
sLureRot.x = 0.0f;
|
||||||
// lure hopping on land
|
// lure hopping on land
|
||||||
if (CHECK_BTN_ALL(input->press.button, BTN_B)) {
|
if (CHECK_BTN_ALL(input->press.button, BTN_B)) {
|
||||||
sRodLineSpooled += 6.0f;
|
sRodLineSpooled += 6.0f;
|
||||||
Sfx_PlaySfxAtPos(&sSoundPos, NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_SAND);
|
Sfx_PlaySfxAtPos(&sSoundPos, NA_SE_PL_WALK_GROUND + SURFACE_SFX_OFFSET_SAND);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -2770,7 +2770,8 @@ void func_80B70ED4(Fishing* this, Input* input) {
|
||||||
this->rotationStep = 28672.0f;
|
this->rotationStep = 28672.0f;
|
||||||
this->speedTarget = 5.0f;
|
this->speedTarget = 5.0f;
|
||||||
} else {
|
} else {
|
||||||
if ((CHECK_BTN_ALL(input->cur.button, BTN_A) || (sLureWigglePosY > 1.0f)) && (lineLengthSQ < SQ(120.0f))) {
|
if ((CHECK_BTN_ALL(input->cur.button, BTN_A) || (sLureWigglePosY > 1.0f)) &&
|
||||||
|
(lineLengthSQ < SQ(120.0f))) {
|
||||||
this->fishState = 2;
|
this->fishState = 2;
|
||||||
this->unk_15E = 0;
|
this->unk_15E = 0;
|
||||||
this->timerArray[0] = 0;
|
this->timerArray[0] = 0;
|
||||||
|
@ -3061,7 +3062,8 @@ void Fishing_UpdateFish(Actor* thisx, PlayState* play2) {
|
||||||
Fishing_SpawnBubble(NULL, play->specialEffects, &bubblePos, Rand_ZeroFloat(0.02f) + 0.03f, 1);
|
Fishing_SpawnBubble(NULL, play->specialEffects, &bubblePos, Rand_ZeroFloat(0.02f) + 0.03f, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
Math_ApproachS(&this->fishLimbEFRotYDelta, (Math_SinS(this->stateAndTimer * 0x800) * 2500.0f) + 2500.0f, 2, 0x7D0);
|
Math_ApproachS(&this->fishLimbEFRotYDelta, (Math_SinS(this->stateAndTimer * 0x800) * 2500.0f) + 2500.0f, 2,
|
||||||
|
0x7D0);
|
||||||
Math_ApproachS(&this->fishLimb89RotYDelta, Math_SinS(this->stateAndTimer * 0xA00) * 1500.0f, 2, 0x7D0);
|
Math_ApproachS(&this->fishLimb89RotYDelta, Math_SinS(this->stateAndTimer * 0xA00) * 1500.0f, 2, 0x7D0);
|
||||||
|
|
||||||
this->unk_190 = 0.3f;
|
this->unk_190 = 0.3f;
|
||||||
|
@ -3907,12 +3909,12 @@ void Fishing_UpdateFish(Actor* thisx, PlayState* play2) {
|
||||||
multiVecSrc.y = -10.0f;
|
multiVecSrc.y = -10.0f;
|
||||||
multiVecSrc.z = 5.0f;
|
multiVecSrc.z = 5.0f;
|
||||||
Matrix_MultVec3f(&multiVecSrc, &targetPosOffset);
|
Matrix_MultVec3f(&multiVecSrc, &targetPosOffset);
|
||||||
Math_ApproachF(&this->actor.world.pos.x, player->bodyPartsPos[PLAYER_BODYPART_R_HAND].x + targetPosOffset.x, 1.0f,
|
Math_ApproachF(&this->actor.world.pos.x, player->bodyPartsPos[PLAYER_BODYPART_R_HAND].x + targetPosOffset.x,
|
||||||
6.0f);
|
1.0f, 6.0f);
|
||||||
Math_ApproachF(&this->actor.world.pos.y, player->bodyPartsPos[PLAYER_BODYPART_R_HAND].y + targetPosOffset.y, 1.0f,
|
Math_ApproachF(&this->actor.world.pos.y, player->bodyPartsPos[PLAYER_BODYPART_R_HAND].y + targetPosOffset.y,
|
||||||
6.0f);
|
1.0f, 6.0f);
|
||||||
Math_ApproachF(&this->actor.world.pos.z, player->bodyPartsPos[PLAYER_BODYPART_R_HAND].z + targetPosOffset.z, 1.0f,
|
Math_ApproachF(&this->actor.world.pos.z, player->bodyPartsPos[PLAYER_BODYPART_R_HAND].z + targetPosOffset.z,
|
||||||
6.0f);
|
1.0f, 6.0f);
|
||||||
|
|
||||||
sRodLineSpooled = 188.0f;
|
sRodLineSpooled = 188.0f;
|
||||||
|
|
||||||
|
@ -4175,7 +4177,6 @@ void Fishing_UpdateFish(Actor* thisx, PlayState* play2) {
|
||||||
Actor_PlaySfx(&this->actor, NA_SE_EV_FISH_LEAP);
|
Actor_PlaySfx(&this->actor, NA_SE_EV_FISH_LEAP);
|
||||||
Fishing_SplashBySize2(this, play);
|
Fishing_SplashBySize2(this, play);
|
||||||
|
|
||||||
|
|
||||||
if (Rand_ZeroOne() < 0.5f) {
|
if (Rand_ZeroOne() < 0.5f) {
|
||||||
this->rotationTarget.z = 0x4000;
|
this->rotationTarget.z = 0x4000;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue