1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-11 03:39:59 +00:00

Run formatter (#1541)

This commit is contained in:
Dragorn421 2023-09-19 21:01:00 +02:00 committed by GitHub
parent 57ce0cf8d9
commit 185c9cbf1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 27 deletions

View file

@ -47,7 +47,7 @@ u64 __fixunssfdi(f32 a) {
u64 i;
} 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 0;
@ -61,7 +61,7 @@ u64 __fixunsdfdi(f64 a) {
u64 i;
} 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 0;
@ -74,7 +74,7 @@ s64 __fixsfdi(f32 c) {
s64 i;
} 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;
}
@ -85,7 +85,7 @@ s64 __fixdfdi(f64 c) {
s64 i;
} 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;
}
@ -98,7 +98,7 @@ f32 __floatdisf(s64 c) {
register f32 v;
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;
}
@ -111,7 +111,7 @@ f64 __floatdidf(s64 c) {
register f64 v;
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;
}
@ -124,7 +124,7 @@ f32 __floatundisf(u64 c) {
register f32 v;
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) {
// cvt.s.l assumes signed input, adjust output
v += 4294967296.0f; // 2^32
@ -141,7 +141,7 @@ f64 __floatundidf(u64 c) {
register f64 v;
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) {
// cvt.d.l assumes signed input, adjust output
v += 18446744073709551616.0; // 2^64

View file

@ -69,8 +69,7 @@ void EnBomBowlMan_Init(Actor* thisx, PlayState* play2) {
for (i = 0; i < 2; i++) {
cucco = (EnSyatekiNiw*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_SYATEKI_NIW, cuccoSpawnPos[i].x,
cuccoSpawnPos[i].y, cuccoSpawnPos[i].z, 0, 0, 0,
SYATEKI_MINIGAME_ALLEY);
cuccoSpawnPos[i].y, cuccoSpawnPos[i].z, 0, 0, 0, SYATEKI_MINIGAME_ALLEY);
if (cucco != NULL) {
cucco->scale = cuccoScales[i];
cucco->collider.dim.radius = (s16)cuccoColliderDims[i][0];

View file

@ -497,9 +497,8 @@ void EnSyatekiNiw_SetupRemove(EnSyatekiNiw* this, PlayState* play) {
Actor_SetFocus(&this->actor, this->focusYOffset);
Actor_GetScreenPos(play, &this->actor, &screenX, &screenY);
if ((this->actor.projectedPos.z > 200.0f) && (this->actor.projectedPos.z < 800.0f)
&& (screenX > 0) && (screenX < SCREEN_WIDTH) && (screenY > 0)
&& (screenY < SCREEN_HEIGHT)) {
if ((this->actor.projectedPos.z > 200.0f) && (this->actor.projectedPos.z < 800.0f) && (screenX > 0) &&
(screenX < SCREEN_WIDTH) && (screenY > 0) && (screenY < SCREEN_HEIGHT)) {
this->actor.speed = 5.0f;
this->rotYFlip = Rand_ZeroFloat(1.99f);
this->removeStateYaw = Rand_CenteredFloat(8000.0f) + -10000.0f;

View file

@ -165,7 +165,7 @@ typedef enum {
static u8 sOwnerHair = FS_OWNER_BALD;
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;
@ -2175,8 +2175,8 @@ void Fishing_UpdateLure(Fishing* this, PlayState* play) {
D_80B7E148 = 520.0f;
sRodLineSpooled = 195.0f;
sRodCastState = sLureEquipped = sLureTimer = D_80B7E0B0 = D_80B7E0B2 = sRodCastTimer = sWiggleAttraction = D_80B7E114 =
D_80B7E150 = 0;
sRodCastState = sLureEquipped = sLureTimer = D_80B7E0B0 = D_80B7E0B2 = sRodCastTimer = sWiggleAttraction =
D_80B7E114 = D_80B7E150 = 0;
sLure1Rotate = sReelLinePosStep = sLurePosZOffset = 0.0f;
sLureLineSegPosDelta = zeroVec;
@ -2493,7 +2493,7 @@ void Fishing_UpdateLure(Fishing* this, PlayState* play) {
sLureRot.x = 0.0f;
// lure hopping on land
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);
}
} else {
@ -2770,7 +2770,8 @@ void func_80B70ED4(Fishing* this, Input* input) {
this->rotationStep = 28672.0f;
this->speedTarget = 5.0f;
} 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->unk_15E = 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);
}
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);
this->unk_190 = 0.3f;
@ -3907,12 +3909,12 @@ void Fishing_UpdateFish(Actor* thisx, PlayState* play2) {
multiVecSrc.y = -10.0f;
multiVecSrc.z = 5.0f;
Matrix_MultVec3f(&multiVecSrc, &targetPosOffset);
Math_ApproachF(&this->actor.world.pos.x, player->bodyPartsPos[PLAYER_BODYPART_R_HAND].x + targetPosOffset.x, 1.0f,
6.0f);
Math_ApproachF(&this->actor.world.pos.y, player->bodyPartsPos[PLAYER_BODYPART_R_HAND].y + targetPosOffset.y, 1.0f,
6.0f);
Math_ApproachF(&this->actor.world.pos.z, player->bodyPartsPos[PLAYER_BODYPART_R_HAND].z + targetPosOffset.z, 1.0f,
6.0f);
Math_ApproachF(&this->actor.world.pos.x, player->bodyPartsPos[PLAYER_BODYPART_R_HAND].x + targetPosOffset.x,
1.0f, 6.0f);
Math_ApproachF(&this->actor.world.pos.y, player->bodyPartsPos[PLAYER_BODYPART_R_HAND].y + targetPosOffset.y,
1.0f, 6.0f);
Math_ApproachF(&this->actor.world.pos.z, player->bodyPartsPos[PLAYER_BODYPART_R_HAND].z + targetPosOffset.z,
1.0f, 6.0f);
sRodLineSpooled = 188.0f;
@ -4175,7 +4177,6 @@ void Fishing_UpdateFish(Actor* thisx, PlayState* play2) {
Actor_PlaySfx(&this->actor, NA_SE_EV_FISH_LEAP);
Fishing_SplashBySize2(this, play);
if (Rand_ZeroOne() < 0.5f) {
this->rotationTarget.z = 0x4000;
} else {