diff --git a/asm/macros/field_effect_script.inc b/asm/macros/field_effect_script.inc index 3e00bc734d..68d8502a9d 100644 --- a/asm/macros/field_effect_script.inc +++ b/asm/macros/field_effect_script.inc @@ -1,3 +1,4 @@ +#include "constants/field_weather.h" @ The first .byte argument of each macro below is an index into gFieldEffectScriptFuncs .macro field_eff_loadtiles address:req @@ -5,8 +6,7 @@ .4byte \address .endm - @ 1 = COLOR_MAP_DARK_CONTRAST - .macro field_eff_loadfadedpal address:req, color_map_type=1 + .macro field_eff_loadfadedpal address:req, color_map_type=COLOR_MAP_DARK_CONTRAST .byte 1 .4byte \address .byte \color_map_type @@ -26,8 +26,7 @@ .byte 4 .endm - @ 1 = COLOR_MAP_DARK_CONTRAST - .macro field_eff_loadgfx_callnative tiles_address:req, palette_address:req, function_address:req, color_map_type=1 + .macro field_eff_loadgfx_callnative tiles_address:req, palette_address:req, function_address:req, color_map_type=COLOR_MAP_DARK_CONTRAST .byte 5 .4byte \tiles_address .4byte \palette_address @@ -41,8 +40,7 @@ .4byte \function_address .endm - @ 1 = COLOR_MAP_DARK_CONTRAST - .macro field_eff_loadfadedpal_callnative palette_address:req, function_address:req, color_map_type=1 + .macro field_eff_loadfadedpal_callnative palette_address:req, function_address:req, color_map_type=COLOR_MAP_DARK_CONTRAST .byte 7 .4byte \palette_address .byte \color_map_type diff --git a/include/constants/field_weather.h b/include/constants/field_weather.h index e84dbc48c4..dedd1a3c0a 100644 --- a/include/constants/field_weather.h +++ b/include/constants/field_weather.h @@ -1,6 +1,11 @@ #ifndef GUARD_CONSTANTS_FIELD_WEATHER_H #define GUARD_CONSTANTS_FIELD_WEATHER_H +// sPaletteColorMapTypes & field_effect_scripts +#define COLOR_MAP_NONE 0 +#define COLOR_MAP_DARK_CONTRAST 1 +#define COLOR_MAP_CONTRAST 2 + #define MAX_RAIN_SPRITES 24 #define NUM_CLOUD_SPRITES 3 #define NUM_FOG_HORIZONTAL_SPRITES 20 diff --git a/src/field_weather.c b/src/field_weather.c index e2fb1e77e6..eaa25078b6 100644 --- a/src/field_weather.c +++ b/src/field_weather.c @@ -20,13 +20,6 @@ #define DROUGHT_COLOR_INDEX(color) ((((color) >> 1) & 0xF) | (((color) >> 2) & 0xF0) | (((color) >> 3) & 0xF00)) -enum -{ - COLOR_MAP_NONE, - COLOR_MAP_DARK_CONTRAST, - COLOR_MAP_CONTRAST, -}; - struct RGBColor { u16 r:5;