Removed SetWalkingIntoSignVars per https://github.com/rh-hideout/pokeemerald-expansion/pull/5044\#discussion_r1712963824
This commit is contained in:
parent
c3c433439e
commit
4387b6ef70
4 changed files with 7 additions and 20 deletions
|
@ -36,4 +36,7 @@ const u8 *GetCoordEventScriptAtMapPosition(struct MapPosition *position);
|
|||
void ClearPoisonStepCounter(void);
|
||||
void CancelSignPostMessageBox(struct FieldInput *input);
|
||||
|
||||
#define NOT_SIGNPOST 0
|
||||
#define WALK_AWAY_SIGNPOST_FRAMES 6
|
||||
|
||||
#endif // GUARD_FIELDCONTROLAVATAR_H
|
||||
|
|
|
@ -66,7 +66,4 @@ void SetMovingNpcId(u16 npcId);
|
|||
extern u8 sMsgIsSignPost;
|
||||
extern u8 sMsgBoxIsCancelable;
|
||||
|
||||
void SetWalkingIntoSignVars(void);
|
||||
bool32 CanWalkAwayToCancelMsgBox(void);
|
||||
|
||||
#endif // GUARD_SCRIPT_H
|
||||
|
|
|
@ -44,8 +44,6 @@ static EWRAM_DATA u16 sPrevMetatileBehavior = 0;
|
|||
|
||||
u8 gSelectedObjectEvent;
|
||||
|
||||
#define NOT_SIGNPOST 0
|
||||
|
||||
static void GetPlayerPosition(struct MapPosition *);
|
||||
static void GetInFrontOfPlayerPosition(struct MapPosition *);
|
||||
static u16 GetPlayerCurMetatileBehavior(int);
|
||||
|
@ -1129,7 +1127,8 @@ static u32 GetFacingSignpostType(u16 metatileBehavior, u32 playerDirection)
|
|||
|
||||
static void SetMsgSignPostAndVarFacing(u32 playerDirection)
|
||||
{
|
||||
SetWalkingIntoSignVars();
|
||||
gWalkAwayFromSignpostTimer = WALK_AWAY_SIGNPOST_FRAMES;
|
||||
sMsgBoxIsCancelable = TRUE;
|
||||
sMsgIsSignPost = TRUE;
|
||||
gSpecialVar_Facing = playerDirection;
|
||||
}
|
||||
|
@ -1176,8 +1175,8 @@ void CancelSignPostMessageBox(struct FieldInput *input)
|
|||
return;
|
||||
}
|
||||
|
||||
if (!CanWalkAwayToCancelMsgBox())
|
||||
return;
|
||||
if (!sMsgBoxIsCancelable)
|
||||
return;
|
||||
|
||||
if (IsDpadPushedToTurnOrMovePlayer(input))
|
||||
{
|
||||
|
|
12
src/script.c
12
src/script.c
|
@ -505,15 +505,3 @@ void InitRamScript_NoObjectEvent(u8 *script, u16 scriptSize)
|
|||
#endif //FREE_MYSTERY_EVENT_BUFFERS
|
||||
}
|
||||
|
||||
#define WALK_AWAY_SIGNPOST_FRAMES 6
|
||||
|
||||
void SetWalkingIntoSignVars(void)
|
||||
{
|
||||
gWalkAwayFromSignpostTimer = WALK_AWAY_SIGNPOST_FRAMES;
|
||||
sMsgBoxIsCancelable = TRUE;
|
||||
}
|
||||
|
||||
bool32 CanWalkAwayToCancelMsgBox(void)
|
||||
{
|
||||
return sMsgBoxIsCancelable;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue