pkmnsnfrn 2024-08-11 17:49:07 -07:00
parent b39258ebce
commit 846e8a29da
4 changed files with 7 additions and 10 deletions

View file

@ -63,10 +63,12 @@ void InitRamScript_NoObjectEvent(u8 *script, u16 scriptSize);
// srccmd.h // srccmd.h
void SetMovingNpcId(u16 npcId); void SetMovingNpcId(u16 npcId);
extern u8 sMsgIsSignPost;
extern u8 sMsgBoxIsCancelable;
void SetWalkingIntoSignVars(void); void SetWalkingIntoSignVars(void);
void MsgSetSignPost(void); void MsgSetSignPost(void);
void ResetFacingNpcOrSignPostVars(void); void ResetFacingNpcOrSignPostVars(void);
bool32 IsMsgSignPost(void);
bool32 CanWalkAwayToCancelMsgBox(void); bool32 CanWalkAwayToCancelMsgBox(void);
void ClearMsgBoxCancelableState(void); void ClearMsgBoxCancelableState(void);

View file

@ -32,7 +32,7 @@ static void Task_DrawFieldMessage(u8 taskId)
switch (task->tState) switch (task->tState)
{ {
case 0: case 0:
if (IsMsgSignPost()) if (sMsgIsSignPost)
LoadSignPostWindowFrameGfx(); LoadSignPostWindowFrameGfx();
else else
LoadMessageBoxAndBorderGfx(); LoadMessageBoxAndBorderGfx();

View file

@ -328,7 +328,7 @@ static void WindowFunc_DrawSignFrame(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 wi
static inline void *GetWindowFunc_DialogueFrame(void) static inline void *GetWindowFunc_DialogueFrame(void)
{ {
return (IsMsgSignPost() ? WindowFunc_DrawSignFrame : WindowFunc_DrawDialogueFrame); return (sMsgIsSignPost ? WindowFunc_DrawSignFrame : WindowFunc_DrawDialogueFrame);
} }
void DrawDialogueFrame(u8 windowId, bool8 copyToVram) void DrawDialogueFrame(u8 windowId, bool8 copyToVram)

View file

@ -27,8 +27,8 @@ static u8 sGlobalScriptContextStatus;
static struct ScriptContext sGlobalScriptContext; static struct ScriptContext sGlobalScriptContext;
static struct ScriptContext sImmediateScriptContext; static struct ScriptContext sImmediateScriptContext;
static bool8 sLockFieldControls; static bool8 sLockFieldControls;
static u8 sMsgIsSignPost; EWRAM_DATA u8 sMsgIsSignPost = FALSE;
static u8 sMsgBoxIsCancelable; EWRAM_DATA u8 sMsgBoxIsCancelable = FALSE;
extern ScrCmdFunc gScriptCmdTable[]; extern ScrCmdFunc gScriptCmdTable[];
extern ScrCmdFunc gScriptCmdTableEnd[]; extern ScrCmdFunc gScriptCmdTableEnd[];
@ -513,11 +513,6 @@ void SetWalkingIntoSignVars(void)
sMsgBoxIsCancelable = TRUE; sMsgBoxIsCancelable = TRUE;
} }
bool32 IsMsgSignPost(void)
{
return sMsgIsSignPost;
}
void ResetFacingNpcOrSignPostVars(void) void ResetFacingNpcOrSignPostVars(void)
{ {
sMsgIsSignPost = FALSE; sMsgIsSignPost = FALSE;