diff options
| author | engineer124 <47598039+engineer124@users.noreply.github.com> | 2022-07-30 07:05:27 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-30 09:05:27 -0400 |
| commit | 1d19f37b26be989e5da58975a5e2a95a0ae7cf4f (patch) | |
| tree | d639e556449428403ac6e844cf44a7d7e0f57418 /docs | |
| parent | 1652b7e5d76f4fb71495194f24572010ebf6c961 (diff) | |
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 <Dragorn421@users.noreply.github.com>
Co-authored-by: fig02 <fig02srl@gmail.com>
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/tutorial/other_functions.md | 14 |
1 files changed, 7 insertions, 7 deletions
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; } |
