1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-13 04:39:36 +00:00

Made suggested changes to ovl_Bg_Toki_Swd

This commit is contained in:
shawlucas 2020-03-21 18:08:45 -07:00
parent 9a04a76296
commit f1ae94c2f3

View file

@ -394,7 +394,7 @@ static void func_808BAF40(BgTokiSwd* this, GlobalContext* globalCtx)
{ {
if (LINK_IS_CHILD) if (LINK_IS_CHILD)
{ {
Item_Give(globalCtx, 0x3C); Item_Give(globalCtx, ITEM_SWORD_MASTER);
globalCtx->csCtx.segment = D_808BB2F0; globalCtx->csCtx.segment = D_808BB2F0;
} }
else else
@ -403,7 +403,7 @@ static void func_808BAF40(BgTokiSwd* this, GlobalContext* globalCtx)
} }
Audio_SetBGM(NA_BGM_STOP); Audio_SetBGM(NA_BGM_STOP);
Audio_SetBGM(NA_SE_PL_BOUND_DIRT); Audio_SetBGM(NA_SE_PL_BOUND_DIRT);
gSaveContext.cutscene_trigger = (u8)1; gSaveContext.cutscene_trigger = 1;
this->actor.attachedA = 0; this->actor.attachedA = 0;
BgTokiSwd_SetupAction(this, func_808BB0AC); BgTokiSwd_SetupAction(this, func_808BB0AC);
} }
@ -419,11 +419,13 @@ static void func_808BAF40(BgTokiSwd* this, GlobalContext* globalCtx)
{ {
if (globalCtx->unk_11D30[0] > 0) if (globalCtx->unk_11D30[0] > 0)
{ {
globalCtx->unk_11D30[0] = globalCtx->unk_11D30[0] - 1; globalCtx->unk_11D30[0]--;
return;
} }
else
{
globalCtx->unk_11D30[0] = 0; globalCtx->unk_11D30[0] = 0;
} }
}
} }
static void func_808BB0AC(BgTokiSwd* this, GlobalContext* globalCtx) static void func_808BB0AC(BgTokiSwd* this, GlobalContext* globalCtx)
@ -453,7 +455,7 @@ static void func_808BB128(BgTokiSwd* this, GlobalContext* globalCtx)
{ {
if ((func_8006C4A4(globalCtx, 1) != 0) && (globalCtx->unk_11D30[0] < 0xFF)) if ((func_8006C4A4(globalCtx, 1) != 0) && (globalCtx->unk_11D30[0] < 0xFF))
{ {
globalCtx->unk_11D30[0] = globalCtx->unk_11D30[0] + 5; globalCtx->unk_11D30[0]+= 5;
} }
} }