Merge pull request #10 from duncanspumpkin/fix_ride

Fix ride
This commit is contained in:
Michael Steenbeek 2015-04-15 11:42:17 +02:00
commit c82a7423d3
3 changed files with 11 additions and 4 deletions

View File

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

View File

@ -221,7 +221,7 @@ void window_options_open()
if (w != NULL)
return;
w = window_create_centred(WW, WH, (uint32*)window_options_events, WC_OPTIONS, 0);
w = window_create_centred(WW, WH, (uint32*)window_options_events, WC_OPTIONS, WF_STICK_TO_FRONT);
w->widgets = window_options_widgets;
w->enabled_widgets =
(1ULL << WIDX_CLOSE) |

View File

@ -1408,6 +1408,12 @@ static void window_ride_set_page(rct_window *w, int page)
w->page = page;
w->frame_no = 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) {
w->viewport->width = 0;
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);
sint16 scaled_yUnit = yUnit;
// Scale modifier
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