Added gfx_invalidate_window

This commit is contained in:
Duncan Frost 2014-08-13 20:47:30 +01:00
parent bf8f2ed569
commit 4292109753
5 changed files with 19 additions and 4 deletions

View File

@ -1235,6 +1235,18 @@ void gfx_draw_string_centred(rct_drawpixelinfo *dpi, int format, int x, int y, i
}
}
/**
*
* rct2: 0x006EB13A
*/
void gfx_invalidate_window(rct_window* w)
{
if (!w)return;
int width = w->x + w->width;
int height = w->y + w->height;
gfx_set_dirty_blocks(w->x, w->y, width, height);
}
/**
*
* rct2: 0x006ED7E5

View File

@ -92,6 +92,9 @@ void gfx_draw_all_dirty_blocks();
void gfx_redraw_screen_rect(short left, short top, short right, short bottom);
void gfx_invalidate_screen();
typedef struct rct_window rct_window;
void gfx_invalidate_window(rct_window *w);
void gfx_draw_rain(int left, int top, int width, int height, uint32 x_start, uint32 y_start);
rct_drawpixelinfo* clip_drawpixelinfo(rct_drawpixelinfo* dpi, int left, int width, int top, int height);

View File

@ -924,7 +924,7 @@ void window_zoom_in(rct_window *w)
w->saved_view_x += v->view_width >> 1;
w->saved_view_y += v->view_height >> 1;
RCT2_CALLPROC_X(0x006EB13A, 0, 0, 0, 0, (int)w, 0, 0);
gfx_invalidate_window(w);
}
/**
@ -951,7 +951,7 @@ void window_zoom_out(rct_window *w)
w->saved_view_x -= width / 2;
w->saved_view_y -= height >> 1;
RCT2_CALLPROC_X(0x006EB13A, 0, 0, 0, 0, (int)w, 0, 0);
gfx_invalidate_window(w);
}
/**

View File

@ -447,7 +447,7 @@ static void window_game_top_toolbar_dropdown()
default:
return;
}
RCT2_CALLPROC_X(0x6EB13A, 0, 0, 0, 0, (int)w, 0, 0);
gfx_invalidate_window(w);
}
}
}

View File

@ -161,7 +161,7 @@ void window_peep_open(rct_peep* peep){
}
window->page = 0;
RCT2_CALLPROC_X(0x006EB13A, 0, 0, 0, 0, (int)window, 0, 0);
gfx_invalidate_window(window);
window->widgets = RCT2_GLOBAL(0x981D0C, rct_widget*);
window->enabled_widgets = RCT2_GLOBAL(0x981D3C,uint32);