forked from rosebudai/OpenRCT2-Web
Move function out of C extern
This commit is contained in:
1 parent
9afbfe02ab
commit
ca7f9dec8e
4 files changed
+14
-16
No files matched your search
@@ -231,7 +231,7 @@ void update_palette_effects()
|
||||
uint32 shade = 0;
|
||||
if (gConfigGeneral.render_weather_gloom)
|
||||
{
|
||||
auto paletteId = climate_get_weather_gloom_palette_id(&gClimateCurrent);
|
||||
auto paletteId = climate_get_weather_gloom_palette_id(gClimateCurrent);
|
||||
if (paletteId != PALETTE_NULL)
|
||||
{
|
||||
shade = 1;
|
||||
|
||||
@@ -914,7 +914,7 @@ static void viewport_paint_column(rct_drawpixelinfo * dpi, uint32 viewFlags)
|
||||
|
||||
static void viewport_paint_weather_gloom(rct_drawpixelinfo * dpi)
|
||||
{
|
||||
FILTER_PALETTE_ID paletteId = climate_get_weather_gloom_palette_id(&gClimateCurrent);
|
||||
auto paletteId = climate_get_weather_gloom_palette_id(gClimateCurrent);
|
||||
if (paletteId != PALETTE_NULL)
|
||||
{
|
||||
gfx_filter_rect(
|
||||
|
||||
@@ -208,17 +208,6 @@ extern "C"
|
||||
climate_update_rain_sound();
|
||||
climate_update_thunder_sound();
|
||||
}
|
||||
|
||||
FILTER_PALETTE_ID climate_get_weather_gloom_palette_id(const ClimateState * state)
|
||||
{
|
||||
auto paletteId = PALETTE_NULL;
|
||||
auto gloom = state->WeatherGloom;
|
||||
if (gloom < Util::CountOf(ClimateWeatherGloomColours))
|
||||
{
|
||||
paletteId = ClimateWeatherGloomColours[gloom];
|
||||
}
|
||||
return paletteId;
|
||||
}
|
||||
}
|
||||
|
||||
bool climate_is_raining()
|
||||
@@ -226,6 +215,17 @@ bool climate_is_raining()
|
||||
return gClimateCurrent.RainLevel != RAIN_LEVEL_NONE;
|
||||
}
|
||||
|
||||
FILTER_PALETTE_ID climate_get_weather_gloom_palette_id(const ClimateState &state)
|
||||
{
|
||||
auto paletteId = PALETTE_NULL;
|
||||
auto gloom = state.WeatherGloom;
|
||||
if (gloom < Util::CountOf(ClimateWeatherGloomColours))
|
||||
{
|
||||
paletteId = ClimateWeatherGloomColours[gloom];
|
||||
}
|
||||
return paletteId;
|
||||
}
|
||||
|
||||
uint32 climate_get_weather_sprite_id(const ClimateState &state)
|
||||
{
|
||||
uint32 spriteId = SPR_WEATHER_SUN;
|
||||
|
||||
@@ -85,13 +85,11 @@ extern "C"
|
||||
void climate_update();
|
||||
void climate_update_sound();
|
||||
void climate_force_weather(uint8 weather);
|
||||
|
||||
FILTER_PALETTE_ID climate_get_weather_gloom_palette_id(const ClimateState * state);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
bool climate_is_raining();
|
||||
FILTER_PALETTE_ID climate_get_weather_gloom_palette_id(const ClimateState &state);
|
||||
uint32 climate_get_weather_sprite_id(const ClimateState &state);
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user