Fixed global variable naming conventions
This commit is contained in:
parent
4387b6ef70
commit
30cc06785d
6 changed files with 12 additions and 12 deletions
|
@ -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
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -32,7 +32,7 @@ static void Task_DrawFieldMessage(u8 taskId)
|
|||
switch (task->tState)
|
||||
{
|
||||
case 0:
|
||||
if (sMsgIsSignPost)
|
||||
if (gMsgIsSignPost)
|
||||
LoadSignPostWindowFrameGfx();
|
||||
else
|
||||
LoadMessageBoxAndBorderGfx();
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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[];
|
||||
|
|
Loading…
Reference in a new issue