diff --git a/include/script.h b/include/script.h index 9c778c395d..1f3c4f7afb 100644 --- a/include/script.h +++ b/include/script.h @@ -63,7 +63,7 @@ void InitRamScript_NoObjectEvent(u8 *script, u16 scriptSize); // srccmd.h void SetMovingNpcId(u16 npcId); -extern u8 sMsgIsSignPost; -extern u8 sMsgBoxIsCancelable; +extern u8 gMsgIsSignPost; +extern u8 gMsgBoxIsCancelable; #endif // GUARD_SCRIPT_H diff --git a/src/field_control_avatar.c b/src/field_control_avatar.c index 05060825fa..b64301e670 100644 --- a/src/field_control_avatar.c +++ b/src/field_control_avatar.c @@ -160,7 +160,7 @@ int ProcessPlayerFieldInput(struct FieldInput *input) gSpecialVar_LastTalked = 0; gSelectedObjectEvent = 0; - sMsgIsSignPost = FALSE; + gMsgIsSignPost = FALSE; playerDirection = GetPlayerFacingDirection(); GetPlayerPosition(&position); metatileBehavior = MapGridGetMetatileBehaviorAt(position.x, position.y); @@ -1128,8 +1128,8 @@ static u32 GetFacingSignpostType(u16 metatileBehavior, u32 playerDirection) static void SetMsgSignPostAndVarFacing(u32 playerDirection) { gWalkAwayFromSignpostTimer = WALK_AWAY_SIGNPOST_FRAMES; - sMsgBoxIsCancelable = TRUE; - sMsgIsSignPost = TRUE; + gMsgBoxIsCancelable = TRUE; + gMsgIsSignPost = TRUE; gSpecialVar_Facing = playerDirection; } @@ -1175,7 +1175,7 @@ void CancelSignPostMessageBox(struct FieldInput *input) return; } - if (!sMsgBoxIsCancelable) + if (!gMsgBoxIsCancelable) return; if (IsDpadPushedToTurnOrMovePlayer(input)) diff --git a/src/field_message_box.c b/src/field_message_box.c index c0fc1004e9..569f067caa 100755 --- a/src/field_message_box.c +++ b/src/field_message_box.c @@ -32,7 +32,7 @@ static void Task_DrawFieldMessage(u8 taskId) switch (task->tState) { case 0: - if (sMsgIsSignPost) + if (gMsgIsSignPost) LoadSignPostWindowFrameGfx(); else LoadMessageBoxAndBorderGfx(); diff --git a/src/menu.c b/src/menu.c index 20b8c4dd97..d9b331a8b2 100644 --- a/src/menu.c +++ b/src/menu.c @@ -328,7 +328,7 @@ static void WindowFunc_DrawSignFrame(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 wi static inline void *GetWindowFunc_DialogueFrame(void) { - return (sMsgIsSignPost ? WindowFunc_DrawSignFrame : WindowFunc_DrawDialogueFrame); + return (gMsgIsSignPost ? WindowFunc_DrawSignFrame : WindowFunc_DrawDialogueFrame); } void DrawDialogueFrame(u8 windowId, bool8 copyToVram) diff --git a/src/scrcmd.c b/src/scrcmd.c index 69c9d961b6..23b42b7acd 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -1290,7 +1290,7 @@ bool8 ScrCmd_releaseall(struct ScriptContext *ctx) ObjectEventClearHeldMovementIfFinished(&gObjectEvents[playerObjectId]); ScriptMovement_UnfreezeObjectEvents(); UnfreezeObjectEvents(); - sMsgBoxIsCancelable = FALSE; + gMsgBoxIsCancelable = FALSE; return FALSE; } @@ -1309,7 +1309,7 @@ bool8 ScrCmd_release(struct ScriptContext *ctx) ObjectEventClearHeldMovementIfFinished(&gObjectEvents[playerObjectId]); ScriptMovement_UnfreezeObjectEvents(); UnfreezeObjectEvents(); - sMsgBoxIsCancelable = FALSE; + gMsgBoxIsCancelable = FALSE; return FALSE; } diff --git a/src/script.c b/src/script.c index 276163bbb6..7b1af3d542 100644 --- a/src/script.c +++ b/src/script.c @@ -27,8 +27,8 @@ static u8 sGlobalScriptContextStatus; static struct ScriptContext sGlobalScriptContext; static struct ScriptContext sImmediateScriptContext; static bool8 sLockFieldControls; -EWRAM_DATA u8 sMsgIsSignPost = FALSE; -EWRAM_DATA u8 sMsgBoxIsCancelable = FALSE; +EWRAM_DATA u8 gMsgIsSignPost = FALSE; +EWRAM_DATA u8 gMsgBoxIsCancelable = FALSE; extern ScrCmdFunc gScriptCmdTable[]; extern ScrCmdFunc gScriptCmdTableEnd[];