summaryrefslogtreecommitdiff
path: root/docs/tutorial
diff options
context:
space:
mode:
authorengineer124 <47598039+engineer124@users.noreply.github.com>2022-12-18 23:18:21 -0500
committerGitHub <noreply@github.com>2022-12-18 23:18:21 -0500
commitbe22b836f6161c455bb1e9f698bc3ac50ec1bf25 (patch)
tree3d67e9dce88e6105251d9a6401f540425d337d85 /docs/tutorial
parentf181c2f10eb500bf366e4da3d0ed08ac4d97a713 (diff)
Name `Actor_PlaySfx` and `Player_PlaySfx` (#1469)
* name two main actor sfx functions * adjust comments * fix double s in player * fix commas
Diffstat (limited to 'docs/tutorial')
-rw-r--r--docs/tutorial/other_functions.md14
1 files changed, 7 insertions, 7 deletions
diff --git a/docs/tutorial/other_functions.md b/docs/tutorial/other_functions.md
index 1def96861..fd8878d28 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_PlayActorSfx2((Actor *) this, (u16)0x28B6U);
+ Actor_PlaySfx((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_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_JABJAB_GROAN);
+ Actor_PlaySfx(&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_PlayActorSfx2((Actor *) this, (u16)0x206DU);
+ Actor_PlaySfx((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_PlayActorSfx2((Actor *) this, (u16)0x206DU);
+ Actor_PlaySfx((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_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
+(notice that this time we need a `default` to deal with the innermost if contents). If you try to replace `0x206D` in the `Actor_PlaySfx`, 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_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_JABJAB_BREATHE - SFX_FLAG);
+Actor_PlaySfx(&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_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_JABJAB_BREATHE - SFX_FLAG);
+ Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_JABJAB_BREATHE - SFX_FLAG);
if (this->unk_308 >= -5200) {
this->unk_308 -= 102;
}