Merge pull request #726 from duncanspumpkin/fix_map_crash

Fix crash on map due to EBPSAFE
This commit is contained in:
Ted John 2015-01-27 20:26:00 +00:00
commit 21a33e8071
1 changed files with 11 additions and 7 deletions

View File

@ -342,10 +342,10 @@ static void window_map_mousedown(int widgetIndex, rct_window*w, rct_widget* widg
// The normal map window doesn't have widget 8 or 9.
// I assume these widgets refer to the Scenario Editor's map window.
if (widgetIndex == 8) {
RCT2_CALLPROC_EBPSAFE(0x0068D641);
RCT2_CALLPROC_X(0x0068D641, 0, 0, 0, widgetIndex, (int)w, 0, 0);
}
else if (widgetIndex == 9) {
RCT2_CALLPROC_EBPSAFE(0x0068D6B4);
RCT2_CALLPROC_X(0x0068D6B4, 0, 0, 0, widgetIndex, (int)w, 0, 0);
}
}
@ -355,7 +355,7 @@ static void window_map_mousedown(int widgetIndex, rct_window*w, rct_widget* widg
*/
static void window_map_update(rct_window *w)
{
RCT2_CALLPROC_EBPSAFE(0x0068D7FB);
RCT2_CALLPROC_X(0x0068D7FB, 0, 0, 0, 0, (int)w, 0, 0);
}
/**
@ -381,7 +381,11 @@ static void window_map_scrollgetsize()
*/
static void window_map_scrollmousedown()
{
RCT2_CALLPROC_EBPSAFE(0x0068D726);
short x, y, scrollIndex;
rct_window *w;
window_scrollmouse_get_registers(w, scrollIndex, x, y);
RCT2_CALLPROC_X(0x0068D726, scrollIndex, 0, x, y, (int)w, 0, 0);
}
/**
@ -626,11 +630,11 @@ static void window_map_scrollpaint()
*g1_element = pushed_g1_element;
if (w->selected_tab == 0)
RCT2_CALLPROC_EBPSAFE(0x68DADA); //draws dots representing guests
RCT2_CALLPROC_X(0x68DADA, 0, 0, 0, 0, (int)w, (int)dpi, 0); //draws dots representing guests
else
RCT2_CALLPROC_EBPSAFE(0x68DBC1); //draws dots representing trains
RCT2_CALLPROC_X(0x68DBC1, 0, 0, 0, 0, (int)w, (int)dpi, 0); //draws dots representing trains
RCT2_CALLPROC_EBPSAFE(0x68D8CE); //draws the HUD rectangle on the map
RCT2_CALLPROC_X(0x68D8CE, 0, 0, 0, 0, (int)w, (int)dpi, 0); //draws the HUD rectangle on the map
}
/**