summaryrefslogtreecommitdiff
path: root/src/field/coord_event_weather.c
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2018-01-04 18:50:53 -0500
committerPikalaxALT <pikalaxalt@gmail.com>2018-01-04 18:50:53 -0500
commiteff6795887cc27f2c5139df9a6da70f4f02338b4 (patch)
treef91be2b0b7194b4ddff13f4935a0edafc4284a43 /src/field/coord_event_weather.c
parent3ea9cff2c67b3db195c3326afc56fa0662c2327a (diff)
parentb1a7733c1cead8ed3d4a58c42d638afd0ead8ab0 (diff)
Merge branch 'master' into unk_text_8095904
Diffstat (limited to 'src/field/coord_event_weather.c')
-rw-r--r--src/field/coord_event_weather.c87
1 files changed, 44 insertions, 43 deletions
diff --git a/src/field/coord_event_weather.c b/src/field/coord_event_weather.c
index 9c5a1ca4d..db4e9c161 100644
--- a/src/field/coord_event_weather.c
+++ b/src/field/coord_event_weather.c
@@ -1,115 +1,116 @@
#include "global.h"
+#include "constants/weather.h"
#include "coord_event_weather.h"
#include "field_weather.h"
struct CoordEventWeather
{
- u8 weather;
+ u8 coordEventWeather;
void (*func)(void);
};
-static void CoordEventWeather_Indoor(void);
+static void CoordEventWeather_Clouds(void);
static void CoordEventWeather_Sunny(void);
-static void CoordEventWeather_Rain(void);
-static void CoordEventWeather_Snowflakes(void);
+static void CoordEventWeather_LightRain(void);
+static void CoordEventWeather_Snow(void);
static void CoordEventWeather_Thunderstorm(void);
static void CoordEventWeather_Fog(void);
static void CoordEventWeather_DiagonalFog(void);
-static void CoordEventWeather_Snow(void);
+static void CoordEventWeather_Ash(void);
static void CoordEventWeather_Sandstorm(void);
-static void CoordEventWeather_Cloudy(void);
+static void CoordEventWeather_Dark(void);
static void CoordEventWeather_Drought(void);
-static void CoordEventWeather_UnderwaterFog(void);
-static void CoordEventWeather_UnderwaterBubbles(void);
+static void CoordEventWeather_Route119Cycle(void);
+static void CoordEventWeather_Route123Cycle(void);
static const struct CoordEventWeather sCoordEventWeatherFuncs[] =
{
- { 0x1, CoordEventWeather_Indoor },
- { 0x2, CoordEventWeather_Sunny },
- { 0x3, CoordEventWeather_Rain },
- { 0x4, CoordEventWeather_Snowflakes },
- { 0x5, CoordEventWeather_Thunderstorm },
- { 0x6, CoordEventWeather_Fog },
- { 0x7, CoordEventWeather_DiagonalFog },
- { 0x8, CoordEventWeather_Snow },
- { 0x9, CoordEventWeather_Sandstorm },
- { 0xa, CoordEventWeather_Cloudy },
- { 0xb, CoordEventWeather_Drought },
- { 0x14, CoordEventWeather_UnderwaterFog },
- { 0x15, CoordEventWeather_UnderwaterBubbles },
+ { COORD_EVENT_WEATHER_CLOUDS, CoordEventWeather_Clouds },
+ { COORD_EVENT_WEATHER_SUNNY, CoordEventWeather_Sunny },
+ { COORD_EVENT_WEATHER_RAIN_LIGHT, CoordEventWeather_LightRain },
+ { COORD_EVENT_WEATHER_SNOW, CoordEventWeather_Snow },
+ { COORD_EVENT_WEATHER_RAIN_MED, CoordEventWeather_Thunderstorm },
+ { COORD_EVENT_WEATHER_FOG_1, CoordEventWeather_Fog },
+ { COORD_EVENT_WEATHER_FOG_2, CoordEventWeather_DiagonalFog },
+ { COORD_EVENT_WEATHER_ASH, CoordEventWeather_Ash },
+ { COORD_EVENT_WEATHER_SANDSTORM, CoordEventWeather_Sandstorm },
+ { COORD_EVENT_WEATHER_DARK, CoordEventWeather_Dark },
+ { COORD_EVENT_WEATHER_DROUGHT, CoordEventWeather_Drought },
+ { COORD_EVENT_WEATHER_ROUTE119_CYCLE, CoordEventWeather_Route119Cycle },
+ { COORD_EVENT_WEATHER_ROUTE123_CYCLE, CoordEventWeather_Route123Cycle },
};
-static void CoordEventWeather_Indoor(void)
+static void CoordEventWeather_Clouds(void)
{
- SetWeather(1);
+ SetWeather(WEATHER_CLOUDS);
}
static void CoordEventWeather_Sunny(void)
{
- SetWeather(2);
+ SetWeather(WEATHER_SUNNY);
}
-static void CoordEventWeather_Rain(void)
+static void CoordEventWeather_LightRain(void)
{
- SetWeather(3);
+ SetWeather(WEATHER_RAIN_LIGHT);
}
-static void CoordEventWeather_Snowflakes(void)
+static void CoordEventWeather_Snow(void)
{
- SetWeather(4);
+ SetWeather(WEATHER_SNOW);
}
static void CoordEventWeather_Thunderstorm(void)
{
- SetWeather(5);
+ SetWeather(WEATHER_RAIN_MED);
}
static void CoordEventWeather_Fog(void)
{
- SetWeather(6);
+ SetWeather(WEATHER_FOG_1);
}
static void CoordEventWeather_DiagonalFog(void)
{
- SetWeather(9);
+ SetWeather(WEATHER_FOG_2);
}
-static void CoordEventWeather_Snow(void)
+static void CoordEventWeather_Ash(void)
{
- SetWeather(7);
+ SetWeather(WEATHER_ASH);
}
static void CoordEventWeather_Sandstorm(void)
{
- SetWeather(8);
+ SetWeather(WEATHER_SANDSTORM);
}
-static void CoordEventWeather_Cloudy(void)
+static void CoordEventWeather_Dark(void)
{
- SetWeather(11);
+ SetWeather(WEATHER_DARK);
}
static void CoordEventWeather_Drought(void)
{
- SetWeather(12);
+ SetWeather(WEATHER_DROUGHT);
}
-static void CoordEventWeather_UnderwaterFog(void)
+static void CoordEventWeather_Route119Cycle(void)
{
- SetWeather(20);
+ SetWeather(WEATHER_ROUTE119_CYCLE);
}
-static void CoordEventWeather_UnderwaterBubbles(void)
+static void CoordEventWeather_Route123Cycle(void)
{
- SetWeather(21);
+ SetWeather(WEATHER_ROUTE123_CYCLE);
}
-void DoCoordEventWeather(u8 n)
+void DoCoordEventWeather(u8 coordEventWeather)
{
u8 i;
for (i = 0; i < ARRAY_COUNT(sCoordEventWeatherFuncs); i++)
{
- if (sCoordEventWeatherFuncs[i].weather == n)
+ if (sCoordEventWeatherFuncs[i].coordEventWeather == coordEventWeather)
{
sCoordEventWeatherFuncs[i].func();
return;