From 1d2ced2ad73accb81d7bdeaa9c53f7387f21e2c3 Mon Sep 17 00:00:00 2001 From: Richard Jenkins Date: Fri, 2 Jun 2017 00:19:59 +0100 Subject: [PATCH] Name sub_6CC3FB() --- src/openrct2/ride/ride.c | 6 +++--- src/openrct2/ride/ride.h | 2 +- src/openrct2/windows/ride_construction.c | 8 ++++---- src/openrct2/windows/track_place.c | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/openrct2/ride/ride.c b/src/openrct2/ride/ride.c index 723de7f557..f117264797 100644 --- a/src/openrct2/ride/ride.c +++ b/src/openrct2/ride/ride.c @@ -1021,7 +1021,7 @@ void ride_construct(sint32 rideIndex) if (w != NULL && ride_modify(&trackElement)) window_scroll_to_location(w, trackElement.x, trackElement.y, trackElement.element->base_height * 8); } else { - sub_6CC3FB(rideIndex); + ride_initialise_construction_window(rideIndex); } } @@ -1727,7 +1727,7 @@ static sint32 ride_modify_entrance_or_exit(rct_map_element *mapElement, sint32 x // Get or create construction window for ride constructionWindow = window_find_by_class(WC_RIDE_CONSTRUCTION); if (constructionWindow == NULL) { - if (!sub_6CC3FB(rideIndex)) + if (!ride_initialise_construction_window(rideIndex)) return 0; constructionWindow = window_find_by_class(WC_RIDE_CONSTRUCTION); @@ -1888,7 +1888,7 @@ sint32 ride_modify(rct_xy_element *input) * * rct2: 0x006CC3FB */ -sint32 sub_6CC3FB(sint32 rideIndex) +sint32 ride_initialise_construction_window(sint32 rideIndex) { rct_ride *ride; rct_window *w; diff --git a/src/openrct2/ride/ride.h b/src/openrct2/ride/ride.h index 2059ee339d..e041a781d5 100644 --- a/src/openrct2/ride/ride.h +++ b/src/openrct2/ride/ride.h @@ -1036,7 +1036,7 @@ void ride_measurements_update(); rct_ride_measurement *ride_get_measurement(sint32 rideIndex, rct_string_id *message); void ride_breakdown_add_news_item(sint32 rideIndex); rct_peep *ride_find_closest_mechanic(rct_ride *ride, sint32 forInspection); -sint32 sub_6CC3FB(sint32 rideIndex); +sint32 ride_initialise_construction_window(sint32 rideIndex); void ride_construction_invalidate_current_track(); sint32 sub_6C683D(sint32* x, sint32* y, sint32* z, sint32 direction, sint32 type, uint16 extra_params, rct_map_element** output_element, uint16 flags); void ride_set_map_tooltip(rct_map_element *mapElement); diff --git a/src/openrct2/windows/ride_construction.c b/src/openrct2/windows/ride_construction.c index 503405188e..ea70ec44f0 100644 --- a/src/openrct2/windows/ride_construction.c +++ b/src/openrct2/windows/ride_construction.c @@ -1892,7 +1892,7 @@ void window_ride_construction_mouseup_demolish_next_piece(sint32 x, sint32 y, si ride_construction_set_default_next_piece(); window_ride_construction_update_active_elements(); if (!ride_try_get_origin_element(_currentRideIndex, NULL)) { - sub_6CC3FB(_currentRideIndex); + ride_initialise_construction_window(_currentRideIndex); _currentTrackPieceDirection = direction; if (!(slope & 0x100)) { _currentTrackCurve = slope; @@ -1961,7 +1961,7 @@ static void window_ride_construction_entrance_click(rct_window *w) { if (tool_set(w, WIDX_ENTRANCE, TOOL_CROSSHAIR)) { if (!ride_try_get_origin_element(_currentRideIndex, NULL)) { - sub_6CC3FB(_currentRideIndex); + ride_initialise_construction_window(_currentRideIndex); } } else { gRideEntranceExitPlaceType = ENTRANCE_TYPE_RIDE_ENTRANCE; @@ -1985,7 +1985,7 @@ static void window_ride_construction_exit_click(rct_window *w) { if (tool_set(w, WIDX_EXIT, TOOL_CROSSHAIR)) { if (!ride_try_get_origin_element(_currentRideIndex, NULL)) { - sub_6CC3FB(_currentRideIndex); + ride_initialise_construction_window(_currentRideIndex); } } else { gRideEntranceExitPlaceType = ENTRANCE_TYPE_RIDE_EXIT; @@ -3986,7 +3986,7 @@ void ride_construction_tooldown_construct(sint32 screenX, sint32 screenY) sint32 saveCurrentTrackAlternative = _currentTrackAlternative; sint32 saveCurrentTrackLiftHill = _currentTrackLiftHill; - sub_6CC3FB(_currentRideIndex); + ride_initialise_construction_window(_currentRideIndex); _currentTrackPieceDirection = saveTrackDirection; _currentTrackCurve = saveCurrentTrackCurve; diff --git a/src/openrct2/windows/track_place.c b/src/openrct2/windows/track_place.c index 2543212f3f..e912baae95 100644 --- a/src/openrct2/windows/track_place.c +++ b/src/openrct2/windows/track_place.c @@ -336,7 +336,7 @@ static void window_track_place_tooldown(rct_window* w, rct_widgetindex widgetInd window_ride_main_open(rideIndex); window_close(w); } else { - sub_6CC3FB(rideIndex); + ride_initialise_construction_window(rideIndex); w = window_find_by_class(WC_RIDE_CONSTRUCTION); window_event_mouse_up_call(w, WC_RIDE_CONSTRUCTION__WIDX_ENTRANCE); }