1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 19:13:07 +01:00

Move function out of C extern

This commit is contained in:
Ted John
2018-01-12 22:53:41 +00:00
committed by Richard Jenkins
parent 9afbfe02ab
commit ca7f9dec8e
4 changed files with 14 additions and 16 deletions

View File

@@ -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;

View File

@@ -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(

View File

@@ -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;

View File

@@ -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