This commit is contained in:
pkmnsnfrn 2024-08-11 18:01:52 -07:00
parent 846e8a29da
commit c3c433439e
4 changed files with 4 additions and 22 deletions

View file

@ -67,9 +67,6 @@ extern u8 sMsgIsSignPost;
extern u8 sMsgBoxIsCancelable;
void SetWalkingIntoSignVars(void);
void MsgSetSignPost(void);
void ResetFacingNpcOrSignPostVars(void);
bool32 CanWalkAwayToCancelMsgBox(void);
void ClearMsgBoxCancelableState(void);
#endif // GUARD_SCRIPT_H

View file

@ -162,7 +162,7 @@ int ProcessPlayerFieldInput(struct FieldInput *input)
gSpecialVar_LastTalked = 0;
gSelectedObjectEvent = 0;
ResetFacingNpcOrSignPostVars();
sMsgIsSignPost = FALSE;
playerDirection = GetPlayerFacingDirection();
GetPlayerPosition(&position);
metatileBehavior = MapGridGetMetatileBehaviorAt(position.x, position.y);
@ -1130,7 +1130,7 @@ static u32 GetFacingSignpostType(u16 metatileBehavior, u32 playerDirection)
static void SetMsgSignPostAndVarFacing(u32 playerDirection)
{
SetWalkingIntoSignVars();
MsgSetSignPost();
sMsgIsSignPost = TRUE;
gSpecialVar_Facing = playerDirection;
}

View file

@ -1290,7 +1290,7 @@ bool8 ScrCmd_releaseall(struct ScriptContext *ctx)
ObjectEventClearHeldMovementIfFinished(&gObjectEvents[playerObjectId]);
ScriptMovement_UnfreezeObjectEvents();
UnfreezeObjectEvents();
ClearMsgBoxCancelableState();
sMsgBoxIsCancelable = FALSE;
return FALSE;
}
@ -1309,7 +1309,7 @@ bool8 ScrCmd_release(struct ScriptContext *ctx)
ObjectEventClearHeldMovementIfFinished(&gObjectEvents[playerObjectId]);
ScriptMovement_UnfreezeObjectEvents();
UnfreezeObjectEvents();
ClearMsgBoxCancelableState();
sMsgBoxIsCancelable = FALSE;
return FALSE;
}

View file

@ -513,21 +513,6 @@ void SetWalkingIntoSignVars(void)
sMsgBoxIsCancelable = TRUE;
}
void ResetFacingNpcOrSignPostVars(void)
{
sMsgIsSignPost = FALSE;
}
void MsgSetSignPost(void)
{
sMsgIsSignPost = TRUE;
}
void ClearMsgBoxCancelableState(void)
{
sMsgBoxIsCancelable = FALSE;
}
bool32 CanWalkAwayToCancelMsgBox(void)
{
return sMsgBoxIsCancelable;