From 1d19f37b26be989e5da58975a5e2a95a0ae7cf4f Mon Sep 17 00:00:00 2001 From: engineer124 <47598039+engineer124@users.noreply.github.com> Date: Sat, 30 Jul 2022 07:05:27 -0600 Subject: Rename "Sound" to "Sfx" (#1292) * First attempt * More * rename * more sound -> sfx / sound effect (#7) * PR Suggestions * PR Suggestions * Small fix Co-authored-by: Dragorn421 Co-authored-by: fig02 --- docs/tutorial/other_functions.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'docs/tutorial') diff --git a/docs/tutorial/other_functions.md b/docs/tutorial/other_functions.md index f3381be80..1def96861 100644 --- a/docs/tutorial/other_functions.md +++ b/docs/tutorial/other_functions.md @@ -502,7 +502,7 @@ void EnJj_Update(EnJj *this, PlayState *play) { } else { this->actionFunc(this); if (this->skelAnime.curFrame == 41.0f) { - Audio_PlayActorSound2((Actor *) this, (u16)0x28B6U); + Audio_PlayActorSfx2((Actor *) this, (u16)0x28B6U); } } func_80A87B1C(this); @@ -526,7 +526,7 @@ void EnJj_Update(Actor *thisx, PlayState *play) { } else { this->actionFunc(this, play); if (this->skelAnime.curFrame == 41.0f) { - Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_JABJAB_GROAN); + Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_JABJAB_GROAN); } } func_80A87B1C(this); @@ -687,7 +687,7 @@ void func_80A87D94(EnJj *this, PlayState *play) { } } if ((phi_v1 & 1) != 0) { - Audio_PlayActorSound2((Actor *) this, (u16)0x206DU); + Audio_PlayActorSfx2((Actor *) this, (u16)0x206DU); temp_v0_2 = this->unk_308; if ((s32) temp_v0_2 >= -0x1450) { this->unk_308 = temp_v0_2 - 0x66; @@ -763,7 +763,7 @@ void func_80A87D94(EnJj *this, PlayState *play) { break; } if ((phi_v1 & 1) != 0) { - Audio_PlayActorSound2((Actor *) this, (u16)0x206DU); + Audio_PlayActorSfx2((Actor *) this, (u16)0x206DU); temp_v0_2 = this->unk_308; if ((s32) temp_v0_2 >= -0x1450) { this->unk_308 = temp_v0_2 - 0x66; @@ -771,9 +771,9 @@ void func_80A87D94(EnJj *this, PlayState *play) { } } ``` -(notice that this time we need a `default` to deal with the innermost if contents). If you try to replace `0x206D` in the `Audio_PlayActorSound2`, you will find there is no such sfxId in the list: this is because some sound effects have an extra offset of `0x800` to do with setting flags. Adding `0x800` to the sfxId shows that this sound effect is `NA_SE_EV_JABJAB_BREATHE`. To correct this to the id in the function, we have a macro `SFX_FLAG`, and it should therefore be +(notice that this time we need a `default` to deal with the innermost if contents). If you try to replace `0x206D` in the `Audio_PlayActorSfx2`, you will find there is no such sfxId in the list: this is because some sound effects have an extra offset of `0x800` to do with setting flags. Adding `0x800` to the sfxId shows that this sound effect is `NA_SE_EV_JABJAB_BREATHE`. To correct this to the id in the function, we have a macro `SFX_FLAG`, and it should therefore be ```C -Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_JABJAB_BREATHE - SFX_FLAG); +Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_JABJAB_BREATHE - SFX_FLAG); ``` As usual, most of the remaining temps look fake. The only one that does not is possibly `phi_v1`. However, the way in which they are used here makes it hard to tell if they are fake, and if so, how to replace them. I encourage you to try this yourself, with the aid of the diff script; the final, matching result, with other cleanup, is hidden below @@ -814,7 +814,7 @@ void func_80A87D94(EnJj* this, PlayState* play) { break; } if ((this->unk_30A & 1) != 0) { - Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_JABJAB_BREATHE - SFX_FLAG); + Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_JABJAB_BREATHE - SFX_FLAG); if (this->unk_308 >= -5200) { this->unk_308 -= 102; } -- cgit v1.2.3