1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-02 22:14:33 +00:00

libc cleanup (#1568)

* libc cleanup

* Suggested changes, small alloca tweak

* Remove printf include
This commit is contained in:
Tharo 2023-10-27 15:06:44 +01:00 committed by GitHub
parent 4e55168eaa
commit 3475651701
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
46 changed files with 571 additions and 432 deletions

View file

@ -70,7 +70,7 @@ f32 func_809946BC(PlayState* play, DoorGerudo* this, f32 arg2, f32 arg3, f32 arg
func_8002DBD0(&this->dyna.actor, &sp1C, &playerPos);
if ((arg3 < fabsf(sp1C.x)) || (arg4 < fabsf(sp1C.y))) {
return FLT_MAX;
return MAXFLOAT;
} else {
return sp1C.z;
}

View file

@ -511,7 +511,7 @@ f32 DoorShutter_GetPlayerDistance(PlayState* play, DoorShutter* this, f32 offset
func_8002DBD0(&this->dyna.actor, &relPlayerPos, &playerPos);
if (fabsf(relPlayerPos.x) > maxDistSides || fabsf(relPlayerPos.y) > maxDistY) {
return FLT_MAX;
return MAXFLOAT;
} else {
return relPlayerPos.z;
}

View file

@ -11214,7 +11214,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) {
this->targetActorDistance = 0.0f;
} else {
this->targetActor = NULL;
this->targetActorDistance = FLT_MAX;
this->targetActorDistance = MAXFLOAT;
this->exchangeItemId = EXCH_ITEM_NONE;
}
@ -11234,7 +11234,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) {
}
this->stateFlags2 &= ~PLAYER_STATE2_23;
this->closestSecretDistSq = FLT_MAX;
this->closestSecretDistSq = MAXFLOAT;
temp_f0 = this->actor.world.pos.y - this->actor.prevPos.y;