mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-07 23:10:22 +00:00
Decompile 2 small files (code_8006BA00.c and code_8006C3A0.c) (#101)
* Decompile code_8006C3A0.c (handling "env" flags) * Decompile code_8006BA00.c (handling sound sources)
This commit is contained in:
parent
d0ba37b148
commit
4932e93ba2
31 changed files with 143 additions and 296 deletions
|
@ -81,7 +81,7 @@ void func_808AE5A8(BgSpot05Soko* this, GlobalContext* globalCtx) {
|
|||
void func_808AE5B4(BgSpot05Soko* this, GlobalContext* globalCtx) {
|
||||
Actor* thisx = &this->dyna.actor;
|
||||
if (Flags_GetSwitch(globalCtx, this->switchFlag)) {
|
||||
Audio_PlaySoundAtPosition(globalCtx, &thisx->posRot.pos, 0x1E, NA_SE_EV_METALDOOR_CLOSE);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &thisx->posRot.pos, 30, NA_SE_EV_METALDOOR_CLOSE);
|
||||
Actor_SetHeight(thisx, 50.0f);
|
||||
func_80080480(globalCtx, thisx);
|
||||
this->actionFunc = func_808AE630;
|
||||
|
|
|
@ -263,7 +263,7 @@ void func_808BB0AC(BgTokiSwd* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_808BB128(BgTokiSwd* this, GlobalContext* globalCtx) {
|
||||
if ((func_8006C4A4(globalCtx, 1) != 0) && (globalCtx->unk_11D30[0] < 0xFF)) {
|
||||
if (Flags_GetEnv(globalCtx, 1) && (globalCtx->unk_11D30[0] < 0xFF)) {
|
||||
globalCtx->unk_11D30[0] += 5;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ void func_8097C8A8(DemoGo* this, GlobalContext* globalCtx) {
|
|||
|
||||
if ((thisx->params == 0) || (thisx->params == 1)) {
|
||||
func_800A6E10(&globalCtx->mf_11D60, &thisx->posRot.pos, &sp20, &sp1C);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &sp20, 0x14, 0x28A0);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &sp20, 20, 0x28A0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ void DoorAna_Update_Hidden(DoorAna* this, GlobalContext* globalCtx) {
|
|||
bool openGrotto = false;
|
||||
if ((this->actor.params & 0x200) == 0) {
|
||||
// opening with song of storms
|
||||
if (this->actor.waterSurfaceDist < 40000.0f && func_8006C4A4(globalCtx, 5) != 0) {
|
||||
if (this->actor.waterSurfaceDist < 40000.0f && Flags_GetEnv(globalCtx, 5)) {
|
||||
openGrotto = true;
|
||||
this->actor.flags &= ~0x10;
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ void EnOkarinaEffect_TriggerStorm(EnOkarinaEffect* this, GlobalContext* globalCt
|
|||
}
|
||||
|
||||
void EnOkarinaEffect_ManageStorm(EnOkarinaEffect* this, GlobalContext* globalCtx) {
|
||||
func_8006C438(globalCtx, 5); // clear bean grow env flag
|
||||
Flags_UnsetEnv(globalCtx, 5); // clear storms env flag
|
||||
if (((globalCtx->pauseCtx.state == 0) && (globalCtx->unk_10A20 == 0) && (globalCtx->msgCtx.unk_E300 == 0) &&
|
||||
(func_800C0D28(globalCtx) == 0) && ((globalCtx->transitionMode == 0) || (gSaveContext.gameMode != 0))) ||
|
||||
(this->timer >= 250)) {
|
||||
|
@ -84,7 +84,7 @@ void EnOkarinaEffect_ManageStorm(EnOkarinaEffect* this, GlobalContext* globalCtx
|
|||
if (this->timer == 308) {
|
||||
// "Let's grow some beans"
|
||||
osSyncPrintf("\n\n\n豆よ のびろ 指定\n\n\n");
|
||||
func_8006C3D0(globalCtx, 5); // set bean grow env flag
|
||||
Flags_SetEnv(globalCtx, 5); // set storms env flag
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1930,7 +1930,7 @@ void func_80AEF40C(EnRu1* this) {
|
|||
}
|
||||
|
||||
void func_80AEF4A8(EnRu1* this, GlobalContext* globalCtx) {
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.unk_E4, 0x14, NA_SE_VO_RT_FALL);
|
||||
Audio_PlaySoundAtPosition(globalCtx, &this->actor.unk_E4, 20, NA_SE_VO_RT_FALL);
|
||||
}
|
||||
|
||||
void func_80AEF4E0(EnRu1* this) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue