Fix Lab Man actor breaking and the invisible UI glitch (#4599)

* fix Lab Man actor breaking and the invisible UI glitch

* address review
This commit is contained in:
Pepper0ni 2024-12-01 01:59:13 +00:00 committed by GitHub
parent 573d846cd7
commit ee628059d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 5 deletions

View File

@ -51,6 +51,7 @@ extern "C" {
#include "src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.h"
#include "src/overlays/actors/ovl_En_Xc/z_en_xc.h"
#include "src/overlays/actors/ovl_Fishing/z_fishing.h"
#include "src/overlays/actors/ovl_En_Mk/z_en_mk.h"
#include "adult_trade_shuffle.h"
#include "draw.h"
@ -60,6 +61,7 @@ extern void func_8084DFAC(PlayState* play, Player* player);
extern void Player_SetupActionPreserveAnimMovement(PlayState* play, Player* player, PlayerActionFunc actionFunc, s32 flags);
extern s32 Player_SetupWaitForPutAway(PlayState* play, Player* player, AfterPutAwayFunc func);
extern void Play_InitEnvironment(PlayState * play, s16 skyboxId);
extern void EnMk_Wait(EnMk* enMk, PlayState* play);
}
#define RAND_GET_OPTION(option) Rando::Context::GetInstance()->GetOption(option).GetContextOptionIndex()
@ -860,7 +862,8 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_l
// This is typically called when you close the text box after getting an item, in case a previous
// function hid the interface.
Interface_ChangeAlpha(gSaveContext.unk_13EE);
gSaveContext.unk_13EA = 0;
Interface_ChangeAlpha(0x32);
// EnItem00_SetupAction(item00, func_8001E5C8);
// *should = false;
} else if (item00->actor.params == ITEM00_SOH_GIVE_ITEM_ENTRY_GI) {
@ -1399,9 +1402,17 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_l
}
break;
}
case VB_TRADE_TIMER_EYEDROPS:{
EnMk* enMk = va_arg(args, EnMk*);
Flags_SetRandomizerInf(RAND_INF_ADULT_TRADES_LH_TRADE_FROG);
enMk->actor.flags &= ~ACTOR_FLAG_WILL_TALK;
enMk->actionFunc = EnMk_Wait;
enMk->flags |= 1;
*should = false;
break;
}
case VB_FREEZE_ON_SKULL_TOKEN:
case VB_TRADE_TIMER_ODD_MUSHROOM:
case VB_TRADE_TIMER_EYEDROPS:
case VB_TRADE_TIMER_FROG:
case VB_ANJU_SET_OBTAINED_TRADE_ITEM:
case VB_GIVE_ITEM_FROM_TARGET_IN_WOODS:

View File

@ -98,9 +98,8 @@ void func_80AACA40(EnMk* this, PlayState* play) {
void func_80AACA94(EnMk* this, PlayState* play) {
if (Actor_HasParent(&this->actor, play) != 0 || !GameInteractor_Should(VB_TRADE_FROG, true, this)) {
this->actor.parent = NULL;
this->actionFunc = func_80AACA40;
Flags_SetRandomizerInf(RAND_INF_ADULT_TRADES_LH_TRADE_FROG);
if (GameInteractor_Should(VB_TRADE_TIMER_EYEDROPS, true)) {
if (GameInteractor_Should(VB_TRADE_TIMER_EYEDROPS, true, this)) {
this->actionFunc = func_80AACA40;
func_80088AA0(240);
gSaveContext.eventInf[1] &= ~1;
}