1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 11:03:00 +01:00

Merge pull request #664 from duncanspumpkin/fix_gloom

Fix gloom
This commit is contained in:
Ted John
2014-12-31 19:00:13 +00:00
3 changed files with 5 additions and 3 deletions

View File

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

View File

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

View File

@@ -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();
}
/**