diff options
Diffstat (limited to 'src/code')
| -rw-r--r-- | src/code/z_actor.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 52684408e..37d5d4cf1 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -46,17 +46,17 @@ struct Actor* D_801ED920; // 2 funcs. 1 out of z_actor #include "objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h" #include "objects/object_bdoor/object_bdoor.h" -#define ACTOR_AUDIO_FLAG_SFX_ACTOR_POS (1 << 0) -#define ACTOR_AUDIO_FLAG_SFX_CENTERED_1 (1 << 1) -#define ACTOR_AUDIO_FLAG_SFX_CENTERED_2 (1 << 2) -#define ACTOR_AUDIO_FLAG_SFX_CENTERED_3 (1 << 3) +#define ACTOR_AUDIO_FLAG_SFX_ACTOR_POS_1 (1 << 0) +#define ACTOR_AUDIO_FLAG_SFX_ACTOR_POS_2 (1 << 1) // identical behavior to ACTOR_AUDIO_FLAG_SFX_ACTOR_POS_1 +#define ACTOR_AUDIO_FLAG_SFX_CENTERED_1 (1 << 2) +#define ACTOR_AUDIO_FLAG_SFX_CENTERED_2 (1 << 3) // identical behavior to ACTOR_AUDIO_FLAG_SFX_CENTERED_1 #define ACTOR_AUDIO_FLAG_SFX_TIMER (1 << 4) #define ACTOR_AUDIO_FLAG_SEQ_KAMARO_DANCE (1 << 5) #define ACTOR_AUDIO_FLAG_SEQ_MUSIC_BOX_HOUSE (1 << 6) #define ACTOR_AUDIO_FLAG_SFX_ALL \ - (ACTOR_AUDIO_FLAG_SFX_TIMER | ACTOR_AUDIO_FLAG_SFX_CENTERED_3 | ACTOR_AUDIO_FLAG_SFX_CENTERED_2 | \ - ACTOR_AUDIO_FLAG_SFX_CENTERED_1 | ACTOR_AUDIO_FLAG_SFX_ACTOR_POS) + (ACTOR_AUDIO_FLAG_SFX_TIMER | ACTOR_AUDIO_FLAG_SFX_CENTERED_2 | ACTOR_AUDIO_FLAG_SFX_CENTERED_1 | \ + ACTOR_AUDIO_FLAG_SFX_ACTOR_POS_2 | ACTOR_AUDIO_FLAG_SFX_ACTOR_POS_1) #define ACTOR_AUDIO_FLAG_SEQ_ALL (ACTOR_AUDIO_FLAG_SEQ_MUSIC_BOX_HOUSE | ACTOR_AUDIO_FLAG_SEQ_KAMARO_DANCE) #define ACTOR_AUDIO_FLAG_ALL (ACTOR_AUDIO_FLAG_SFX_ALL | ACTOR_AUDIO_FLAG_SEQ_ALL) @@ -2327,30 +2327,30 @@ void Actor_PlaySfx_SurfaceBomb(PlayState* play, Actor* actor) { } /** - * Play a sfx at the center of the screen using the shared audioFlag system + * Play a sfx at the actor's position using the shared audioFlag system */ -void Actor_PlaySfx_FlaggedCentered1(Actor* actor, u16 sfxId) { +void Actor_PlaySfx_Flagged2(Actor* actor, u16 sfxId) { actor->sfxId = sfxId; actor->audioFlags &= ~ACTOR_AUDIO_FLAG_SFX_ALL; - actor->audioFlags |= ACTOR_AUDIO_FLAG_SFX_CENTERED_1; + actor->audioFlags |= ACTOR_AUDIO_FLAG_SFX_ACTOR_POS_2; } /** * Play a sfx at the center of the screen using the shared audioFlag system */ -void Actor_PlaySfx_FlaggedCentered2(Actor* actor, u16 sfxId) { +void Actor_PlaySfx_FlaggedCentered1(Actor* actor, u16 sfxId) { actor->sfxId = sfxId; actor->audioFlags &= ~ACTOR_AUDIO_FLAG_SFX_ALL; - actor->audioFlags |= ACTOR_AUDIO_FLAG_SFX_CENTERED_2; + actor->audioFlags |= ACTOR_AUDIO_FLAG_SFX_CENTERED_1; } /** * Play a sfx at the center of the screen using the shared audioFlag system */ -void Actor_PlaySfx_FlaggedCentered3(Actor* actor, u16 sfxId) { +void Actor_PlaySfx_FlaggedCentered2(Actor* actor, u16 sfxId) { actor->sfxId = sfxId; actor->audioFlags &= ~ACTOR_AUDIO_FLAG_SFX_ALL; - actor->audioFlags |= ACTOR_AUDIO_FLAG_SFX_CENTERED_3; + actor->audioFlags |= ACTOR_AUDIO_FLAG_SFX_CENTERED_2; } /** @@ -2359,7 +2359,7 @@ void Actor_PlaySfx_FlaggedCentered3(Actor* actor, u16 sfxId) { void Actor_PlaySfx_Flagged(Actor* actor, u16 sfxId) { actor->sfxId = sfxId; actor->audioFlags &= ~ACTOR_AUDIO_FLAG_SFX_ALL; - actor->audioFlags |= ACTOR_AUDIO_FLAG_SFX_ACTOR_POS; + actor->audioFlags |= ACTOR_AUDIO_FLAG_SFX_ACTOR_POS_1; } void Actor_PlaySfx_FlaggedTimer(Actor* actor, s32 timer) { @@ -2781,16 +2781,16 @@ void Actor_UpdateFlaggedAudio(Actor* actor) { s32 sfxId = actor->sfxId; if (sfxId != NA_SE_NONE) { - if (actor->audioFlags & ACTOR_AUDIO_FLAG_SFX_CENTERED_1) { + if (actor->audioFlags & ACTOR_AUDIO_FLAG_SFX_ACTOR_POS_2) { AudioSfx_PlaySfx(sfxId, &actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); - } else if (actor->audioFlags & ACTOR_AUDIO_FLAG_SFX_CENTERED_2) { + } else if (actor->audioFlags & ACTOR_AUDIO_FLAG_SFX_CENTERED_1) { Audio_PlaySfx(sfxId); - } else if (actor->audioFlags & ACTOR_AUDIO_FLAG_SFX_CENTERED_3) { + } else if (actor->audioFlags & ACTOR_AUDIO_FLAG_SFX_CENTERED_2) { Audio_PlaySfx_2(sfxId); } else if (actor->audioFlags & ACTOR_AUDIO_FLAG_SFX_TIMER) { Audio_PlaySfx_AtPosWithChannelIO(&gSfxDefaultPos, NA_SE_SY_TIMER - SFX_FLAG, (sfxId - 1)); - } else if (actor->audioFlags & ACTOR_AUDIO_FLAG_SFX_ACTOR_POS) { + } else if (actor->audioFlags & ACTOR_AUDIO_FLAG_SFX_ACTOR_POS_1) { Audio_PlaySfx_AtPos(&actor->projectedPos, sfxId); } } |
