1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-21 06:21:16 +00:00

Document code_8006BA00 (Audio Sound Sources) (#997)

* Document SoundSources

* PR Suggestions

* Duration timers to dec

* `PlaySfxByPosAndId` -> `PlaySoundByPosition`

* Improve names

* `PlaySfxAtStationaryPosition` -> `PlaySfxAtFixedWorldPos` and `originWorldPos` -> `worldPos`

* format
This commit is contained in:
engineer124 2022-01-11 12:31:53 +11:00 committed by GitHub
parent b1d3844325
commit 59e212c197
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
62 changed files with 119 additions and 111 deletions

View file

@ -176,7 +176,7 @@ void func_80B96678(ObjLift* this, GlobalContext* globalCtx) {
}
if ((this->timer & 3) == 3) {
Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.world.pos, 16, NA_SE_EV_BLOCK_SHAKE);
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->dyna.actor.world.pos, 16, NA_SE_EV_BLOCK_SHAKE);
}
}
@ -200,7 +200,7 @@ void func_80B96840(ObjLift* this, GlobalContext* globalCtx) {
if ((this->dyna.actor.floorHeight - this->dyna.actor.world.pos.y) >=
(sMaxFallDistances[(this->dyna.actor.params >> 1) & 1] - 0.001f)) {
func_80B96160(this, globalCtx);
Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.world.pos, 20, NA_SE_EV_BOX_BREAK);
SoundSource_PlaySfxAtFixedWorldPos(globalCtx, &this->dyna.actor.world.pos, 20, NA_SE_EV_BOX_BREAK);
Flags_SetSwitch(globalCtx, (this->dyna.actor.params >> 2) & 0x3F);
Actor_Kill(&this->dyna.actor);
}