diff --git a/include/config/overworld.h b/include/config/overworld.h index aeaf88be58..292743a211 100644 --- a/include/config/overworld.h +++ b/include/config/overworld.h @@ -3,7 +3,7 @@ // Movement config #define OW_RUNNING_INDOORS GEN_LATEST // In Gen4+, players are allowed to run indoors. -#define OW_AUTO_SIGNPOST TRUE // When enabled, if the tile that the player is facing has MB_SIGNPOST, the player will automatically read the signpost. +#define OW_AUTO_SIGNPOST TRUE // When enabled, if the tile that the player is facing has MB_SIGNPOST, MB_POKEMART_SIGN, or MB_POKEMON_CENTER_SIGN, the player will automatically read the signpost. // Other settings #define OW_POISON_DAMAGE GEN_LATEST // In Gen4, Pokémon no longer faint from Poison in the overworld. In Gen5+, they no longer take damage at all. diff --git a/include/event_scripts.h b/include/event_scripts.h index f23f52cb12..7ec15d4548 100644 --- a/include/event_scripts.h +++ b/include/event_scripts.h @@ -647,7 +647,6 @@ extern const u8 VSSeeker_Text_NoTrainersWithinRange[]; extern const u8 VSSeeker_Text_TrainersNotReady[]; extern const u8 EventScript_VsSeekerChargingDone[]; extern const u8 EventScript_CancelMessageBox[]; - extern const u8 Common_EventScript_ShowPokemonCenterSign[]; extern const u8 Common_EventScript_ShowPokemartSign[]; diff --git a/include/graphics.h b/include/graphics.h index 2da00d9804..e58ee7bf50 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -2,9 +2,9 @@ #define GUARD_GRAPHICS_H // overworld -extern const u16 gMessageBox_Pal[]; -extern const u32 gMessageBox_Gfx[]; extern const u32 gSignpostWindow_Gfx[]; +extern const u32 gMessageBox_Gfx[]; +extern const u16 gMessageBox_Pal[]; // pokeballs extern const u32 gBallGfx_Poke[]; diff --git a/include/menu.h b/include/menu.h index 42bd69d45c..d2190fb854 100644 --- a/include/menu.h +++ b/include/menu.h @@ -11,7 +11,6 @@ #define STD_WINDOW_PALETTE_SIZE PLTT_SIZEOF(10) #define STD_WINDOW_BASE_TILE_NUM 0x214 - #define MENU_NOTHING_CHOSEN -2 #define MENU_B_PRESSED -1 diff --git a/include/metatile_behavior.h b/include/metatile_behavior.h index 0c4622adaf..d49dc2459a 100644 --- a/include/metatile_behavior.h +++ b/include/metatile_behavior.h @@ -148,8 +148,8 @@ bool8 MetatileBehavior_IsQuestionnaire(u8); bool8 MetatileBehavior_IsLongGrass_Duplicate(u8); bool8 MetatileBehavior_IsLongGrassSouthEdge(u8); bool8 MetatileBehavior_IsTrainerHillTimer(u8); -bool8 MetatileBehavior_IsSignpost(u8 mb); -bool8 MetatileBehavior_IsPokemonCenterSign(u8 mb); -bool8 MetatileBehavior_IsPokeMartSign(u8 mb); +bool32 MetatileBehavior_IsSignpost(u32 mb); +bool32 MetatileBehavior_IsPokemonCenterSign(u32 mb); +bool32 MetatileBehavior_IsPokeMartSign(u32 mb); #endif // GUARD_METATILE_BEHAVIOR_H diff --git a/src/field_control_avatar.c b/src/field_control_avatar.c index 049305db86..7972be7a11 100644 --- a/src/field_control_avatar.c +++ b/src/field_control_avatar.c @@ -35,6 +35,7 @@ #include "constants/event_objects.h" #include "constants/field_poison.h" #include "constants/map_types.h" +#include "constants/metatile_behaviors.h" #include "constants/songs.h" #include "constants/trainer_hill.h" @@ -43,12 +44,7 @@ static EWRAM_DATA u16 sPrevMetatileBehavior = 0; u8 gSelectedObjectEvent; -#define SIGNPOST_POKECENTER 0 -#define SIGNPOST_POKEMART 1 -#define SIGNPOST_INDIGO_1 2 -#define SIGNPOST_INDIGO_2 3 -#define SIGNPOST_SCRIPTED 240 -#define SIGNPOST_NA 255 +#define SIGNPOST_NA 0 static void GetPlayerPosition(struct MapPosition *); static void GetInFrontOfPlayerPosition(struct MapPosition *); @@ -1110,13 +1106,13 @@ static bool8 TrySetUpWalkIntoSignpostScript(struct MapPosition *position, u16 me switch (GetFacingSignpostType(metatileBehavior, playerDirection)) { - case SIGNPOST_POKECENTER: + case MB_POKEMON_CENTER_SIGN: SetUpWalkIntoSignScript(Common_EventScript_ShowPokemonCenterSign, playerDirection); return TRUE; - case SIGNPOST_POKEMART: + case MB_POKEMART_SIGN: SetUpWalkIntoSignScript(Common_EventScript_ShowPokemartSign, playerDirection); return TRUE; - case SIGNPOST_SCRIPTED: + case MB_SIGNPOST: script = GetSignpostScriptAtMapPosition(position); if (script == NULL) return FALSE; @@ -1130,12 +1126,12 @@ static bool8 TrySetUpWalkIntoSignpostScript(struct MapPosition *position, u16 me static u8 GetFacingSignpostType(u16 metatileBehavior, u8 playerDirection) { if (MetatileBehavior_IsPokemonCenterSign(metatileBehavior) == TRUE) - return SIGNPOST_POKECENTER; + return MB_POKEMON_CENTER_SIGN; if (MetatileBehavior_IsPokeMartSign(metatileBehavior) == TRUE) - return SIGNPOST_POKEMART; + return MB_POKEMART_SIGN; if (MetatileBehavior_IsSignpost(metatileBehavior) == TRUE) - return SIGNPOST_SCRIPTED; + return MB_SIGNPOST; return SIGNPOST_NA; } diff --git a/src/metatile_behavior.c b/src/metatile_behavior.c index 88bca9f0de..fcf8b64fd1 100644 --- a/src/metatile_behavior.c +++ b/src/metatile_behavior.c @@ -1404,7 +1404,7 @@ bool8 MetatileBehavior_IsTrainerHillTimer(u8 metatileBehavior) return FALSE; } -bool8 MetatileBehavior_IsSignpost(u8 mb) +bool32 MetatileBehavior_IsSignpost(u32 mb) { #if OW_AUTO_SIGNPOST == TRUE return (mb == MB_SIGNPOST); @@ -1413,7 +1413,7 @@ bool8 MetatileBehavior_IsSignpost(u8 mb) #endif } -bool8 MetatileBehavior_IsPokemonCenterSign(u8 mb) +bool32 MetatileBehavior_IsPokemonCenterSign(u32 mb) { #if OW_AUTO_SIGNPOST == TRUE return (mb == MB_POKEMON_CENTER_SIGN); @@ -1422,7 +1422,7 @@ bool8 MetatileBehavior_IsPokemonCenterSign(u8 mb) #endif } -bool8 MetatileBehavior_IsPokeMartSign(u8 mb) +bool32 MetatileBehavior_IsPokeMartSign(u32 mb) { #if OW_AUTO_SIGNPOST == TRUE return (mb == MB_POKEMART_SIGN);