diff options
Diffstat (limited to 'src/field_specials.c')
-rw-r--r-- | src/field_specials.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/field_specials.c b/src/field_specials.c index cb400dc2d..f7b14dad8 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -21,6 +21,7 @@ #include "constants/species.h" #include "constants/abilities.h" #include "constants/moves.h" +#include "constants/weather.h" #include "text.h" #include "wallclock.h" #include "tv.h" @@ -42,7 +43,7 @@ #define CHAR_DECIMAL_SEPARATOR CHAR_COMMA #endif -extern struct WarpData gUnknown_020297F0; +extern struct WarpData gLastUsedWarp; extern u8 gBattleOutcome; extern u16 gSpecialVar_0x8004; extern u16 gSpecialVar_0x8005; @@ -207,7 +208,7 @@ u16 GetRecordedCyclingRoadResults(void) { } void UpdateCyclingRoadState(void) { - if (gUnknown_020297F0.mapNum == MAP_NUM(ROUTE110_SEASIDE_CYCLING_ROAD_NORTH_ENTRANCE) && gUnknown_020297F0.mapGroup == MAP_GROUP(ROUTE110_SEASIDE_CYCLING_ROAD_NORTH_ENTRANCE)) + if (gLastUsedWarp.mapNum == MAP_NUM(ROUTE110_SEASIDE_CYCLING_ROAD_NORTH_ENTRANCE) && gLastUsedWarp.mapGroup == MAP_GROUP(ROUTE110_SEASIDE_CYCLING_ROAD_NORTH_ENTRANCE)) { return; } @@ -2009,17 +2010,17 @@ bool8 FoundBlackGlasses(void) void SetRoute119Weather(void) { - if (is_map_type_1_2_3_5_or_6(get_map_type_from_warp0()) != TRUE) + if (is_map_type_1_2_3_5_or_6(GetLastUsedWarpMapType()) != TRUE) { - SetSav1Weather(0x14); + SetSav1Weather(WEATHER_ROUTE119_CYCLE); } } void SetRoute123Weather(void) { - if (is_map_type_1_2_3_5_or_6(get_map_type_from_warp0()) != TRUE) + if (is_map_type_1_2_3_5_or_6(GetLastUsedWarpMapType()) != TRUE) { - SetSav1Weather(0x15); + SetSav1Weather(WEATHER_ROUTE123_CYCLE); } } @@ -2027,13 +2028,12 @@ u8 GetLeadMonIndex(void) { u8 i; u8 partyCount = CalculatePlayerPartyCount(); - for (i=0; i<partyCount; i++) + for (i = 0; i < partyCount; i++) { if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) != SPECIES_EGG && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) != 0) - { return i; - } } + return 0; } |