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

Use long over int for s32/u32 types (#1546)

* long s32

* Suggested changes
This commit is contained in:
Tharo 2023-10-17 20:16:31 +01:00 committed by GitHub
parent b3486b57ef
commit a20163c6ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 66 additions and 62 deletions

View file

@ -123,7 +123,7 @@ void BgMoriElevator_Destroy(Actor* thisx, PlayState* play) {
}
}
s32 BgMoriElevator_IsPlayerRiding(BgMoriElevator* this, PlayState* play) {
int BgMoriElevator_IsPlayerRiding(BgMoriElevator* this, PlayState* play) {
return ((this->dyna.interactFlags & DYNA_INTERACT_PLAYER_ON_TOP) &&
!(this->unk_170 & DYNA_INTERACT_PLAYER_ON_TOP) &&
((GET_PLAYER(play)->actor.world.pos.y - this->dyna.actor.world.pos.y) < 80.0f));

View file

@ -85,13 +85,13 @@ void BgMoriRakkatenjo_Destroy(Actor* thisx, PlayState* play) {
DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId);
}
s32 BgMoriRakkatenjo_IsLinkUnder(BgMoriRakkatenjo* this, PlayState* play) {
int BgMoriRakkatenjo_IsLinkUnder(BgMoriRakkatenjo* this, PlayState* play) {
Vec3f* pos = &GET_PLAYER(play)->actor.world.pos;
return (-3300.0f < pos->z) && (pos->z < -1840.0f) && (1791.0f < pos->x) && (pos->x < 2191.0f);
}
s32 BgMoriRakkatenjo_IsLinkClose(BgMoriRakkatenjo* this, PlayState* play) {
int BgMoriRakkatenjo_IsLinkClose(BgMoriRakkatenjo* this, PlayState* play) {
Vec3f* pos = &GET_PLAYER(play)->actor.world.pos;
return (-3360.0f < pos->z) && (pos->z < -1840.0f) && (1791.0f < pos->x) && (pos->x < 2191.0f);

View file

@ -371,7 +371,7 @@ s32 EnFr_IsBelowLogSpot(EnFr* this, f32* yDistToLogSpot) {
}
}
s32 EnFr_IsAboveAndWithin30DistXZ(Player* player, EnFr* this) {
int EnFr_IsAboveAndWithin30DistXZ(Player* player, EnFr* this) {
f32 xDistToPlayer = player->actor.world.pos.x - this->actor.world.pos.x;
f32 zDistToPlayer = player->actor.world.pos.z - this->actor.world.pos.z;
f32 yDistToPlayer = player->actor.world.pos.y - this->actor.world.pos.y;

View file

@ -108,7 +108,7 @@ void EnHoll_SetupAction(EnHoll* this, EnHollActionFunc func) {
this->actionFunc = func;
}
s32 EnHoll_IsKokiriLayer8(void) {
int EnHoll_IsKokiriLayer8(void) {
return gSaveContext.save.entranceIndex == ENTR_KOKIRI_FOREST_0 && gSaveContext.sceneLayer == 8;
}

View file

@ -633,7 +633,7 @@ void func_80A5BB90(PlayState* play, Vec3f* vec, Vec3f* arg2, f32* arg3) {
SkinMatrix_Vec3fMtxFMultXYZW(&play->viewProjectionMtxF, vec, arg2, arg3);
}
s32 func_80A5BBBC(PlayState* play, EnHorse* this, Vec3f* pos) {
int func_80A5BBBC(PlayState* play, EnHorse* this, Vec3f* pos) {
Vec3f sp24;
f32 sp20;
f32 eyeDist;

View file

@ -333,7 +333,7 @@ Actor* func_80AEB124(PlayState* play) {
return NULL;
}
s32 func_80AEB174(PlayState* play) {
int func_80AEB174(PlayState* play) {
return (Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play);
}

View file

@ -464,7 +464,7 @@ void EnSkj_Destroy(Actor* thisx, PlayState* play) {
Collider_DestroyCylinder(play, &this->collider);
}
s32 EnSkj_RangeCheck(Player* player, EnSkj* this) {
int EnSkj_RangeCheck(Player* player, EnSkj* this) {
f32 xDiff = player->actor.world.pos.x - this->actor.world.pos.x;
f32 zDiff = player->actor.world.pos.z - this->actor.world.pos.z;
f32 yDiff = player->actor.world.pos.y - this->actor.world.pos.y;

View file

@ -369,7 +369,7 @@ void func_80B4F230(EnZl2* this, s16 arg1, s32 arg2) {
s32 temp_t3;
s32 phi_v0;
s32 index1AC;
s32 phi_t5;
int phi_t5;
if (this->unk_24C != 0) {
temp_v1 = this->unk_1DC[arg2] - arg1;

View file

@ -523,7 +523,7 @@ void func_80B54360(EnZl3* this, s16 arg1, s32 arg2) {
s32 temp_t3 = this->unk_25C[arg2];
s32 phi_v0 = temp_t3;
s32 index25C;
s32 phi_t5;
int phi_t5;
temp_t3 = arg1 - this->unk_2BC[arg2];

View file

@ -253,7 +253,7 @@ void func_808528C8(PlayState* play, Player* this, CsCmdActorCue* cue);
void func_80852944(PlayState* play, Player* this, CsCmdActorCue* cue);
void func_808529D0(PlayState* play, Player* this, CsCmdActorCue* cue);
void func_80852C50(PlayState* play, Player* this, CsCmdActorCue* cue);
s32 Player_IsDroppingFish(PlayState* play);
int Player_IsDroppingFish(PlayState* play);
s32 Player_StartFishing(PlayState* play);
s32 func_80852F38(PlayState* play, Player* this);
s32 func_80852FFC(PlayState* play, Actor* actor, s32 csAction);
@ -2041,7 +2041,7 @@ void func_8083328C(PlayState* play, Player* this, LinkAnimationHeader* linkAnim)
LinkAnimation_PlayOnceSetSpeed(play, &this->skelAnime, linkAnim, D_808535E8);
}
s32 func_808332B8(Player* this) {
int func_808332B8(Player* this) {
return (this->stateFlags1 & PLAYER_STATE1_27) && (this->currentBoots != PLAYER_BOOTS_IRON);
}
@ -2092,7 +2092,7 @@ LinkAnimationHeader* func_80833438(Player* this) {
}
}
s32 func_808334B4(Player* this) {
int func_808334B4(Player* this) {
return func_808332E4(this) && (this->unk_834 != 0);
}
@ -2318,11 +2318,11 @@ s32 func_80833B54(Player* this) {
return 0;
}
s32 func_80833BCC(Player* this) {
int func_80833BCC(Player* this) {
return func_8008E9C4(this) || func_80833B2C(this);
}
s32 func_80833C04(Player* this) {
int func_80833C04(Player* this) {
return func_80833B54(this) || func_80833B2C(this);
}
@ -2757,11 +2757,11 @@ s32 func_80834D2C(Player* this, PlayState* play) {
return 1;
}
s32 func_80834E44(PlayState* play) {
int func_80834E44(PlayState* play) {
return (play->shootingGalleryStatus > 0) && CHECK_BTN_ALL(sControlInput->press.button, BTN_B);
}
s32 func_80834E7C(PlayState* play) {
int func_80834E7C(PlayState* play) {
return (play->shootingGalleryStatus != 0) &&
((play->shootingGalleryStatus < 0) ||
CHECK_BTN_ANY(sControlInput->cur.button, BTN_A | BTN_B | BTN_CUP | BTN_CLEFT | BTN_CRIGHT | BTN_CDOWN));
@ -3341,7 +3341,7 @@ void func_80836448(PlayState* play, Player* this, LinkAnimationHeader* anim) {
}
}
s32 Player_CanUpdateItems(Player* this) {
int Player_CanUpdateItems(Player* this) {
return (!(Player_Action_808458D0 == this->actionFunc) ||
((this->stateFlags1 & PLAYER_STATE1_START_CHANGING_HELD_ITEM) &&
((this->heldItemId == ITEM_LAST_USED) || (this->heldItemId == ITEM_NONE)))) &&
@ -4253,7 +4253,7 @@ s32 func_80838144(s32 arg0) {
}
}
s32 func_8083816C(s32 arg0) {
int func_8083816C(s32 arg0) {
return (arg0 == FLOOR_TYPE_4) || (arg0 == FLOOR_TYPE_7) || (arg0 == FLOOR_TYPE_12);
}
@ -5080,7 +5080,7 @@ void func_8083A098(Player* this, LinkAnimationHeader* anim, PlayState* play) {
func_8083328C(play, this, anim);
}
s32 func_8083A0D4(Player* this) {
int func_8083A0D4(Player* this) {
return (this->interactRangeActor != NULL) && (this->heldActor == NULL);
}
@ -8273,7 +8273,7 @@ s32 func_808428D8(Player* this, PlayState* play) {
return 0;
}
s32 func_80842964(Player* this, PlayState* play) {
int func_80842964(Player* this, PlayState* play) {
return Player_ActionChange_13(this, play) || Player_ActionChange_4(this, play) || Player_ActionChange_2(this, play);
}
@ -12284,7 +12284,7 @@ static Vec3f D_8085492C[] = {
{ -60.0f, -20.0f, 0.0f },
};
s32 func_8084C89C(PlayState* play, Player* this, s32 arg2, f32* arg3) {
int func_8084C89C(PlayState* play, Player* this, s32 arg2, f32* arg3) {
EnHorse* rideActor = (EnHorse*)this->rideActor;
f32 sp50;
f32 sp4C;
@ -15159,7 +15159,7 @@ void Player_Action_80852E14(Player* this, PlayState* play) {
func_80852B4C(play, this, NULL, &D_80854E50[this->csAction]);
}
s32 Player_IsDroppingFish(PlayState* play) {
int Player_IsDroppingFish(PlayState* play) {
Player* this = GET_PLAYER(play);
return (Player_Action_8084EFC0 == this->actionFunc) && (this->itemAction == PLAYER_IA_BOTTLE_FISH);