diff --git a/include/functions.h b/include/functions.h index b00e402a11..22061c8ea4 100644 --- a/include/functions.h +++ b/include/functions.h @@ -483,8 +483,8 @@ void BodyBreak_Alloc(BodyBreak* bodyBreak, s32 count, GlobalContext* globalCtx); void BodyBreak_SetInfo(BodyBreak* bodyBreak, s32 limbIndex, s32 minLimbIndex, s32 maxLimbIndex, u32 count, Gfx** dList, s16 objectId); s32 BodyBreak_SpawnParts(Actor* actor, BodyBreak* bodyBreak, GlobalContext* globalCtx, s16 type); -void Actor_SpawnFloorDustRing(GlobalContext* globalCtx, Actor* actor, Vec3f* posXZ, f32 radius, s32 amountMinusOne, f32 randAccelWeight, - s16 scale, s16 scaleStep, u8 useLighting); +void Actor_SpawnFloorDustRing(GlobalContext* globalCtx, Actor* actor, Vec3f* posXZ, f32 radius, s32 amountMinusOne, + f32 randAccelWeight, s16 scale, s16 scaleStep, u8 useLighting); void func_80033480(GlobalContext* globalCtx, Vec3f* arg1, f32 arg2, s32 arg3, s16 arg4, s16 arg5, u8 arg6); Actor* Actor_GetCollidedExplosive(GlobalContext* globalCtx, Collider* collider); Actor* func_80033684(GlobalContext* globalCtx, Actor* explosiveActor); @@ -681,7 +681,7 @@ void BgCheck_DrawDynaCollision(GlobalContext*, CollisionContext*); void BgCheck_DrawStaticCollision(GlobalContext*, CollisionContext*); void func_80043334(CollisionContext* colCtx, Actor* actor, s32 bgId); s32 func_800433A4(CollisionContext* colCtx, s32 bgId, Actor* actor); -void DynaPolyActor_Init(DynaPolyActor* dynaActor, DynaPolyMoveFlag flags); +void DynaPolyActor_Init(DynaPolyActor* dynaActor, s32 flags); void func_800434A0(DynaPolyActor* dynaActor); void func_800434A8(DynaPolyActor* dynaActor); void func_800434C8(CollisionContext* colCtx, s32 floorBgId); diff --git a/include/z64camera.h b/include/z64camera.h index 5589a67efe..5c529e300f 100644 --- a/include/z64camera.h +++ b/include/z64camera.h @@ -1,8 +1,8 @@ #ifndef _Z64CAMERA_H_ #define _Z64CAMERA_H_ -#include -#include +#include "ultra64.h" +#include "z64cutscene.h" #define CAM_STAT_CUT 0 #define CAM_STAT_WAIT 1 diff --git a/src/code/code_80043480.c b/src/code/code_80043480.c index b264837dd8..eda615d35a 100644 --- a/src/code/code_80043480.c +++ b/src/code/code_80043480.c @@ -1,6 +1,6 @@ #include "global.h" -void DynaPolyActor_Init(DynaPolyActor* dynaActor, DynaPolyMoveFlag flags) { +void DynaPolyActor_Init(DynaPolyActor* dynaActor, s32 flags) { dynaActor->bgId = -1; dynaActor->unk_15C = flags; dynaActor->unk_160 = 0; diff --git a/src/code/z_camera_data.c b/src/code/z_camera_data.c index ed92807e51..a887d5d937 100644 --- a/src/code/z_camera_data.c +++ b/src/code/z_camera_data.c @@ -1,5 +1,5 @@ -#include -#include +#include "ultra64.h" +#include "global.h" typedef struct { s16 val; diff --git a/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c b/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c index 0dec26fef9..831c7d8674 100644 --- a/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c +++ b/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c @@ -91,8 +91,7 @@ static InitChainEntry sInitChain[] = { static Vec3f D_8086E0E0 = { 0.0f, 140.0f, 0.0f }; -void BgBdanSwitch_InitDynaPoly(BgBdanSwitch* this, GlobalContext* globalCtx, CollisionHeader* collision, - DynaPolyMoveFlag flag) { +void BgBdanSwitch_InitDynaPoly(BgBdanSwitch* this, GlobalContext* globalCtx, CollisionHeader* collision, s32 flag) { s16 pad1; CollisionHeader* colHeader = NULL; s16 pad2; diff --git a/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c b/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c index a910914817..6259fb0711 100644 --- a/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c +++ b/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c @@ -237,7 +237,7 @@ void BgDyYoseizo_ChooseType(BgDyYoseizo* this, GlobalContext* globalCtx) { case FAIRY_UPGRADE_MAGIC: if (!gSaveContext.magicAcquired || BREG(2)) { // Spin Attack speed UP - osSyncPrintf(VT_FGCOL(GREEN) " ☆☆☆☆☆ 回転切り速度UP ☆☆☆☆☆ \n" VT_RST, &gSaveContext); + osSyncPrintf(VT_FGCOL(GREEN) " ☆☆☆☆☆ 回転切り速度UP ☆☆☆☆☆ \n" VT_RST); this->givingSpell = true; givingReward = true; } @@ -245,7 +245,7 @@ void BgDyYoseizo_ChooseType(BgDyYoseizo* this, GlobalContext* globalCtx) { case FAIRY_UPGRADE_DOUBLE_MAGIC: if (!gSaveContext.doubleMagic) { // Magic Meter doubled - osSyncPrintf(VT_FGCOL(YELLOW) " ☆☆☆☆☆ 魔法ゲージメーター倍増 ☆☆☆☆☆ \n" VT_RST, &gSaveContext); + osSyncPrintf(VT_FGCOL(YELLOW) " ☆☆☆☆☆ 魔法ゲージメーター倍増 ☆☆☆☆☆ \n" VT_RST); this->givingSpell = true; givingReward = true; } @@ -253,7 +253,7 @@ void BgDyYoseizo_ChooseType(BgDyYoseizo* this, GlobalContext* globalCtx) { case FAIRY_UPGRADE_HALF_DAMAGE: if (!gSaveContext.doubleDefense) { // Damage halved - osSyncPrintf(VT_FGCOL(PURPLE) " ☆☆☆☆☆ ダメージ半減 ☆☆☆☆☆ \n" VT_RST, &gSaveContext); + osSyncPrintf(VT_FGCOL(PURPLE) " ☆☆☆☆☆ ダメージ半減 ☆☆☆☆☆ \n" VT_RST); this->givingSpell = true; givingReward = true; } diff --git a/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c b/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c index cbf79b8256..4cfa724e6a 100644 --- a/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c +++ b/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c @@ -68,8 +68,7 @@ static InitChainEntry sInitChain[] = { ICHAIN_F32(uncullZoneDownward, 1200, ICHAIN_STOP), }; -void BgJya1flift_InitDynapoly(BgJya1flift* this, GlobalContext* globalCtx, CollisionHeader* collision, - DynaPolyMoveFlag moveFlag) { +void BgJya1flift_InitDynapoly(BgJya1flift* this, GlobalContext* globalCtx, CollisionHeader* collision, s32 moveFlag) { s32 pad; CollisionHeader* colHeader = NULL; s32 pad2; diff --git a/src/overlays/actors/ovl_Bg_Jya_Amishutter/z_bg_jya_amishutter.c b/src/overlays/actors/ovl_Bg_Jya_Amishutter/z_bg_jya_amishutter.c index b3b34cefb3..abd926fb23 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Amishutter/z_bg_jya_amishutter.c +++ b/src/overlays/actors/ovl_Bg_Jya_Amishutter/z_bg_jya_amishutter.c @@ -45,7 +45,7 @@ static InitChainEntry sInitChain[] = { }; void BgJyaAmishutter_InitDynaPoly(BgJyaAmishutter* this, GlobalContext* globalCtx, CollisionHeader* collision, - DynaPolyMoveFlag flag) { + s32 flag) { s32 pad1; CollisionHeader* colHeader = NULL; s32 pad2; diff --git a/src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.c b/src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.c index 10e4606dc3..2a72829431 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.c +++ b/src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.c @@ -64,8 +64,7 @@ static InitChainEntry sInitChain[] = { ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP), }; -void BgJyaBombiwa_SetupDynaPoly(BgJyaBombiwa* this, GlobalContext* globalCtx, CollisionHeader* collision, - DynaPolyMoveFlag flag) { +void BgJyaBombiwa_SetupDynaPoly(BgJyaBombiwa* this, GlobalContext* globalCtx, CollisionHeader* collision, s32 flag) { s16 pad1; CollisionHeader* colHeader = NULL; s16 pad2; diff --git a/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c b/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c index 97860883a5..ef8fe4723d 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c +++ b/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c @@ -132,8 +132,7 @@ void func_808958F0(Vec3f* dest, Vec3f* src, f32 arg2, f32 arg3) { dest->z = (src->z * arg3) - (src->x * arg2); } -void BgJyaCobra_InitDynapoly(BgJyaCobra* this, GlobalContext* globalCtx, CollisionHeader* collision, - DynaPolyMoveFlag flags) { +void BgJyaCobra_InitDynapoly(BgJyaCobra* this, GlobalContext* globalCtx, CollisionHeader* collision, s32 flags) { s32 pad; CollisionHeader* colHeader = NULL; s32 pad2; diff --git a/src/overlays/actors/ovl_Bg_Jya_Kanaami/z_bg_jya_kanaami.c b/src/overlays/actors/ovl_Bg_Jya_Kanaami/z_bg_jya_kanaami.c index fe2e88c040..00ee4ce590 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Kanaami/z_bg_jya_kanaami.c +++ b/src/overlays/actors/ovl_Bg_Jya_Kanaami/z_bg_jya_kanaami.c @@ -41,8 +41,7 @@ static InitChainEntry sInitChain[] = { ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP), }; -void BgJyaKanaami_InitDynaPoly(BgJyaKanaami* this, GlobalContext* globalCtx, CollisionHeader* collision, - DynaPolyMoveFlag flag) { +void BgJyaKanaami_InitDynaPoly(BgJyaKanaami* this, GlobalContext* globalCtx, CollisionHeader* collision, s32 flag) { s32 pad; CollisionHeader* colHeader = NULL; s32 pad2; diff --git a/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c b/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c index 37f0c16b3e..3fab698122 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c +++ b/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c @@ -16,8 +16,6 @@ void BgJyaLift_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgJyaLift_Update(Actor* thisx, GlobalContext* globalCtx); void BgJyaLift_Draw(Actor* thisx, GlobalContext* globalCtx); -void BgJyaLift_InitDynapoly(BgJyaLift* this, GlobalContext* globalCtx, CollisionHeader* collisionHeader, - DynaPolyMoveFlag moveFlag); void BgJyaLift_SetFinalPosY(BgJyaLift* this); void BgJyaLift_SetInitPosY(BgJyaLift* this); void BgJyaLift_DelayMove(BgJyaLift* this, GlobalContext* globalCtx); @@ -45,8 +43,7 @@ static InitChainEntry sInitChain[] = { ICHAIN_F32(uncullZoneDownward, 2500, ICHAIN_STOP), }; -void BgJyaLift_InitDynapoly(BgJyaLift* this, GlobalContext* globalCtx, CollisionHeader* collisionHeader, - DynaPolyMoveFlag moveFlag) { +void BgJyaLift_InitDynapoly(BgJyaLift* this, GlobalContext* globalCtx, CollisionHeader* collisionHeader, s32 moveFlag) { s32 pad; CollisionHeader* colHeader = NULL; diff --git a/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c b/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c index 3fbcd1b9d2..6903405e21 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c +++ b/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c @@ -106,8 +106,7 @@ static InitChainEntry sInitChain[] = { ICHAIN_F32(uncullZoneDownward, 1200, ICHAIN_STOP), }; -void BgJyaMegami_InitDynaPoly(BgJyaMegami* this, GlobalContext* globalCtx, CollisionHeader* collision, - DynaPolyMoveFlag flag) { +void BgJyaMegami_InitDynaPoly(BgJyaMegami* this, GlobalContext* globalCtx, CollisionHeader* collision, s32 flag) { s32 pad; CollisionHeader* colHeader = NULL; diff --git a/src/overlays/actors/ovl_Bg_Jya_Zurerukabe/z_bg_jya_zurerukabe.c b/src/overlays/actors/ovl_Bg_Jya_Zurerukabe/z_bg_jya_zurerukabe.c index 42954fffd4..a26d89b3b2 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Zurerukabe/z_bg_jya_zurerukabe.c +++ b/src/overlays/actors/ovl_Bg_Jya_Zurerukabe/z_bg_jya_zurerukabe.c @@ -62,7 +62,7 @@ static InitChainEntry sInitChain[] = { }; void BgJyaZurerukabe_InitDynaPoly(BgJyaZurerukabe* this, GlobalContext* globalCtx, CollisionHeader* collision, - DynaPolyMoveFlag flag) { + s32 flag) { s32 pad; CollisionHeader* colHeader = NULL; s32 pad2; diff --git a/src/overlays/actors/ovl_Bg_Spot08_Iceblock/z_bg_spot08_iceblock.c b/src/overlays/actors/ovl_Bg_Spot08_Iceblock/z_bg_spot08_iceblock.c index a3fd84383e..3821559375 100644 --- a/src/overlays/actors/ovl_Bg_Spot08_Iceblock/z_bg_spot08_iceblock.c +++ b/src/overlays/actors/ovl_Bg_Spot08_Iceblock/z_bg_spot08_iceblock.c @@ -41,7 +41,7 @@ void BgSpot08Iceblock_SetupAction(BgSpot08Iceblock* this, BgSpot08IceblockAction } void BgSpot08Iceblock_InitDynaPoly(BgSpot08Iceblock* this, GlobalContext* globalCtx, CollisionHeader* collision, - DynaPolyMoveFlag flags) { + s32 flags) { s32 pad; CollisionHeader* colHeader = NULL; s32 pad2; diff --git a/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.c b/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.c index 4b7f4ee803..fb73a1f077 100644 --- a/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.c +++ b/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.c @@ -44,8 +44,7 @@ static InitChainEntry sInitChain[] = { ICHAIN_F32(uncullZoneDownward, 1200, ICHAIN_STOP), }; -void BgSpot12Gate_InitDynaPoly(BgSpot12Gate* this, GlobalContext* globalCtx, CollisionHeader* collision, - DynaPolyMoveFlag flags) { +void BgSpot12Gate_InitDynaPoly(BgSpot12Gate* this, GlobalContext* globalCtx, CollisionHeader* collision, s32 flags) { s32 pad; CollisionHeader* colHeader = NULL; s32 pad2; diff --git a/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.c b/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.c index af627ab727..321f43c6e9 100644 --- a/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.c +++ b/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.c @@ -42,7 +42,7 @@ static InitChainEntry sInitChain[] = { ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP), }; -void func_808B3420(BgSpot12Saku* this, GlobalContext* globalCtx, CollisionHeader* collision, DynaPolyMoveFlag flags) { +void func_808B3420(BgSpot12Saku* this, GlobalContext* globalCtx, CollisionHeader* collision, s32 flags) { s32 pad; CollisionHeader* colHeader = NULL; s32 pad2; diff --git a/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c b/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c index 6a65ff93f9..5715cfe624 100644 --- a/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c +++ b/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c @@ -56,7 +56,7 @@ static Vec3f D_808B45DC[] = { { 29.99f, 0.01f, 29.99f }, { 0.0f, 0.01f, 0.0f }, }; -void func_808B3960(BgSpot15Rrbox* this, GlobalContext* globalCtx, CollisionHeader* collision, DynaPolyMoveFlag flags) { +void func_808B3960(BgSpot15Rrbox* this, GlobalContext* globalCtx, CollisionHeader* collision, s32 flags) { s32 pad; CollisionHeader* colHeader = NULL; u32 pad2; diff --git a/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.c b/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.c index 3c7b064d5d..64523eeccb 100644 --- a/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.c +++ b/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.c @@ -118,8 +118,9 @@ void func_808B9698(BgSpot18Shutter* this, GlobalContext* globalCtx) { void func_808B971C(BgSpot18Shutter* this, GlobalContext* globalCtx) { f32 sin = Math_SinS(this->dyna.actor.world.rot.y); f32 cos = Math_CosS(this->dyna.actor.world.rot.y); - s32 flag = - Math_StepToF(&this->dyna.actor.world.pos.x, this->dyna.actor.home.pos.x + (125.0f * cos), fabsf(cos)) & 1; + s32 flag = true; + + flag &= Math_StepToF(&this->dyna.actor.world.pos.x, this->dyna.actor.home.pos.x + (125.0f * cos), fabsf(cos)); flag &= Math_StepToF(&this->dyna.actor.world.pos.z, this->dyna.actor.home.pos.z - (125.0f * sin), fabsf(sin)); if (flag) { diff --git a/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c b/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c index 63c8efa2e8..af09ff6b80 100644 --- a/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c +++ b/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c @@ -663,8 +663,8 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) { } if (this->unk_398 == 80) { BossGanon2_SetObjectSegment(this, globalCtx, OBJECT_GANON2, false); - TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx, SEGMENTED_TO_VIRTUAL(object_ganon2_Tex_021A90), 160, - 180, 128, 40); + TitleCard_InitBossName(globalCtx, &globalCtx->actorCtx.titleCtx, + SEGMENTED_TO_VIRTUAL(object_ganon2_Tex_021A90), 160, 180, 128, 40); } this->unk_3A4.x = ((this->actor.world.pos.x + 500.0f) - 350.0f) + 100.0f; this->unk_3A4.y = this->actor.world.pos.y; diff --git a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c index 090235c810..e8f360a048 100644 --- a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c +++ b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c @@ -503,7 +503,8 @@ void BossMo_Tentacle(BossMo* this, GlobalContext* globalCtx) { swingRateAccel = 30.0f; swingSizeAccel = 60.0f; if ((this->sfxTimer % 32) == 0) { - Audio_PlaySoundIncreasinglyTransposed(&this->tentTipPos, NA_SE_EN_MOFER_WAVE, gMorphaTransposeTable); + Audio_PlaySoundIncreasinglyTransposed(&this->tentTipPos, NA_SE_EN_MOFER_WAVE, + gMorphaTransposeTable); func_800AA000(0, 100, 5, 2); func_8002F7DC(&player->actor, NA_SE_VO_LI_FREEZE + player->ageProperties->unk_92); } @@ -517,7 +518,8 @@ void BossMo_Tentacle(BossMo* this, GlobalContext* globalCtx) { swingRateAccel = 70.0f; swingSizeAccel = 70.0f; if ((this->sfxTimer % 16) == 0) { - Audio_PlaySoundIncreasinglyTransposed(&this->tentTipPos, NA_SE_EN_MOFER_WAVE, gMorphaTransposeTable); + Audio_PlaySoundIncreasinglyTransposed(&this->tentTipPos, NA_SE_EN_MOFER_WAVE, + gMorphaTransposeTable); func_800AA000(0, 160, 5, 4); func_8002F7DC(&player->actor, NA_SE_VO_LI_FREEZE + player->ageProperties->unk_92); } diff --git a/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c b/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c index 5704f5cdb3..fe2aa187eb 100644 --- a/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c +++ b/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c @@ -581,7 +581,7 @@ void func_80997528(DoorShutter* this, GlobalContext* globalCtx) { } void func_80997568(DoorShutter* this, GlobalContext* globalCtx) { - if ((this->unk_16F++ < 0x1F) ^ 1) { + if (this->unk_16F++ > 30) { func_8002DF54(globalCtx, NULL, 7); DoorShutter_SetupDoor(this, globalCtx); } diff --git a/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c b/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c index 66fa92fa10..41de49adb6 100644 --- a/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c +++ b/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c @@ -686,7 +686,9 @@ void EnDekubaba_Lunge(EnDekubaba* this, GlobalContext* globalCtx) { Math_ScaledStepToS(&this->actor.shape.rot.x, 0, 0x222); curFrame10 = this->skelAnime.curFrame * 10.0f; - allStepsDone = Math_ScaledStepToS(&this->stemSectionAngle[0], -0xE38, curFrame10 + 0x38E) & 1; + + allStepsDone = true; + allStepsDone &= Math_ScaledStepToS(&this->stemSectionAngle[0], -0xE38, curFrame10 + 0x38E); allStepsDone &= Math_ScaledStepToS(&this->stemSectionAngle[1], -0xE38, curFrame10 + 0x71C); allStepsDone &= Math_ScaledStepToS(&this->stemSectionAngle[2], -0xE38, curFrame10 + 0xE38); @@ -862,7 +864,8 @@ void EnDekubaba_Hit(EnDekubaba* this, GlobalContext* globalCtx) { SkelAnime_Update(&this->skelAnime); - allStepsDone = Math_ScaledStepToS(&this->actor.shape.rot.x, -0x4000, 0xE38) & 1; + allStepsDone = true; + allStepsDone &= Math_ScaledStepToS(&this->actor.shape.rot.x, -0x4000, 0xE38); allStepsDone &= Math_ScaledStepToS(&this->stemSectionAngle[0], -0x4000, 0xE38); allStepsDone &= Math_ScaledStepToS(&this->stemSectionAngle[1], -0x4000, 0xE38); allStepsDone &= Math_ScaledStepToS(&this->stemSectionAngle[2], -0x4000, 0xE38); diff --git a/src/overlays/actors/ovl_En_Ganon_Mant/ovl_en_ganon_mant_gfx.c b/src/overlays/actors/ovl_En_Ganon_Mant/ovl_en_ganon_mant_gfx.c index 6d06427615..a78f5ccc05 100644 --- a/src/overlays/actors/ovl_En_Ganon_Mant/ovl_en_ganon_mant_gfx.c +++ b/src/overlays/actors/ovl_En_Ganon_Mant/ovl_en_ganon_mant_gfx.c @@ -395,8 +395,8 @@ Gfx sMantTexDL[] = { gsDPPipeSync(), gsDPSetTextureLUT(G_TT_NONE), gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON), - gsDPLoadTextureBlock(sMantTex, G_IM_FMT_RGBA, G_IM_SIZ_16b, MANT_TEX_WIDTH, MANT_TEX_HEIGHT, 0, G_TX_MIRROR | G_TX_WRAP, - G_TX_NOMIRROR | G_TX_CLAMP, 5, 6, G_TX_NOLOD, G_TX_NOLOD), + gsDPLoadTextureBlock(sMantTex, G_IM_FMT_RGBA, G_IM_SIZ_16b, MANT_TEX_WIDTH, MANT_TEX_HEIGHT, 0, + G_TX_MIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_CLAMP, 5, 6, G_TX_NOLOD, G_TX_NOLOD), gsSPEndDisplayList(), }; diff --git a/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c b/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c index c440f72737..a9cac60a70 100644 --- a/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c +++ b/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c @@ -304,7 +304,8 @@ s32 EnGoroiwa_MoveAndFall(EnGoroiwa* this, GlobalContext* globalCtx) { func_8002D868(&this->actor); path = &globalCtx->setupPathList[this->actor.params & 0xFF]; nextPointPos = (Vec3s*)SEGMENTED_TO_VIRTUAL(path->points) + this->nextWaypoint; - result = Math_StepToF(&this->actor.world.pos.x, nextPointPos->x, fabsf(this->actor.velocity.x)) & 1; + result = true; + result &= Math_StepToF(&this->actor.world.pos.x, nextPointPos->x, fabsf(this->actor.velocity.x)); result &= Math_StepToF(&this->actor.world.pos.z, nextPointPos->z, fabsf(this->actor.velocity.z)); this->actor.world.pos.y += this->actor.velocity.y; return result; @@ -334,7 +335,8 @@ s32 EnGoroiwa_Move(EnGoroiwa* this, GlobalContext* globalCtx) { this->actor.velocity.x *= this->actor.speedXZ; this->actor.velocity.y *= this->actor.speedXZ; this->actor.velocity.z *= this->actor.speedXZ; - nextPointReached = Math_StepToF(&this->actor.world.pos.x, nextPointPosF.x, fabsf(this->actor.velocity.x)) & 1; + nextPointReached = true; + nextPointReached &= Math_StepToF(&this->actor.world.pos.x, nextPointPosF.x, fabsf(this->actor.velocity.x)); nextPointReached &= Math_StepToF(&this->actor.world.pos.y, nextPointPosF.y, fabsf(this->actor.velocity.y)); nextPointReached &= Math_StepToF(&this->actor.world.pos.z, nextPointPosF.z, fabsf(this->actor.velocity.z)); return nextPointReached; diff --git a/src/overlays/actors/ovl_En_Guest/z_en_guest.c b/src/overlays/actors/ovl_En_Guest/z_en_guest.c index 866bb2f650..1abba207fb 100644 --- a/src/overlays/actors/ovl_En_Guest/z_en_guest.c +++ b/src/overlays/actors/ovl_En_Guest/z_en_guest.c @@ -84,7 +84,8 @@ void EnGuest_Update(Actor* thisx, GlobalContext* globalCtx) { this->actor.flags &= ~0x10; Actor_ProcessInitChain(&this->actor, sInitChain); - SkelAnime_InitFlex(globalCtx, &this->skelAnime, &object_boj_Skel_0000F0, NULL, this->jointTable, this->morphTable, 16); + SkelAnime_InitFlex(globalCtx, &this->skelAnime, &object_boj_Skel_0000F0, NULL, this->jointTable, + this->morphTable, 16); gSegments[6] = VIRTUAL_TO_PHYSICAL(globalCtx->objectCtx.status[this->osAnimeBankIndex].segment); Animation_Change(&this->skelAnime, &gObjOsAnim_42AC, 1.0f, 0.0f, Animation_GetLastFrame(&gObjOsAnim_42AC), ANIMMODE_LOOP, 0.0f); diff --git a/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c b/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c index 90b0a6d429..6913e31bbc 100644 --- a/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c +++ b/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c @@ -364,7 +364,8 @@ void EnHonotrap_FlameMove(EnHonotrap* this, GlobalContext* globalCtx) { speed.x = fabsf(this->speedMod * this->actor.velocity.x); speed.y = fabsf(this->speedMod * this->actor.velocity.y); speed.z = fabsf(this->speedMod * this->actor.velocity.z); - ready = Math_StepToF(&this->actor.world.pos.x, this->targetPos.x, speed.x) & 1; + ready = true; + ready &= Math_StepToF(&this->actor.world.pos.x, this->targetPos.x, speed.x); ready &= Math_StepToF(&this->actor.world.pos.y, this->targetPos.y, speed.y); ready &= Math_StepToF(&this->actor.world.pos.z, this->targetPos.z, speed.z); Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 7.0f, 10.0f, 0.0f, 0x1D); diff --git a/src/overlays/actors/ovl_En_Ik/z_en_ik.c b/src/overlays/actors/ovl_En_Ik/z_en_ik.c index 15c9fadd0d..9bf1d8643c 100644 --- a/src/overlays/actors/ovl_En_Ik/z_en_ik.c +++ b/src/overlays/actors/ovl_En_Ik/z_en_ik.c @@ -338,12 +338,12 @@ void func_80A7492C(EnIk* this, GlobalContext* globalCtx) { void func_80A74AAC(EnIk* this) { this->unk_2F8 = 5; if (this->unk_2FB == 0) { - Animation_Change(&this->skelAnime, &object_ik_Anim_00ED24, 1.0f, 0.0f, Animation_GetLastFrame(&object_ik_Anim_00ED24), ANIMMODE_LOOP, - -4.0f); + Animation_Change(&this->skelAnime, &object_ik_Anim_00ED24, 1.0f, 0.0f, + Animation_GetLastFrame(&object_ik_Anim_00ED24), ANIMMODE_LOOP, -4.0f); this->actor.speedXZ = 0.9f; } else { - Animation_Change(&this->skelAnime, &object_ik_Anim_006734, 1.0f, 0.0f, Animation_GetLastFrame(&object_ik_Anim_006734), ANIMMODE_LOOP, - -4.0f); + Animation_Change(&this->skelAnime, &object_ik_Anim_006734, 1.0f, 0.0f, + Animation_GetLastFrame(&object_ik_Anim_006734), ANIMMODE_LOOP, -4.0f); Audio_PlayActorSound2(&this->actor, NA_SE_EN_IRONNACK_DASH); this->actor.speedXZ = 2.5f; } @@ -592,12 +592,12 @@ void func_80A75790(EnIk* this) { this->unk_2F8 = 0; yawDiff = yaw - this->actor.shape.rot.y; if (ABS(yawDiff) <= 0x4000) { - Animation_Change(&this->skelAnime, &object_ik_Anim_006194, 1.0f, 0.0f, Animation_GetLastFrame(&object_ik_Anim_006194), ANIMMODE_ONCE, - -4.0f); + Animation_Change(&this->skelAnime, &object_ik_Anim_006194, 1.0f, 0.0f, + Animation_GetLastFrame(&object_ik_Anim_006194), ANIMMODE_ONCE, -4.0f); this->actor.speedXZ = -6.0f; } else { - Animation_Change(&this->skelAnime, &object_ik_Anim_0045BC, 1.0f, 0.0f, Animation_GetLastFrame(&object_ik_Anim_0045BC), ANIMMODE_ONCE, - -4.0f); + Animation_Change(&this->skelAnime, &object_ik_Anim_0045BC, 1.0f, 0.0f, + Animation_GetLastFrame(&object_ik_Anim_0045BC), ANIMMODE_ONCE, -4.0f); this->actor.speedXZ = 6.0f; } this->unk_2FE = 0; @@ -1070,8 +1070,8 @@ void func_80A77148(EnIk* this) { } void func_80A77158(EnIk* this, GlobalContext* globalCtx) { - Animation_Change(&this->skelAnime, &object_ik_Anim_00C114, 1.0f, 0.0f, Animation_GetLastFrame(&object_ik_Anim_00C114), ANIMMODE_ONCE, - 0.0f); + Animation_Change(&this->skelAnime, &object_ik_Anim_00C114, 1.0f, 0.0f, + Animation_GetLastFrame(&object_ik_Anim_00C114), ANIMMODE_ONCE, 0.0f); func_80A770C0(this, globalCtx, 4); this->action = 1; this->drawMode = 1; @@ -1079,8 +1079,8 @@ void func_80A77158(EnIk* this, GlobalContext* globalCtx) { } void func_80A771E4(EnIk* this) { - Animation_Change(&this->skelAnime, &object_ik_Anim_00C114, 1.0f, 0.0f, Animation_GetLastFrame(&object_ik_Anim_00C114), ANIMMODE_ONCE, - 0.0f); + Animation_Change(&this->skelAnime, &object_ik_Anim_00C114, 1.0f, 0.0f, + Animation_GetLastFrame(&object_ik_Anim_00C114), ANIMMODE_ONCE, 0.0f); this->action = 2; this->drawMode = 1; this->unk_4D4 = 0; @@ -1111,7 +1111,8 @@ void func_80A7735C(EnIk* this, GlobalContext* globalCtx) { s32 pad[3]; f32 frames = Animation_GetLastFrame(&object_ik_Anim_0203D8); - SkelAnime_InitFlex(globalCtx, &this->skelAnime, &object_ik_Skel_0205C0, NULL, this->jointTable, this->morphTable, 30); + SkelAnime_InitFlex(globalCtx, &this->skelAnime, &object_ik_Skel_0205C0, NULL, this->jointTable, this->morphTable, + 30); Animation_Change(&this->skelAnime, &object_ik_Anim_0203D8, 1.0f, 0.0f, frames, ANIMMODE_ONCE, 0.0f); this->action = 3; this->drawMode = 2; @@ -1442,8 +1443,8 @@ void EnIk_Init(Actor* thisx, GlobalContext* globalCtx) { Actor_Kill(&this->actor); } else { ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f); - SkelAnime_InitFlex(globalCtx, &this->skelAnime, &object_ik_Skel_01E178, &object_ik_Anim_00C114, this->jointTable, this->morphTable, - 30); + SkelAnime_InitFlex(globalCtx, &this->skelAnime, &object_ik_Skel_01E178, &object_ik_Anim_00C114, + this->jointTable, this->morphTable, 30); func_80A74398(&this->actor, globalCtx); func_80A780D0(this, globalCtx); } diff --git a/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c b/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c index e628ce9d6e..9e0bd84e2d 100644 --- a/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c +++ b/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c @@ -463,9 +463,9 @@ void func_80A9C00C(EnKusa* this) { } void func_80A9C068(EnKusa* this, GlobalContext* globalCtx) { - s32 sp24; + s32 sp24 = true; - sp24 = Math_StepToF(&this->actor.scale.y, 0.4f, 0.014f) & 1; + sp24 &= Math_StepToF(&this->actor.scale.y, 0.4f, 0.014f); sp24 &= Math_StepToF(&this->actor.scale.x, 0.4f, 0.011f); this->actor.scale.z = this->actor.scale.x; diff --git a/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c b/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c index 53747bf80e..20c797131c 100644 --- a/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c +++ b/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c @@ -135,8 +135,7 @@ void ObjBean_InitCollider(Actor* thisx, GlobalContext* globalCtx) { Collider_UpdateCylinder(&this->dyna.actor, &this->collider); } -void ObjBean_InitDynaPoly(ObjBean* this, GlobalContext* globalCtx, CollisionHeader* collision, - DynaPolyMoveFlag moveFlag) { +void ObjBean_InitDynaPoly(ObjBean* this, GlobalContext* globalCtx, CollisionHeader* collision, s32 moveFlag) { s32 pad; CollisionHeader* colHeader; s32 pad2; @@ -572,9 +571,9 @@ void func_80B8FE6C(ObjBean* this) { // The leaves are visable and growing void func_80B8FEAC(ObjBean* this, GlobalContext* globalCtx) { - s32 temp_v1; + s32 temp_v1 = true; - temp_v1 = Math_StepToF(&this->dyna.actor.scale.y, 0.16672663f, 0.01f) & 1; + temp_v1 &= Math_StepToF(&this->dyna.actor.scale.y, 0.16672663f, 0.01f); temp_v1 &= Math_StepToF(&this->dyna.actor.scale.x, 0.03569199f, 0.00113f); this->dyna.actor.scale.z = this->dyna.actor.scale.x; diff --git a/src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.c b/src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.c index ab70fa332f..46f5b4bb35 100644 --- a/src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.c +++ b/src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.c @@ -45,7 +45,7 @@ void ObjElevator_SetupAction(ObjElevator* this, ObjElevatorActionFunc actionFunc this->actionFunc = actionFunc; } -void func_80B92B08(ObjElevator* this, GlobalContext* globalCtx, CollisionHeader* collision, DynaPolyMoveFlag flag) { +void func_80B92B08(ObjElevator* this, GlobalContext* globalCtx, CollisionHeader* collision, s32 flag) { s16 pad1; CollisionHeader* colHeader = NULL; s16 pad2; diff --git a/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c b/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c index a6f43f6cb5..e61c961cb8 100644 --- a/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c +++ b/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c @@ -54,7 +54,7 @@ void ObjHsblock_SetupAction(ObjHsblock* this, ObjHsblockActionFunc actionFunc) { this->actionFunc = actionFunc; } -void func_80B93B68(ObjHsblock* this, GlobalContext* globalCtx, CollisionHeader* collision, DynaPolyMoveFlag moveFlags) { +void func_80B93B68(ObjHsblock* this, GlobalContext* globalCtx, CollisionHeader* collision, s32 moveFlags) { s32 pad; CollisionHeader* colHeader = NULL; s32 pad2[2]; diff --git a/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c b/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c index f752ed59c8..eafe67c81f 100644 --- a/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c +++ b/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c @@ -62,7 +62,7 @@ void ObjLift_SetupAction(ObjLift* this, ObjLiftActionFunc actionFunc) { this->actionFunc = actionFunc; } -void ObjLift_InitDynaPoly(ObjLift* this, GlobalContext* globalCtx, CollisionHeader* collision, DynaPolyMoveFlag flags) { +void ObjLift_InitDynaPoly(ObjLift* this, GlobalContext* globalCtx, CollisionHeader* collision, s32 flags) { s32 pad; CollisionHeader* colHeader = NULL; s32 pad2; diff --git a/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c b/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c index d818a71919..02e25611d4 100644 --- a/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c +++ b/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c @@ -85,8 +85,7 @@ static Vec2f sFaceDirection[] = { { -1.0f, -1.0f }, }; -void ObjOshihiki_InitDynapoly(ObjOshihiki* this, GlobalContext* globalCtx, CollisionHeader* collision, - DynaPolyMoveFlag moveFlag) { +void ObjOshihiki_InitDynapoly(ObjOshihiki* this, GlobalContext* globalCtx, CollisionHeader* collision, s32 moveFlag) { s32 pad; CollisionHeader* colHeader = NULL; s32 pad2; diff --git a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c index ab671f9625..9138be63dc 100644 --- a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c +++ b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c @@ -184,8 +184,7 @@ void ObjSwitch_RotateY(Vec3f* dest, Vec3f* src, s16 angle) { dest->z = src->z * c - src->x * s; } -void ObjSwitch_InitDynapoly(ObjSwitch* this, GlobalContext* globalCtx, CollisionHeader* collision, - DynaPolyMoveFlag moveFlag) { +void ObjSwitch_InitDynapoly(ObjSwitch* this, GlobalContext* globalCtx, CollisionHeader* collision, s32 moveFlag) { s32 pad; CollisionHeader* colHeader = NULL; s32 pad2;