summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGriffinR <griffin.g.richards@gmail.com>2020-01-28 14:26:18 -0500
committerGriffinR <griffin.g.richards@gmail.com>2020-01-28 14:26:18 -0500
commit0ddd7ebb1d15a8dc03baaa7c581096eb295ac352 (patch)
tree1c521fbbfb520104d6cd93e140268360cd3d6fdb
parenteae373576ddb6893d500d4a4134538f480b0d322 (diff)
Sync STEB_CB, WEATHER_SHADE
-rw-r--r--data/maps/NavelRock_Summit/map.json2
-rw-r--r--data/maps/PokemonMansion_1F/map.json2
-rw-r--r--data/maps/PokemonMansion_2F/map.json2
-rw-r--r--data/maps/PokemonMansion_3F/map.json2
-rw-r--r--data/maps/PokemonMansion_B1F/map.json2
-rw-r--r--data/maps/ViridianForest/map.json2
-rw-r--r--include/constants/field_tasks.h13
-rw-r--r--include/constants/weather.h2
-rw-r--r--src/field_tasks.c19
9 files changed, 31 insertions, 15 deletions
diff --git a/data/maps/NavelRock_Summit/map.json b/data/maps/NavelRock_Summit/map.json
index 91981c25d..ef624c9c0 100644
--- a/data/maps/NavelRock_Summit/map.json
+++ b/data/maps/NavelRock_Summit/map.json
@@ -5,7 +5,7 @@
"music": "MUS_NANADUNGEON",
"region_map_section": "MAPSEC_NAVEL_ROCK",
"requires_flash": false,
- "weather": "WEATHER_CLOUDY",
+ "weather": "WEATHER_SHADE",
"map_type": "MAP_TYPE_4",
"unknown_18": 0,
"unknown_19": 6,
diff --git a/data/maps/PokemonMansion_1F/map.json b/data/maps/PokemonMansion_1F/map.json
index 652ffd20b..6ea519092 100644
--- a/data/maps/PokemonMansion_1F/map.json
+++ b/data/maps/PokemonMansion_1F/map.json
@@ -5,7 +5,7 @@
"music": "MUS_POKEYASHI",
"region_map_section": "MAPSEC_POKEMON_MANSION",
"requires_flash": false,
- "weather": "WEATHER_CLOUDY",
+ "weather": "WEATHER_SHADE",
"map_type": "MAP_TYPE_8",
"unknown_18": 0,
"unknown_19": 7,
diff --git a/data/maps/PokemonMansion_2F/map.json b/data/maps/PokemonMansion_2F/map.json
index bc8f10848..a3a9c556e 100644
--- a/data/maps/PokemonMansion_2F/map.json
+++ b/data/maps/PokemonMansion_2F/map.json
@@ -5,7 +5,7 @@
"music": "MUS_POKEYASHI",
"region_map_section": "MAPSEC_POKEMON_MANSION",
"requires_flash": false,
- "weather": "WEATHER_CLOUDY",
+ "weather": "WEATHER_SHADE",
"map_type": "MAP_TYPE_8",
"unknown_18": 0,
"unknown_19": 7,
diff --git a/data/maps/PokemonMansion_3F/map.json b/data/maps/PokemonMansion_3F/map.json
index 1e4af29e2..9c0423004 100644
--- a/data/maps/PokemonMansion_3F/map.json
+++ b/data/maps/PokemonMansion_3F/map.json
@@ -5,7 +5,7 @@
"music": "MUS_POKEYASHI",
"region_map_section": "MAPSEC_POKEMON_MANSION",
"requires_flash": false,
- "weather": "WEATHER_CLOUDY",
+ "weather": "WEATHER_SHADE",
"map_type": "MAP_TYPE_8",
"unknown_18": 0,
"unknown_19": 7,
diff --git a/data/maps/PokemonMansion_B1F/map.json b/data/maps/PokemonMansion_B1F/map.json
index 458740163..eea10cb2c 100644
--- a/data/maps/PokemonMansion_B1F/map.json
+++ b/data/maps/PokemonMansion_B1F/map.json
@@ -5,7 +5,7 @@
"music": "MUS_POKEYASHI",
"region_map_section": "MAPSEC_POKEMON_MANSION",
"requires_flash": false,
- "weather": "WEATHER_CLOUDY",
+ "weather": "WEATHER_SHADE",
"map_type": "MAP_TYPE_8",
"unknown_18": 0,
"unknown_19": 7,
diff --git a/data/maps/ViridianForest/map.json b/data/maps/ViridianForest/map.json
index 463bc53f5..97f28ced9 100644
--- a/data/maps/ViridianForest/map.json
+++ b/data/maps/ViridianForest/map.json
@@ -5,7 +5,7 @@
"music": "MUS_T_MORI",
"region_map_section": "MAPSEC_VIRIDIAN_FOREST",
"requires_flash": false,
- "weather": "WEATHER_CLOUDY",
+ "weather": "WEATHER_SHADE",
"map_type": "MAP_TYPE_3",
"unknown_18": 1,
"unknown_19": 7,
diff --git a/include/constants/field_tasks.h b/include/constants/field_tasks.h
new file mode 100644
index 000000000..31edb6ffe
--- /dev/null
+++ b/include/constants/field_tasks.h
@@ -0,0 +1,13 @@
+#ifndef GUARD_CONSTANTS_FIELD_TASKS_H
+#define GUARD_CONSTANTS_FIELD_TASKS_H
+
+#define STEP_CB_DUMMY 0
+#define STEP_CB_ASH 1 // Unused
+#define STEP_CB_FORTREE_BRIDGE 2 // Unused, dummied
+#define STEP_CB_PACIFIDLOG_BRIDGE 3 // Unused, dummied
+#define STEP_CB_ICE 4
+#define STEP_CB_TRUCK 5 // Unused, dummied
+#define STEP_CB_SECRET_BASE 6 // Unused, dummied
+#define STEP_CB_CRACKED_FLOOR 7 // Unused
+
+#endif // GUARD_CONSTANTS_FIELD_TASKS_H
diff --git a/include/constants/weather.h b/include/constants/weather.h
index a45d2e523..77be45c51 100644
--- a/include/constants/weather.h
+++ b/include/constants/weather.h
@@ -12,7 +12,7 @@
#define WEATHER_SANDSTORM 8 // unused
#define WEATHER_FOG_DIAGONAL 9 // unused
#define WEATHER_UNDERWATER 10 // unused
-#define WEATHER_CLOUDY 11
+#define WEATHER_SHADE 11
#define WEATHER_DROUGHT 12 // unused and broken in overworld
#define WEATHER_DOWNPOUR 13 // unused
#define WEATHER_UNDERWATER_BUBBLES 14 // unused
diff --git a/src/field_tasks.c b/src/field_tasks.c
index c64fb1924..cd72e111a 100644
--- a/src/field_tasks.c
+++ b/src/field_tasks.c
@@ -11,10 +11,13 @@
#include "script.h"
#include "sound.h"
#include "task.h"
+#include "constants/field_tasks.h"
#include "constants/flags.h"
#include "constants/songs.h"
#include "constants/vars.h"
+// TODO: Metatile IDs in this file
+
static void DummyPerStepCallback(u8 taskId);
static void AshGrassPerStepCallback(u8 taskId);
static void IcefallCaveIcePerStepCallback(u8 taskId);
@@ -22,14 +25,14 @@ static void CrackedFloorPerStepCallback(u8 taskId);
static const TaskFunc sPerStepCallbacks[] =
{
- DummyPerStepCallback,
- AshGrassPerStepCallback,
- DummyPerStepCallback,
- DummyPerStepCallback,
- IcefallCaveIcePerStepCallback,
- DummyPerStepCallback,
- DummyPerStepCallback,
- CrackedFloorPerStepCallback
+ [STEP_CB_DUMMY] = DummyPerStepCallback,
+ [STEP_CB_ASH] = AshGrassPerStepCallback,
+ [STEP_CB_FORTREE_BRIDGE] = DummyPerStepCallback,
+ [STEP_CB_PACIFIDLOG_BRIDGE] = DummyPerStepCallback,
+ [STEP_CB_ICE] = IcefallCaveIcePerStepCallback,
+ [STEP_CB_TRUCK] = DummyPerStepCallback,
+ [STEP_CB_SECRET_BASE] = DummyPerStepCallback,
+ [STEP_CB_CRACKED_FLOOR] = CrackedFloorPerStepCallback
};
static const u8 sIcefallCaveIceTileCoords[][2] =