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

Fix misc 19 (#1488)

* "bgs sword" -> "biggoron sword"

* Animation_ChangeImpl: last arg is `ANIMTAPER_` enum

* TransitionTileStatus -> state

* Tiny gbi.h formatting fixups

* some cleanup on floormaster

* misc float ops cleanup

* sunsSongState = SUNSSONG_INACTIVE

* continueFlag == CS_CMD_STOP

* fix few camera names inconsistency

* textual 0 padding? not on my lawn

* libultra: construct address from end of dmem rather than oob from imem

* more free1 -> 2 fixup
This commit is contained in:
Dragorn421 2023-01-10 19:03:31 +01:00 committed by GitHub
parent b4c97ce17e
commit 542012efa6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 146 additions and 152 deletions

View file

@ -186,7 +186,7 @@ void DoorWarp1_SetupWarp(DoorWarp1* this, PlayState* play) {
void DoorWarp1_SetupAdultDungeonWarp(DoorWarp1* this, PlayState* play) {
SkelAnime_Init(play, &this->skelAnime, &gWarpCrystalSkel, &gWarpCrystalAnim, NULL, NULL, 0);
Animation_ChangeImpl(&this->skelAnime, &gWarpCrystalAnim, 1.0f, 1.0f, 1.0f, ANIMMODE_ONCE, 40.0f, 1);
Animation_ChangeImpl(&this->skelAnime, &gWarpCrystalAnim, 1.0f, 1.0f, 1.0f, ANIMMODE_ONCE, 40.0f, ANIMTAPER_ACCEL);
this->scale = 0;
this->unk_1AE = -140;
@ -215,7 +215,7 @@ void DoorWarp1_SetupBlueCrystal(DoorWarp1* this, PlayState* play) {
SkelAnime_Init(play, &this->skelAnime, &gWarpCrystalSkel, &gWarpCrystalAnim, NULL, NULL, 0);
Animation_ChangeImpl(&this->skelAnime, &gWarpCrystalAnim, 0, Animation_GetLastFrame(&gWarpCrystalAnim),
Animation_GetLastFrame(&gWarpCrystalAnim), ANIMMODE_ONCE, 0.0f, 1);
Animation_GetLastFrame(&gWarpCrystalAnim), ANIMMODE_ONCE, 0.0f, ANIMTAPER_ACCEL);
this->skelAnime.curFrame = Animation_GetLastFrame(&gWarpCrystalAnim);
this->scale = 10;
@ -244,7 +244,7 @@ void DoorWarp1_SetupBlueCrystal(DoorWarp1* this, PlayState* play) {
void DoorWarp1_SetupPurpleCrystal(DoorWarp1* this, PlayState* play) {
SkelAnime_Init(play, &this->skelAnime, &gWarpCrystalSkel, &gWarpCrystalAnim, NULL, NULL, 0);
Animation_ChangeImpl(&this->skelAnime, &gWarpCrystalAnim, 0, Animation_GetLastFrame(&gWarpCrystalAnim),
Animation_GetLastFrame(&gWarpCrystalAnim), ANIMMODE_ONCE, 0.0f, 1);
Animation_GetLastFrame(&gWarpCrystalAnim), ANIMMODE_ONCE, 0.0f, ANIMTAPER_ACCEL);
this->skelAnime.curFrame = Animation_GetLastFrame(&gWarpCrystalAnim);
this->unk_1AE = 120;
@ -668,7 +668,7 @@ void func_8099A508(DoorWarp1* this, PlayState* play) {
Audio_PlaySfxGeneral(NA_SE_EV_LINK_WARP, &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
Animation_ChangeImpl(&this->skelAnime, &gWarpCrystalAnim, 1.0f, Animation_GetLastFrame(&gWarpCrystalAnim),
Animation_GetLastFrame(&gWarpCrystalAnim), ANIMMODE_ONCE, 40.0f, 1);
Animation_GetLastFrame(&gWarpCrystalAnim), ANIMMODE_ONCE, 40.0f, ANIMTAPER_ACCEL);
this->unk_1B2 = 0x32;
DoorWarp1_SetupAction(this, DoorWarp1_AdultWarpOut);

View file

@ -112,9 +112,9 @@ static ColliderQuadInit sQuadInit = {
};
typedef enum {
/* 00 */ AM_DMGEFF_NONE, // used by anything that cant kill the armos
/* 01 */ AM_DMGEFF_NUT,
/* 06 */ AM_DMGEFF_STUN = 6, // doesn't include deku nuts
/* 0 */ AM_DMGEFF_NONE, // used by anything that cant kill the armos
/* 1 */ AM_DMGEFF_NUT,
/* 6 */ AM_DMGEFF_STUN = 6, // doesn't include deku nuts
/* 13 */ AM_DMGEFF_ICE = 13,
/* 14 */ AM_DMGEFF_MAGIC_FIRE_LIGHT,
/* 15 */ AM_DMGEFF_KILL // any damage source that can kill the armos (and isn't a special case)

View file

@ -12,8 +12,8 @@
#define SPAWN_INVISIBLE 0x8000
#define SPAWN_SMALL 0x10
#define MERGE_MASTER 0x40
#define MERGE_SLAVE 0x20
#define MERGE_LEADER 0x40
#define MERGE_FOLLOWER 0x20
void EnFloormas_Init(Actor* thisx, PlayState* play2);
void EnFloormas_Destroy(Actor* thisx, PlayState* play);
@ -24,16 +24,16 @@ void EnFloormas_GrabLink(EnFloormas* this, PlayState* play);
void EnFloormas_Split(EnFloormas* this, PlayState* play);
void EnFloormas_Recover(EnFloormas* this, PlayState* play);
void EnFloormas_DrawHighlighted(Actor* thisx, PlayState* play);
void EnFloormas_SmWait(EnFloormas* this, PlayState* play);
void EnFloormas_SmallWait(EnFloormas* this, PlayState* play);
void EnFloormas_SetupBigDecideAction(EnFloormas* this);
void EnFloormas_Freeze(EnFloormas* this, PlayState* play);
void EnFloormas_TakeDamage(EnFloormas* this, PlayState* play);
void EnFloormas_Merge(EnFloormas* this, PlayState* play);
void EnFloormas_JumpAtLink(EnFloormas* this, PlayState* play);
void EnFloormas_SmSlaveJumpAtMaster(EnFloormas* this, PlayState* play);
void EnFloormas_SmShrink(EnFloormas* this, PlayState* play);
void EnFloormas_SmDecideAction(EnFloormas* this, PlayState* play);
void EnFloormas_SmWalk(EnFloormas* this, PlayState* play);
void EnFloormas_SmallFollowerJumpAtLeader(EnFloormas* this, PlayState* play);
void EnFloormas_SmallShrink(EnFloormas* this, PlayState* play);
void EnFloormas_SmallDecideAction(EnFloormas* this, PlayState* play);
void EnFloormas_SmallWalk(EnFloormas* this, PlayState* play);
void EnFloormas_Land(EnFloormas* this, PlayState* play);
void EnFloormas_Hover(EnFloormas* this, PlayState* play);
void EnFloormas_Turn(EnFloormas* this, PlayState* play);
@ -145,7 +145,7 @@ void EnFloormas_Init(Actor* thisx, PlayState* play2) {
if (this->actor.params == SPAWN_SMALL) {
this->actor.draw = NULL;
this->actor.flags &= ~ACTOR_FLAG_0;
this->actionFunc = EnFloormas_SmWait;
this->actionFunc = EnFloormas_SmallWait;
} else {
// spawn first small floormaster
this->actor.parent =
@ -278,7 +278,6 @@ void EnFloormas_SetupLand(EnFloormas* this) {
}
void EnFloormas_SetupSplit(EnFloormas* this) {
Actor_SetScale(&this->actor, 0.004f);
this->actor.flags |= ACTOR_FLAG_4;
if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_7)) {
@ -301,21 +300,21 @@ void EnFloormas_SetupSplit(EnFloormas* this) {
this->actionFunc = EnFloormas_Split;
}
void EnFloormas_SetupSmWalk(EnFloormas* this) {
void EnFloormas_SetupSmallWalk(EnFloormas* this) {
Animation_PlayLoopSetSpeed(&this->skelAnime, &gWallmasterWalkAnim, 4.5f);
this->actionFunc = EnFloormas_SmWalk;
this->actionFunc = EnFloormas_SmallWalk;
this->actor.speed = 5.0f;
}
void EnFloormas_SetupSmDecideAction(EnFloormas* this) {
if (this->actionFunc != EnFloormas_SmWalk) {
void EnFloormas_SetupSmallDecideAction(EnFloormas* this) {
if (this->actionFunc != EnFloormas_SmallWalk) {
Animation_PlayLoopSetSpeed(&this->skelAnime, &gWallmasterWalkAnim, 4.5f);
}
this->actionFunc = EnFloormas_SmDecideAction;
this->actionFunc = EnFloormas_SmallDecideAction;
this->actor.speed = 5.0f;
}
void EnFloormas_SetupSmShrink(EnFloormas* this, PlayState* play) {
void EnFloormas_SetupSmallShrink(EnFloormas* this, PlayState* play) {
static Vec3f velocity = { 0.0f, 0.0f, 0.0f };
static Vec3f accel = { 0.0f, 0.0f, 0.0f };
Vec3f pos;
@ -326,12 +325,12 @@ void EnFloormas_SetupSmShrink(EnFloormas* this, PlayState* play) {
pos.y = this->actor.world.pos.y + 15.0f;
pos.z = this->actor.world.pos.z;
EffectSsDeadDb_Spawn(play, &pos, &velocity, &accel, 150, -10, 255, 255, 255, 255, 0, 0, 255, 1, 9, true);
this->actionFunc = EnFloormas_SmShrink;
this->actionFunc = EnFloormas_SmallShrink;
}
void EnFloormas_SetupSlaveJumpAtMaster(EnFloormas* this) {
void EnFloormas_SetupSmallFollowerJumpAtLeader(EnFloormas* this) {
Animation_Change(&this->skelAnime, &gWallmasterJumpAnim, 2.0f, 0.0f, 41.0f, ANIMMODE_ONCE, 0.0f);
this->actionFunc = EnFloormas_SmSlaveJumpAtMaster;
this->actionFunc = EnFloormas_SmallFollowerJumpAtLeader;
this->actor.speed = 0.0f;
}
@ -367,24 +366,24 @@ void EnFloormas_SetupGrabLink(EnFloormas* this, Player* player) {
void EnFloormas_SetupMerge(EnFloormas* this) {
Animation_PlayOnce(&this->skelAnime, &gWallmasterWaitAnim);
this->actionTimer = 0;
this->smActionTimer += 1500;
this->smallActionTimer += 1500;
EnFloormas_MakeInvulnerable(this);
this->actionFunc = EnFloormas_Merge;
}
void EnFloormas_SetupSmWait(EnFloormas* this) {
void EnFloormas_SetupSmallWait(EnFloormas* this) {
EnFloormas* parent = (EnFloormas*)this->actor.parent;
EnFloormas* child = (EnFloormas*)this->actor.child;
// if this is the last remaining small floor master, kill all.
if ((parent->actionFunc == EnFloormas_SmWait) && (child->actionFunc == EnFloormas_SmWait)) {
if ((parent->actionFunc == EnFloormas_SmallWait) && (child->actionFunc == EnFloormas_SmallWait)) {
Actor_Kill(&parent->actor);
Actor_Kill(&child->actor);
Actor_Kill(&this->actor);
return;
}
this->actor.draw = NULL;
this->actionFunc = EnFloormas_SmWait;
this->actionFunc = EnFloormas_SmallWait;
this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_4);
}
@ -436,7 +435,7 @@ void EnFloormas_Die(EnFloormas* this, PlayState* play) {
} else {
// Die
Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0x90);
EnFloormas_SetupSmShrink(this, play);
EnFloormas_SetupSmallShrink(this, play);
}
}
@ -459,10 +458,10 @@ void EnFloormas_Stand(EnFloormas* this, PlayState* play) {
if (SkelAnime_Update(&this->skelAnime)) {
if (this->actor.scale.x > 0.004f) {
EnFloormas_SetupBigWalk(this);
} else if (this->actor.params == MERGE_SLAVE) {
EnFloormas_SetupSmDecideAction(this);
} else if (this->actor.params == MERGE_FOLLOWER) {
EnFloormas_SetupSmallDecideAction(this);
} else {
EnFloormas_SetupSmWalk(this);
EnFloormas_SetupSmallWalk(this);
}
}
}
@ -615,7 +614,7 @@ void EnFloormas_Land(EnFloormas* this, PlayState* play) {
isOnGround = this->actor.bgCheckFlags & BGCHECKFLAG_GROUND;
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
if (this->actor.params != MERGE_MASTER) {
if (this->actor.params != MERGE_LEADER) {
EnFloormas_MakeVulnerable(this);
}
@ -647,11 +646,11 @@ void EnFloormas_Land(EnFloormas* this, PlayState* play) {
if (this->actionTimer == 0 && isOnGround) {
if (this->skelAnime.endFrame < 45.0f) {
this->skelAnime.endFrame = Animation_GetLastFrame(&gWallmasterJumpAnim);
} else if (this->actor.params == MERGE_MASTER) {
} else if (this->actor.params == MERGE_LEADER) {
EnFloormas_SetupMerge(this);
} else {
EnFloormas_SetupStand(this);
this->smActionTimer = 50;
this->smallActionTimer = 50;
}
}
}
@ -664,7 +663,7 @@ void EnFloormas_Split(EnFloormas* this, PlayState* play) {
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
if (SkelAnime_Update(&this->skelAnime)) {
this->actor.flags |= ACTOR_FLAG_0;
this->smActionTimer = 50;
this->smallActionTimer = 50;
EnFloormas_SetupStand(this);
}
Math_StepToF(&this->actor.speed, 0.0f, 1.0f);
@ -675,16 +674,16 @@ void EnFloormas_Split(EnFloormas* this, PlayState* play) {
}
}
void EnFloormas_SmWalk(EnFloormas* this, PlayState* play) {
void EnFloormas_SmallWalk(EnFloormas* this, PlayState* play) {
SkelAnime_Update(&this->skelAnime);
DECR(this->smActionTimer);
DECR(this->smallActionTimer);
if (Animation_OnFrame(&this->skelAnime, 0.0f) || Animation_OnFrame(&this->skelAnime, 18.0f)) {
Actor_PlaySfx(&this->actor, NA_SE_EN_FLOORMASTER_SM_WALK);
}
if (this->smActionTimer == 0) {
EnFloormas_SetupSmDecideAction(this);
if (this->smallActionTimer == 0) {
EnFloormas_SetupSmallDecideAction(this);
} else if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
this->actionTarget = this->actor.wallYaw;
EnFloormas_SetupTurn(this);
@ -693,7 +692,7 @@ void EnFloormas_SmWalk(EnFloormas* this, PlayState* play) {
}
}
void EnFloormas_SmDecideAction(EnFloormas* this, PlayState* play) {
void EnFloormas_SmallDecideAction(EnFloormas* this, PlayState* play) {
Actor* primaryFloormas;
s32 isAgainstWall;
@ -708,10 +707,10 @@ void EnFloormas_SmDecideAction(EnFloormas* this, PlayState* play) {
return;
}
if (this->actor.params == MERGE_SLAVE) {
if (this->actor.parent->params == MERGE_MASTER) {
if (this->actor.params == MERGE_FOLLOWER) {
if (this->actor.parent->params == MERGE_LEADER) {
primaryFloormas = this->actor.parent;
} else if (this->actor.child->params == MERGE_MASTER) {
} else if (this->actor.child->params == MERGE_LEADER) {
primaryFloormas = this->actor.child;
} else {
this->actor.params = 0x10;
@ -720,7 +719,7 @@ void EnFloormas_SmDecideAction(EnFloormas* this, PlayState* play) {
Math_ScaledStepToS(&this->actor.shape.rot.y, Actor_WorldYawTowardActor(&this->actor, primaryFloormas), 0x38E);
if (Actor_WorldDistXZToActor(&this->actor, primaryFloormas) < 80.0f) {
EnFloormas_SetupSlaveJumpAtMaster(this);
EnFloormas_SetupSmallFollowerJumpAtLeader(this);
}
} else {
Math_ApproachS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 3, 0x71C);
@ -730,9 +729,9 @@ void EnFloormas_SmDecideAction(EnFloormas* this, PlayState* play) {
}
}
void EnFloormas_SmShrink(EnFloormas* this, PlayState* play) {
void EnFloormas_SmallShrink(EnFloormas* this, PlayState* play) {
if (Math_StepToF(&this->actor.scale.x, 0.0f, 0.0015f)) {
EnFloormas_SetupSmWait(this);
EnFloormas_SetupSmallWait(this);
}
this->actor.scale.z = this->actor.scale.x;
this->actor.scale.y = this->actor.scale.x;
@ -795,12 +794,12 @@ void EnFloormas_GrabLink(EnFloormas* this, PlayState* play) {
parent = (EnFloormas*)this->actor.parent;
child = (EnFloormas*)this->actor.child;
if (((parent->actionFunc == EnFloormas_GrabLink) || parent->actionFunc == EnFloormas_SmWait) &&
(child->actionFunc == EnFloormas_GrabLink || child->actionFunc == EnFloormas_SmWait)) {
if (((parent->actionFunc == EnFloormas_GrabLink) || parent->actionFunc == EnFloormas_SmallWait) &&
(child->actionFunc == EnFloormas_GrabLink || child->actionFunc == EnFloormas_SmallWait)) {
parent->actor.params = MERGE_SLAVE;
child->actor.params = MERGE_SLAVE;
this->actor.params = MERGE_MASTER;
parent->actor.params = MERGE_FOLLOWER;
child->actor.params = MERGE_FOLLOWER;
this->actor.params = MERGE_LEADER;
}
this->actor.shape.rot.x = 0;
@ -823,13 +822,13 @@ void EnFloormas_GrabLink(EnFloormas* this, PlayState* play) {
Actor_PlaySfx(&this->actor, NA_SE_EN_FLOORMASTER_SM_STICK - SFX_FLAG);
}
void EnFloormas_SmSlaveJumpAtMaster(EnFloormas* this, PlayState* play) {
void EnFloormas_SmallFollowerJumpAtLeader(EnFloormas* this, PlayState* play) {
Actor* primFloormas;
SkelAnime_Update(&this->skelAnime);
if (this->actor.parent->params == MERGE_MASTER) {
if (this->actor.parent->params == MERGE_LEADER) {
primFloormas = this->actor.parent;
} else if (this->actor.child->params == MERGE_MASTER) {
} else if (this->actor.child->params == MERGE_LEADER) {
primFloormas = this->actor.child;
} else {
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
@ -846,7 +845,7 @@ void EnFloormas_SmSlaveJumpAtMaster(EnFloormas* this, PlayState* play) {
} else if ((((primFloormas->world.pos.y - this->actor.world.pos.y) < -10.0f) &&
(fabsf(this->actor.world.pos.x - primFloormas->world.pos.x) < 10.0f)) &&
(fabsf(this->actor.world.pos.z - primFloormas->world.pos.z) < 10.0f)) {
EnFloormas_SetupSmWait(this);
EnFloormas_SetupSmallWait(this);
this->collider.base.ocFlags1 |= OC1_ON;
} else if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
this->actor.speed = 0.0f;
@ -869,25 +868,25 @@ void EnFloormas_Merge(EnFloormas* this, PlayState* play) {
mergeCnt = 0;
DECR(this->smActionTimer);
DECR(this->smallActionTimer);
parent = (EnFloormas*)this->actor.parent;
child = (EnFloormas*)this->actor.child;
if (this->smActionTimer == 0) {
if (parent->actionFunc != EnFloormas_SmWait) {
EnFloormas_SetupSmShrink(parent, play);
if (this->smallActionTimer == 0) {
if (parent->actionFunc != EnFloormas_SmallWait) {
EnFloormas_SetupSmallShrink(parent, play);
}
if (child->actionFunc != EnFloormas_SmWait) {
EnFloormas_SetupSmShrink(child, play);
if (child->actionFunc != EnFloormas_SmallWait) {
EnFloormas_SetupSmallShrink(child, play);
}
} else {
if ((parent->actionFunc != EnFloormas_SmWait) && (parent->actionFunc != EnFloormas_SmShrink)) {
if ((parent->actionFunc != EnFloormas_SmallWait) && (parent->actionFunc != EnFloormas_SmallShrink)) {
mergeCnt++;
}
if ((child->actionFunc != EnFloormas_SmWait) && (child->actionFunc != EnFloormas_SmShrink)) {
if ((child->actionFunc != EnFloormas_SmallWait) && (child->actionFunc != EnFloormas_SmallShrink)) {
mergeCnt++;
}
}
@ -931,7 +930,7 @@ void EnFloormas_Merge(EnFloormas* this, PlayState* play) {
func_8002F974(&this->actor, NA_SE_EN_FLOORMASTER_RESTORE - SFX_FLAG);
}
void EnFloormas_SmWait(EnFloormas* this, PlayState* play) {
void EnFloormas_SmallWait(EnFloormas* this, PlayState* play) {
}
void EnFloormas_TakeDamage(EnFloormas* this, PlayState* play) {
@ -982,9 +981,9 @@ void EnFloormas_ColliderCheck(EnFloormas* this, PlayState* play) {
Actor_SetDropFlag(&this->actor, &this->collider.info, true);
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
if (this->collider.base.colType != COLTYPE_HARD) {
isSmall = 0;
isSmall = false;
if (this->actor.scale.x < 0.01f) {
isSmall = 1;
isSmall = true;
}
if (isSmall && this->collider.info.acHitInfo->toucher.dmgFlags & DMG_HOOKSHOT) {
this->actor.colChkInfo.damage = 2;
@ -1022,17 +1021,12 @@ void EnFloormas_Update(Actor* thisx, PlayState* play) {
EnFloormas* this = (EnFloormas*)thisx;
s32 pad;
if (this->actionFunc != EnFloormas_SmWait) {
if (this->actionFunc != EnFloormas_SmallWait) {
if (this->collider.base.atFlags & AT_HIT) {
this->collider.base.atFlags &= ~AT_HIT;
this->actor.speed *= -0.5f;
if (-5.0f < this->actor.speed) {
this->actor.speed = -5.0f;
} else {
this->actor.speed = this->actor.speed;
}
this->actor.speed = CLAMP_MAX(this->actor.speed, -5.0f);
this->actor.velocity.y = 5.0f;
EnFloormas_SetupLand(this);
@ -1062,7 +1056,7 @@ void EnFloormas_Update(Actor* thisx, PlayState* play) {
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);
}
if ((this->actionFunc != EnFloormas_SmSlaveJumpAtMaster) || (this->skelAnime.curFrame < 20.0f)) {
if ((this->actionFunc != EnFloormas_SmallFollowerJumpAtLeader) || (this->skelAnime.curFrame < 20.0f)) {
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
}
}

View file

@ -15,7 +15,7 @@ struct EnFloormas{
/* 0x0194 */ s16 actionTimer;
/* 0x0196 */ s16 actionTarget;
/* 0x0198 */ s16 zOffset;
/* 0x019A */ s16 smActionTimer;
/* 0x019A */ s16 smallActionTimer;
/* 0x019C */ Vec3s jointTable[25];
/* 0x0232 */ Vec3s morphTable[25];
/* 0x02C8 */ ColliderCylinder collider;

View file

@ -523,7 +523,7 @@ s32 EnGirlA_CanBuy_BluePotion(PlayState* play, EnGirlA* this) {
}
s32 EnGirlA_CanBuy_Longsword(PlayState* play, EnGirlA* this) {
if (CHECK_OWNED_EQUIP_ALT(EQUIP_TYPE_SWORD, EQUIP_INV_SWORD_BGS) &&
if (CHECK_OWNED_EQUIP_ALT(EQUIP_TYPE_SWORD, EQUIP_INV_SWORD_BIGGORON) &&
!CHECK_OWNED_EQUIP_ALT(EQUIP_TYPE_SWORD, EQUIP_INV_SWORD_BROKENGIANTKNIFE)) {
return CANBUY_RESULT_CANT_GET_NOW;
}

View file

@ -92,7 +92,7 @@ void EnGm_Destroy(Actor* thisx, PlayState* play) {
s32 func_80A3D7C8(void) {
if (LINK_AGE_IN_YEARS == YEARS_CHILD) {
return 0;
} else if (!CHECK_OWNED_EQUIP_ALT(EQUIP_TYPE_SWORD, EQUIP_INV_SWORD_BGS)) {
} else if (!CHECK_OWNED_EQUIP_ALT(EQUIP_TYPE_SWORD, EQUIP_INV_SWORD_BIGGORON)) {
return 1;
} else if (CHECK_OWNED_EQUIP_ALT(EQUIP_TYPE_SWORD, EQUIP_INV_SWORD_BROKENGIANTKNIFE)) {
return 2;

View file

@ -1353,7 +1353,7 @@ void EnGo2_SetupRolling(EnGo2* this, PlayState* play) {
this->actor.flags |= ACTOR_FLAG_24;
this->animTimer = 10;
this->actor.shape.yOffset = 1800.0f;
this->actor.speed += this->actor.speed; // Speeding up
this->actor.speed *= 2.0f; // Speeding up
this->actionFunc = EnGo2_ContinueRolling;
}

View file

@ -1001,7 +1001,7 @@ void EnHorse_UpdateSpeed(EnHorse* this, PlayState* play, f32 brakeDecel, f32 bra
EnHorse_StickDirection(&this->curStick, &stickMag, &stickAngle);
if (Math_CosS(stickAngle) <= brakeAngle) {
this->actor.speed -= brakeDecel;
this->actor.speed = this->actor.speed < 0.0f ? 0.0f : this->actor.speed;
this->actor.speed = CLAMP_MIN(this->actor.speed, 0.0f);
return;
}

View file

@ -992,7 +992,7 @@ void EnSkj_WaitForSong(EnSkj* this, PlayState* play) {
player->stateFlags2 |= PLAYER_STATE2_23;
} else {
if (play->msgCtx.ocarinaMode >= OCARINA_MODE_05) {
gSaveContext.sunsSongState = 0;
gSaveContext.sunsSongState = SUNSSONG_INACTIVE;
if (GET_ITEMGETINF(ITEMGETINF_16)) {
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
player->unk_6A8 = &this->actor;

View file

@ -1212,7 +1212,7 @@ static s8 sItemActions[] = {
PLAYER_IA_BOW_LIGHT, // ITEM_BOW_LIGHT
PLAYER_IA_SWORD_KOKIRI, // ITEM_SWORD_KOKIRI
PLAYER_IA_SWORD_MASTER, // ITEM_SWORD_MASTER
PLAYER_IA_SWORD_BGS, // ITEM_SWORD_BIGGORON
PLAYER_IA_SWORD_BIGGORON, // ITEM_SWORD_BIGGORON
};
static s32 (*D_80853EDC[])(Player* this, PlayState* play) = {
@ -1221,7 +1221,7 @@ static s32 (*D_80853EDC[])(Player* this, PlayState* play) = {
func_8083485C, // PLAYER_IA_FISHING_POLE
func_808349DC, // PLAYER_IA_SWORD_MASTER
func_808349DC, // PLAYER_IA_SWORD_KOKIRI
func_808349DC, // PLAYER_IA_SWORD_BGS
func_808349DC, // PLAYER_IA_SWORD_BIGGORON
func_8083485C, // PLAYER_IA_DEKU_STICK
func_8083485C, // PLAYER_IA_HAMMER
func_8083501C, // PLAYER_IA_BOW
@ -1291,7 +1291,7 @@ static void (*D_80853FE8[])(PlayState* play, Player* this) = {
func_80833770, // PLAYER_IA_FISHING_POLE
func_80833770, // PLAYER_IA_SWORD_MASTER
func_80833770, // PLAYER_IA_SWORD_KOKIRI
func_80833770, // PLAYER_IA_SWORD_BGS
func_80833770, // PLAYER_IA_SWORD_BIGGORON
func_8083377C, // PLAYER_IA_DEKU_STICK
func_80833790, // PLAYER_IA_HAMMER
func_8083379C, // PLAYER_IA_BOW
@ -2213,7 +2213,7 @@ void func_80833A20(Player* this, s32 newMeleeWeaponState) {
u16 voiceSfx;
if (this->meleeWeaponState == 0) {
if ((this->heldItemAction == PLAYER_IA_SWORD_BGS) && (gSaveContext.swordHealth > 0.0f)) {
if ((this->heldItemAction == PLAYER_IA_SWORD_BIGGORON) && (gSaveContext.swordHealth > 0.0f)) {
itemSfx = NA_SE_IT_HAMMER_SWING;
} else {
itemSfx = NA_SE_IT_SWORD_SWING;
@ -5702,7 +5702,7 @@ s32 func_8083C544(Player* this, PlayState* play) {
if (CHECK_BTN_ALL(sControlInput->cur.button, BTN_B)) {
if (!(this->stateFlags1 & PLAYER_STATE1_22) && (Player_GetMeleeWeaponHeld(this) != 0) && (this->unk_844 == 1) &&
(this->heldItemAction != PLAYER_IA_DEKU_STICK)) {
if ((this->heldItemAction != PLAYER_IA_SWORD_BGS) || (gSaveContext.swordHealth > 0.0f)) {
if ((this->heldItemAction != PLAYER_IA_SWORD_BIGGORON) || (gSaveContext.swordHealth > 0.0f)) {
func_808377DC(play, this);
return 1;
}
@ -8014,7 +8014,7 @@ s32 func_80842AC4(PlayState* play, Player* this) {
}
s32 func_80842B7C(PlayState* play, Player* this) {
if (this->heldItemAction == PLAYER_IA_SWORD_BGS) {
if (this->heldItemAction == PLAYER_IA_SWORD_BIGGORON) {
if (!gSaveContext.bgsFlag && (gSaveContext.swordHealth > 0.0f)) {
if ((gSaveContext.swordHealth -= 1.0f) <= 0.0f) {
EffectSsStick_Spawn(play, &this->bodyPartsPos[PLAYER_BODYPART_R_HAND],