Merge pull request #1019 from duncanspumpkin/fix_ride

Fix vehicle and graph tab of ride window and options window
This commit is contained in:
Ted John 2015-04-15 22:00:25 +01:00
commit 6a82407056
4 changed files with 12 additions and 5 deletions

View File

@ -351,7 +351,7 @@ void format_date(char **dest, uint16 value)
(*dest)--; (*dest)--;
} }
void format_length(char **dest, uint16 value) void format_length(char **dest, sint16 value)
{ {
rct_string_id stringId = 2733; rct_string_id stringId = 2733;

View File

@ -214,7 +214,7 @@ void window_editor_object_selection_open()
400, 400,
(uint32*)window_editor_object_selection_events, (uint32*)window_editor_object_selection_events,
WC_EDITOR_OBJECT_SELECTION, WC_EDITOR_OBJECT_SELECTION,
WF_STICK_TO_FRONT WF_10
); );
window->widgets = window_editor_object_selection_widgets; window->widgets = window_editor_object_selection_widgets;

View File

@ -1408,6 +1408,12 @@ static void window_ride_set_page(rct_window *w, int page)
w->page = page; w->page = page;
w->frame_no = 0; w->frame_no = 0;
w->var_492 = 0; w->var_492 = 0;
if (page == WINDOW_RIDE_PAGE_VEHICLE){
// Reload the vehicle settings
RCT2_CALLPROC_X(0x006DD57D, 0, 0, 0, w->number, 0, 0, 0);
}
if (w->viewport != NULL) { if (w->viewport != NULL) {
w->viewport->width = 0; w->viewport->width = 0;
w->viewport = NULL; w->viewport = NULL;
@ -5256,11 +5262,12 @@ static void window_ride_graphs_scrollpaint()
gfx_fill_rect(dpi, dpi->x, y, dpi->x + dpi->width - 1, y, colour); gfx_fill_rect(dpi, dpi->x, y, dpi->x + dpi->width - 1, y, colour);
sint16 scaled_yUnit = yUnit;
// Scale modifier // Scale modifier
if (ax == 1420) if (ax == 1420)
yUnit /= 2; scaled_yUnit /= 2;
gfx_draw_string_left(dpi, ax, &yUnit, 0, w->scrolls[0].h_left + 1, y - 4); gfx_draw_string_left(dpi, ax, &scaled_yUnit, 0, w->scrolls[0].h_left + 1, y - 4);
} }
// Time marks // Time marks

View File

@ -116,7 +116,7 @@ void window_scenarioselect_open()
334, 334,
(uint32*)window_scenarioselect_events, (uint32*)window_scenarioselect_events,
WC_SCENARIO_SELECT, WC_SCENARIO_SELECT,
WF_STICK_TO_FRONT | WF_10 WF_10
); );
window->widgets = window_scenarioselect_widgets; window->widgets = window_scenarioselect_widgets;