1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-23 07:21:19 +00:00

Name Actor_PlaySfx and Player_PlaySfx (#1469)

* name two main actor sfx functions

* adjust comments

* fix double s in player

* fix commas
This commit is contained in:
engineer124 2022-12-18 23:18:21 -05:00 committed by GitHub
parent f181c2f10e
commit be22b836f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
213 changed files with 1424 additions and 1414 deletions

View file

@ -910,7 +910,7 @@ s32 func_80A44AB0(EnGo2* this, PlayState* play) {
play->damagePlayer(play, -4);
func_8002F71C(play, &this->actor, arg2, this->actor.yawTowardsPlayer, 6.0f);
Audio_PlayActorSfx2(&player->actor, NA_SE_PL_BODY_HIT);
Actor_PlaySfx(&player->actor, NA_SE_PL_BODY_HIT);
this->collider.base.ocFlags1 &= ~OC1_TYPE_PLAYER;
}
}
@ -998,15 +998,14 @@ s32 EnGo2_IsRollingOnGround(EnGo2* this, s16 arg1, f32 arg2, s16 arg3) {
} else {
this->actor.world.pos.y =
(this->unk_590 & 1) ? this->actor.world.pos.y + 1.5f : this->actor.world.pos.y - 1.5f;
Audio_PlayActorSfx2(&this->actor, NA_SE_EV_BIGBALL_ROLL - SFX_FLAG);
Actor_PlaySfx(&this->actor, NA_SE_EV_BIGBALL_ROLL - SFX_FLAG);
return true;
}
}
if (this->unk_59C >= 2) {
Audio_PlayActorSfx2(&this->actor, (this->actor.params & 0x1F) == GORON_CITY_ROLLING_BIG
? NA_SE_EN_GOLON_LAND_BIG
: NA_SE_EN_DODO_M_GND);
Actor_PlaySfx(&this->actor, (this->actor.params & 0x1F) == GORON_CITY_ROLLING_BIG ? NA_SE_EN_GOLON_LAND_BIG
: NA_SE_EN_DODO_M_GND);
}
this->unk_59C--;
@ -1276,17 +1275,17 @@ void EnGo2_SitDownAnimation(EnGo2* this) {
if ((this->skelAnime.playSpeed != 0.0f) && (this->skelAnime.animation == &gGoronAnim_004930)) {
if (this->skelAnime.playSpeed > 0.0f && this->skelAnime.curFrame == 14.0f) {
if ((this->actor.params & 0x1F) != GORON_DMT_BIGGORON) {
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_GOLON_SIT_DOWN);
Actor_PlaySfx(&this->actor, NA_SE_EN_GOLON_SIT_DOWN);
} else {
func_800F4524(&gSfxDefaultPos, NA_SE_EN_GOLON_SIT_DOWN, 60);
}
}
if (this->skelAnime.playSpeed < 0.0f) {
if (this->skelAnime.curFrame == 1.0f) {
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_DODO_M_GND);
Actor_PlaySfx(&this->actor, NA_SE_EN_DODO_M_GND);
}
if (this->skelAnime.curFrame == 40.0f) {
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_GOLON_SIT_DOWN);
Actor_PlaySfx(&this->actor, NA_SE_EN_GOLON_SIT_DOWN);
}
}
}
@ -1319,7 +1318,7 @@ void EnGo2_RollingAnimation(EnGo2* this, PlayState* play) {
void EnGo2_WakeUp(EnGo2* this, PlayState* play) {
if (this->skelAnime.playSpeed == 0.0f) {
if ((this->actor.params & 0x1F) != GORON_DMT_BIGGORON) {
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_GOLON_WAKE_UP);
Actor_PlaySfx(&this->actor, NA_SE_EN_GOLON_WAKE_UP);
} else {
func_800F4524(&gSfxDefaultPos, NA_SE_EN_GOLON_WAKE_UP, 60);
}
@ -1469,7 +1468,7 @@ void EnGo2_GoronLinkAnimation(EnGo2* this, PlayState* play) {
if (this->skelAnime.animation == &gGoronAnim_000750) {
if (this->skelAnime.curFrame == 20.0f) {
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_GOLON_CRY);
Actor_PlaySfx(&this->actor, NA_SE_EN_GOLON_CRY);
}
}
@ -1932,7 +1931,7 @@ void EnGo2_GoronFireGenericAction(EnGo2* this, PlayState* play) {
case 2: // Walking away
if (DECR(this->animTimer)) {
if (!(this->animTimer % 8)) {
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_MORIBLIN_WALK);
Actor_PlaySfx(&this->actor, NA_SE_EN_MORIBLIN_WALK);
}
Actor_MoveForward(&this->actor);
} else {
@ -1949,10 +1948,10 @@ void EnGo2_GoronFireGenericAction(EnGo2* this, PlayState* play) {
case 3: // Walking away
this->animTimer++;
if (!(this->animTimer % 8) && (this->animTimer < 10)) {
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_MORIBLIN_WALK);
Actor_PlaySfx(&this->actor, NA_SE_EN_MORIBLIN_WALK);
}
if (this->animTimer == 10) {
Audio_PlayActorSfx2(&this->actor, NA_SE_EV_IRON_DOOR_OPEN);
Actor_PlaySfx(&this->actor, NA_SE_EV_IRON_DOOR_OPEN);
}
if (this->animTimer > 44) {
SfxSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 20, NA_SE_EV_IRON_DOOR_CLOSE);