mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-04 23:14:37 +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:
parent
f181c2f10e
commit
be22b836f6
213 changed files with 1424 additions and 1414 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue