diff --git a/src/drawing/rect.c b/src/drawing/rect.c index c23f881b56..ac4558dcf1 100644 --- a/src/drawing/rect.c +++ b/src/drawing/rect.c @@ -114,7 +114,7 @@ void gfx_fill_rect(rct_drawpixelinfo *dpi, int left, int top, int right, int bot // Fill the rectangle with the colours from the colour table for (int i = 0; i < height>>dpi->zoom_level; ++i) { uint8* next_dest_pointer = dest_pointer + (dpi->width >> dpi->zoom_level) + dpi->pitch; - for (int j = 0; j < width; ++j) { + for (int j = 0; j < width>>dpi->zoom_level; ++j) { *dest_pointer = g1_element.offset[*dest_pointer]; dest_pointer++; } diff --git a/src/interface/viewport.c b/src/interface/viewport.c index 20d19debc7..039f314461 100644 --- a/src/interface/viewport.c +++ b/src/interface/viewport.c @@ -1055,8 +1055,7 @@ void viewport_paint(rct_viewport* viewport, rct_drawpixelinfo* dpi, int left, in //RCT2_CALLPROC_EBPSAFE(0x688485); //Big function call int weather_colour = RCT2_ADDRESS(0x98195C, uint32)[RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_WEATHER_GLOOM, uint8)]; - if ((weather_colour != -1) && (RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_VIEWPORT_FLAGS, uint16) & 0x4000) && (RCT2_GLOBAL(0x9DEA6F, uint8) & 1)){ - dpi2 = RCT2_GLOBAL(0x140E9A8, rct_drawpixelinfo*); + if ((weather_colour != -1) && (!(RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_VIEWPORT_FLAGS, uint16) & 0x4000)) && (!(RCT2_GLOBAL(0x9DEA6F, uint8) & 1))){ gfx_fill_rect(dpi2, dpi2->x, dpi2->y, dpi2->width + dpi2->x - 1, dpi2->height + dpi2->y - 1, weather_colour); } RCT2_CALLPROC_EBPSAFE(0x6860C3); //string related diff --git a/src/world/climate.c b/src/world/climate.c index 54e3a295a1..b6a66723ee 100644 --- a/src/world/climate.c +++ b/src/world/climate.c @@ -199,6 +199,9 @@ void climate_force_weather(uint8 weather){ RCT2_GLOBAL(RCT2_ADDRESS_CLIMATE_UPDATE_TIMER, sint16) = 1920; climate_update(); + + // Incase of change in gloom level force a complete redraw + gfx_invalidate_screen(); } /**