@ -167,6 +167,7 @@ void func_8083CA20(GlobalContext* globalCtx, Player* this);
void func_8083CA54 ( GlobalContext * globalCtx , Player * this ) ;
void func_8083CA9C ( GlobalContext * globalCtx , Player * this ) ;
s32 func_8083E0FC ( Player * this , GlobalContext * globalCtx ) ;
void Player_SetPendingFlag ( Player * this , GlobalContext * globalCtx ) ;
s32 func_8083E5A8 ( Player * this , GlobalContext * globalCtx ) ;
s32 func_8083EB44 ( Player * this , GlobalContext * globalCtx ) ;
s32 func_8083F7BC ( Player * this , GlobalContext * globalCtx ) ;
@ -6231,6 +6232,30 @@ void func_8083E4C4(GlobalContext* globalCtx, Player* this, GetItemEntry* giEntry
func_80078884 ( ( this - > getItemId < 0 ) ? NA_SE_SY_GET_BOXITEM : NA_SE_SY_GET_ITEM ) ;
}
// Sets a flag according to which type of flag is specified in player->pendingFlag.flagType
// and which flag is specified in player->pendingFlag.flagID.
void Player_SetPendingFlag ( Player * this , GlobalContext * globalCtx ) {
switch ( this - > pendingFlag . flagType ) {
case FLAG_SCENE_CLEAR :
Flags_SetClear ( globalCtx , this - > pendingFlag . flagID ) ;
break ;
case FLAG_SCENE_COLLECTIBLE :
Flags_SetCollectible ( globalCtx , this - > pendingFlag . flagID ) ;
break ;
case FLAG_SCENE_SWITCH :
Flags_SetSwitch ( globalCtx , this - > pendingFlag . flagID ) ;
break ;
case FLAG_SCENE_TREASURE :
Flags_SetTreasure ( globalCtx , this - > pendingFlag . flagID ) ;
break ;
case FLAG_NONE :
default :
break ;
}
this - > pendingFlag . flagType = FLAG_NONE ;
this - > pendingFlag . flagID = 0 ;
}
s32 func_8083E5A8 ( Player * this , GlobalContext * globalCtx ) {
Actor * interactedActor ;
@ -6254,6 +6279,7 @@ s32 func_8083E5A8(Player* this, GlobalContext* globalCtx) {
this - > stateFlags1 & = ~ ( PLAYER_STATE1_10 | PLAYER_STATE1_11 ) ;
this - > actor . colChkInfo . damage = 0 ;
func_80837C0C ( globalCtx , this , 3 , 0.0f , 0.0f , 0 , 20 ) ;
Player_SetPendingFlag ( this , globalCtx ) ;
return ;
}
@ -12659,6 +12685,8 @@ s32 func_8084DFF4(GlobalContext* globalCtx, Player* this) {
Message_StartTextbox ( globalCtx , giEntry - > textId , & this - > actor ) ;
Item_Give ( globalCtx , giEntry - > itemId ) ;
Player_SetPendingFlag ( this , globalCtx ) ;
if ( ( ( this - > getItemId > = GI_RUPEE_GREEN ) & & ( this - > getItemId < = GI_RUPEE_RED ) ) | |
( ( this - > getItemId > = GI_RUPEE_PURPLE ) & & ( this - > getItemId < = GI_RUPEE_GOLD ) ) | |