mirror of https://github.com/OpenRCT2/OpenRCT2.git
Merge pull request #5532 from OpenRCT2/sub_hex_fix
Name sub_<hex>() functions
This commit is contained in:
commit
f3b4c88783
|
@ -89,14 +89,13 @@ void process_mouse_tool(sint32 x, sint32 y);
|
|||
void invalidate_scroll();
|
||||
static rct_mouse_data* get_mouse_input();
|
||||
void map_element_right_click(sint32 type, rct_map_element *mapElement, sint32 x, sint32 y);
|
||||
sint32 sub_6EDE88(sint32 x, sint32 y, rct_map_element **mapElement, sint32 *outX, sint32 *outY);
|
||||
sint32 get_next_key();
|
||||
static void game_handle_input_mouse(sint32 x, sint32 y, sint32 state);
|
||||
void game_handle_edge_scroll();
|
||||
void game_handle_key_scroll();
|
||||
static void input_widget_left(sint32 x, sint32 y, rct_window *w, rct_widgetindex widgetIndex);
|
||||
void input_state_widget_pressed(sint32 x, sint32 y, sint32 state, rct_widgetindex widgetIndex, rct_window* w, rct_widget* widget);
|
||||
void sub_6ED990(uint8 cursor_id);
|
||||
void set_cursor(uint8 cursor_id);
|
||||
static void input_window_position_continue(rct_window *w, sint32 lastX, sint32 lastY, sint32 newX, sint32 newY);
|
||||
static void input_window_position_end(rct_window *w, sint32 x, sint32 y);
|
||||
static void input_window_resize_begin(rct_window *w, rct_widgetindex widgetIndex, sint32 x, sint32 y);
|
||||
|
@ -1060,7 +1059,7 @@ void process_mouse_over(sint32 x, sint32 y)
|
|||
case WWT_VIEWPORT:
|
||||
if (!(_inputFlags & INPUT_FLAG_TOOL_ACTIVE)) {
|
||||
if (viewport_interaction_left_over(x, y)) {
|
||||
sub_6ED990(CURSOR_HAND_POINT);
|
||||
set_cursor(CURSOR_HAND_POINT);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
@ -1080,7 +1079,7 @@ void process_mouse_over(sint32 x, sint32 y)
|
|||
cursorId = edi;
|
||||
if ((ebx & 0xFF) != 0)
|
||||
{
|
||||
sub_6ED990(cursorId);
|
||||
set_cursor(cursorId);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
@ -1129,7 +1128,7 @@ void process_mouse_over(sint32 x, sint32 y)
|
|||
}
|
||||
|
||||
viewport_interaction_right_over(x, y);
|
||||
sub_6ED990(cursorId);
|
||||
set_cursor(cursorId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1562,7 +1561,7 @@ sint32 get_next_key()
|
|||
*
|
||||
* rct2: 0x006ED990
|
||||
*/
|
||||
void sub_6ED990(uint8 cursor_id)
|
||||
void set_cursor(uint8 cursor_id)
|
||||
{
|
||||
if (_inputState == INPUT_STATE_RESIZING) {
|
||||
cursor_id = CURSOR_DIAGONAL_ARROWS;
|
||||
|
|
|
@ -1133,14 +1133,14 @@ static sint32 cc_load_object(const utf8 **argv, sint32 argc) {
|
|||
}
|
||||
|
||||
gSilentResearch = true;
|
||||
sub_684AC3();
|
||||
research_reset_current_item();
|
||||
gSilentResearch = false;
|
||||
}
|
||||
else if (objectType == OBJECT_TYPE_SCENERY_SETS) {
|
||||
research_insert(true, groupIndex, RESEARCH_CATEGORY_SCENERYSET);
|
||||
|
||||
gSilentResearch = true;
|
||||
sub_684AC3();
|
||||
research_reset_current_item();
|
||||
gSilentResearch = false;
|
||||
}
|
||||
scenery_set_default_placement_configuration();
|
||||
|
|
|
@ -222,7 +222,7 @@ void viewport_update_pointers()
|
|||
* edx is assumed to be (and always is) the current rotation, so it is not
|
||||
* needed as parameter.
|
||||
*/
|
||||
void sub_689174(sint16* x, sint16* y, sint16 *z)
|
||||
void viewport_adjust_for_map_height(sint16* x, sint16* y, sint16 *z)
|
||||
{
|
||||
sint16 start_x = *x;
|
||||
sint16 start_y = *y;
|
||||
|
@ -250,7 +250,10 @@ void sub_689174(sint16* x, sint16* y, sint16 *z)
|
|||
*z = height;
|
||||
}
|
||||
|
||||
static void sub_6E7FF3(rct_drawpixelinfo *dpi, rct_window *window, rct_viewport *viewport, sint32 x, sint32 y)
|
||||
/*
|
||||
* rct2: 0x006E7FF3
|
||||
*/
|
||||
static void viewport_redraw_after_shift(rct_drawpixelinfo *dpi, rct_window *window, rct_viewport *viewport, sint32 x, sint32 y)
|
||||
{
|
||||
// sub-divide by intersecting windows
|
||||
if (window < gWindowNextSlot)
|
||||
|
@ -261,7 +264,7 @@ static void sub_6E7FF3(rct_drawpixelinfo *dpi, rct_window *window, rct_viewport
|
|||
viewport->x >= window->x + window->width ||
|
||||
viewport->y + viewport->height <= window->y ||
|
||||
viewport->y >= window->y + window->height){
|
||||
sub_6E7FF3(dpi, window + 1, viewport, x, y);
|
||||
viewport_redraw_after_shift(dpi, window + 1, viewport, x, y);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -273,49 +276,49 @@ static void sub_6E7FF3(rct_drawpixelinfo *dpi, rct_window *window, rct_viewport
|
|||
{
|
||||
viewport->width = window->x - viewport->x;
|
||||
viewport->view_width = viewport->width << viewport->zoom;
|
||||
sub_6E7FF3(dpi, window, viewport, x, y);
|
||||
viewport_redraw_after_shift(dpi, window, viewport, x, y);
|
||||
|
||||
viewport->x += viewport->width;
|
||||
viewport->view_x += viewport->width << viewport->zoom;
|
||||
viewport->width = view_copy.width - viewport->width;
|
||||
viewport->view_width = viewport->width << viewport->zoom;
|
||||
sub_6E7FF3(dpi, window, viewport, x, y);
|
||||
viewport_redraw_after_shift(dpi, window, viewport, x, y);
|
||||
}
|
||||
else if (viewport->x + viewport->width > window->x + window->width)
|
||||
{
|
||||
viewport->width = window->x + window->width - viewport->x;
|
||||
viewport->view_width = viewport->width << viewport->zoom;
|
||||
sub_6E7FF3(dpi, window, viewport, x, y);
|
||||
viewport_redraw_after_shift(dpi, window, viewport, x, y);
|
||||
|
||||
viewport->x += viewport->width;
|
||||
viewport->view_x += viewport->width << viewport->zoom;
|
||||
viewport->width = view_copy.width - viewport->width;
|
||||
viewport->view_width = viewport->width << viewport->zoom;
|
||||
sub_6E7FF3(dpi, window, viewport, x, y);
|
||||
viewport_redraw_after_shift(dpi, window, viewport, x, y);
|
||||
}
|
||||
else if (viewport->y < window->y)
|
||||
{
|
||||
viewport->height = window->y - viewport->y;
|
||||
viewport->view_width = viewport->width << viewport->zoom;
|
||||
sub_6E7FF3(dpi, window, viewport, x, y);
|
||||
viewport_redraw_after_shift(dpi, window, viewport, x, y);
|
||||
|
||||
viewport->y += viewport->height;
|
||||
viewport->view_y += viewport->height << viewport->zoom;
|
||||
viewport->height = view_copy.height - viewport->height;
|
||||
viewport->view_width = viewport->width << viewport->zoom;
|
||||
sub_6E7FF3(dpi, window, viewport, x, y);
|
||||
viewport_redraw_after_shift(dpi, window, viewport, x, y);
|
||||
}
|
||||
else if (viewport->y + viewport->height > window->y + window->height)
|
||||
{
|
||||
viewport->height = window->y + window->height - viewport->y;
|
||||
viewport->view_width = viewport->width << viewport->zoom;
|
||||
sub_6E7FF3(dpi, window, viewport, x, y);
|
||||
viewport_redraw_after_shift(dpi, window, viewport, x, y);
|
||||
|
||||
viewport->y += viewport->height;
|
||||
viewport->view_y += viewport->height << viewport->zoom;
|
||||
viewport->height = view_copy.height - viewport->height;
|
||||
viewport->view_width = viewport->width << viewport->zoom;
|
||||
sub_6E7FF3(dpi, window, viewport, x, y);
|
||||
viewport_redraw_after_shift(dpi, window, viewport, x, y);
|
||||
}
|
||||
|
||||
// restore viewport
|
||||
|
@ -403,7 +406,7 @@ static void viewport_shift_pixels(rct_drawpixelinfo *dpi, rct_window* w, rct_vie
|
|||
}
|
||||
|
||||
w = orignal_w;
|
||||
sub_6E7FF3(dpi, w, viewport, x_diff, y_diff);
|
||||
viewport_redraw_after_shift(dpi, w, viewport, x_diff, y_diff);
|
||||
}
|
||||
|
||||
static void viewport_move(sint16 x, sint16 y, rct_window* w, rct_viewport* viewport)
|
||||
|
@ -526,7 +529,7 @@ void viewport_update_position(rct_window *window)
|
|||
sint16 y = viewport->view_height / 2 + window->saved_view_y;
|
||||
sint16 z;
|
||||
|
||||
sub_689174(&x, &y, &z);
|
||||
viewport_adjust_for_map_height(&x, &y, &z);
|
||||
|
||||
viewport_set_underground_flag(0, window, viewport);
|
||||
|
||||
|
|
|
@ -124,7 +124,7 @@ void viewport_update_sprite_follow(rct_window *window);
|
|||
void viewport_render(rct_drawpixelinfo *dpi, rct_viewport *viewport, sint32 left, sint32 top, sint32 right, sint32 bottom);
|
||||
void viewport_paint(rct_viewport* viewport, rct_drawpixelinfo* dpi, sint16 left, sint16 top, sint16 right, sint16 bottom);
|
||||
|
||||
void sub_689174(sint16* x, sint16* y, sint16 *z);
|
||||
void viewport_adjust_for_map_height(sint16* x, sint16* y, sint16 *z);
|
||||
|
||||
rct_xy16 screen_coord_to_viewport_coord(rct_viewport *viewport, uint16 x, uint16 y);
|
||||
rct_xy16 viewport_coord_to_map_coord(sint32 x, sint32 y, sint32 z);
|
||||
|
|
|
@ -1416,7 +1416,7 @@ void window_scroll_to_location(rct_window *w, sint32 x, sint32 y, sint32 z)
|
|||
*
|
||||
* rct2: 0x00688956
|
||||
*/
|
||||
static void sub_688956()
|
||||
static void call_event_unknown_14_on_all_windows()
|
||||
{
|
||||
rct_window *w;
|
||||
|
||||
|
@ -1451,7 +1451,7 @@ void window_rotate_camera(rct_window *w, sint32 direction)
|
|||
x = (viewport->view_width >> 1) + viewport->view_x;
|
||||
y = (viewport->view_height >> 1) + viewport->view_y;
|
||||
|
||||
sub_689174(&x, &y, &z);
|
||||
viewport_adjust_for_map_height(&x, &y, &z);
|
||||
}
|
||||
else {
|
||||
z = map_element_height(x, y);
|
||||
|
@ -1469,7 +1469,7 @@ void window_rotate_camera(rct_window *w, sint32 direction)
|
|||
|
||||
window_invalidate(w);
|
||||
|
||||
sub_688956();
|
||||
call_event_unknown_14_on_all_windows();
|
||||
reset_all_sprite_quadrant_placements();
|
||||
}
|
||||
|
||||
|
|
|
@ -292,7 +292,7 @@ void research_update()
|
|||
*
|
||||
* rct2: 0x00684AC3
|
||||
*/
|
||||
void sub_684AC3(){
|
||||
void research_reset_current_item(){
|
||||
rct_research_item* research = gResearchItems;
|
||||
for (; research->entryIndex != RESEARCHED_ITEMS_END; research++);
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ extern bool gSilentResearch;
|
|||
void research_reset_items();
|
||||
void research_update_uncompleted_types();
|
||||
void research_update();
|
||||
void sub_684AC3();
|
||||
void research_reset_current_item();
|
||||
void research_remove_non_separate_vehicle_types();
|
||||
void research_populate_list_random();
|
||||
void research_populate_list_researched();
|
||||
|
|
|
@ -592,7 +592,7 @@ bool paint_attach_to_previous_ps(uint32 image_id, uint16 x, uint16 y)
|
|||
* @param y_offsets (di)
|
||||
* @param rotation (ebp)
|
||||
*/
|
||||
void sub_685EBC(money32 amount, rct_string_id string_id, sint16 y, sint16 z, sint8 y_offsets[], sint16 offset_x, uint32 rotation)
|
||||
void paint_floating_money_effect(money32 amount, rct_string_id string_id, sint16 y, sint16 z, sint8 y_offsets[], sint16 offset_x, uint32 rotation)
|
||||
{
|
||||
if (gNextFreePaintStruct >= gEndOfPaintStructArray) {
|
||||
return;
|
||||
|
|
|
@ -170,7 +170,7 @@ void paint_util_push_tunnel_rotated(uint8 direction, uint16 height, uint8 type);
|
|||
|
||||
bool paint_attach_to_previous_attach(uint32 image_id, uint16 x, uint16 y);
|
||||
bool paint_attach_to_previous_ps(uint32 image_id, uint16 x, uint16 y);
|
||||
void sub_685EBC(money32 amount, rct_string_id string_id, sint16 y, sint16 z, sint8 y_offsets[], sint16 offset_x, uint32 rotation);
|
||||
void paint_floating_money_effect(money32 amount, rct_string_id string_id, sint16 y, sint16 z, sint8 y_offsets[], sint16 offset_x, uint32 rotation);
|
||||
|
||||
void paint_init(rct_drawpixelinfo * dpi);
|
||||
void paint_generate_structs(rct_drawpixelinfo * dpi);
|
||||
|
|
|
@ -57,7 +57,7 @@ void misc_paint(rct_sprite *misc, sint32 imageDirection)
|
|||
|
||||
rct_money_effect * moneyEffect = &misc->money_effect;
|
||||
rct_string_id stringId = money_effect_get_string_id(moneyEffect);
|
||||
sub_685EBC(moneyEffect->value, stringId, moneyEffect->y, moneyEffect->z, (sint8 *) &money_wave[moneyEffect->wiggle % 22], moneyEffect->offset_x, get_current_rotation());
|
||||
paint_floating_money_effect(moneyEffect->value, stringId, moneyEffect->y, moneyEffect->z, (sint8 *) &money_wave[moneyEffect->wiggle % 22], moneyEffect->offset_x, get_current_rotation());
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -130,8 +130,8 @@ static sint32 peep_empty_container_standard_flag(rct_peep* peep);
|
|||
static sint32 peep_empty_container_extra_flag(rct_peep* peep);
|
||||
static sint32 peep_should_find_bench(rct_peep* peep);
|
||||
static void peep_stop_purchase_thought(rct_peep* peep, uint8 ride_type);
|
||||
static void sub_693BAB(rct_peep* peep);
|
||||
static sint32 sub_693C9E(rct_peep *peep);
|
||||
static void peep_switch_to_next_action_sprite_type(rct_peep* peep);
|
||||
static sint32 peep_perform_next_action(rct_peep *peep);
|
||||
static void peep_spend_money(rct_peep *peep, money16 *peep_expend_type, money32 amount);
|
||||
static void peep_set_has_ridden(rct_peep *peep, sint32 rideIndex);
|
||||
static bool peep_has_ridden(rct_peep *peep, sint32 rideIndex);
|
||||
|
@ -141,7 +141,7 @@ static void peep_on_enter_or_exit_ride(rct_peep *peep, sint32 rideIndex, sint32
|
|||
static void peep_update_favourite_ride(rct_peep *peep, rct_ride *ride);
|
||||
static sint16 peep_calculate_ride_satisfaction(rct_peep *peep, rct_ride *ride);
|
||||
static void peep_update_ride_nausea_growth(rct_peep *peep, rct_ride *ride);
|
||||
static bool sub_69AF1E(rct_peep *peep, sint32 rideIndex, sint32 shopItem, money32 price);
|
||||
static bool peep_decide_and_buy_item(rct_peep *peep, sint32 rideIndex, sint32 shopItem, money32 price);
|
||||
static bool peep_should_use_cash_machine(rct_peep *peep, sint32 rideIndex);
|
||||
static bool peep_should_go_on_ride(rct_peep *peep, sint32 rideIndex, sint32 entranceNum, sint32 flags);
|
||||
static void peep_ride_is_too_intense(rct_peep *peep, sint32 rideIndex, bool peepAtRide);
|
||||
|
@ -170,7 +170,7 @@ static bool peep_update_fixing_sub_state_11(bool firstRun, rct_peep *peep, rct_r
|
|||
static bool peep_update_fixing_sub_state_12(bool firstRun, rct_peep *peep, rct_ride *ride);
|
||||
static bool peep_update_fixing_sub_state_13(bool firstRun, sint32 steps, rct_peep *peep, rct_ride *ride);
|
||||
static bool peep_update_fixing_sub_state_14(bool firstRun, rct_peep *peep, rct_ride *ride);
|
||||
static void sub_6B7588(sint32 rideIndex);
|
||||
static void peep_update_ride_inspected(sint32 rideIndex);
|
||||
|
||||
bool loc_690FD0(rct_peep *peep, uint8 *rideToView, uint8 *rideSeatToView, rct_map_element *esi);
|
||||
|
||||
|
@ -702,7 +702,7 @@ static void peep_leave_park(rct_peep* peep){
|
|||
*
|
||||
* rct2: 0x0068F8CD
|
||||
*/
|
||||
static void sub_68F8CD(rct_peep *peep)
|
||||
static void peep_decide_whether_to_leave_park(rct_peep *peep)
|
||||
{
|
||||
if (peep->energy_growth_rate >= 33) {
|
||||
peep->energy_growth_rate -= 2;
|
||||
|
@ -909,7 +909,7 @@ static void sub_68F41A(rct_peep *peep, sint32 index)
|
|||
}
|
||||
|
||||
peep->action_sprite_type = 0xFF;
|
||||
sub_693B58(peep);
|
||||
peep_update_current_action_sprite_type(peep);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1113,7 +1113,7 @@ static void sub_68F41A(rct_peep *peep, sint32 index)
|
|||
case PEEP_STATE_WALKING:
|
||||
case PEEP_STATE_LEAVING_PARK:
|
||||
case PEEP_STATE_ENTERING_PARK:
|
||||
sub_68F8CD(peep);
|
||||
peep_decide_whether_to_leave_park(peep);
|
||||
peep_update_hunger(peep);
|
||||
break;
|
||||
|
||||
|
@ -1180,7 +1180,7 @@ static void sub_68F41A(rct_peep *peep, sint32 index)
|
|||
case PEEP_STATE_ENTERING_RIDE:
|
||||
if (peep->sub_state == 17 ||
|
||||
peep->sub_state == 15){
|
||||
sub_68F8CD(peep);
|
||||
peep_decide_whether_to_leave_park(peep);
|
||||
}
|
||||
peep_update_hunger(peep);
|
||||
break;
|
||||
|
@ -1219,7 +1219,7 @@ static void sub_68F41A(rct_peep *peep, sint32 index)
|
|||
peep->action = PEEP_ACTION_THROW_UP;
|
||||
peep->action_frame = 0;
|
||||
peep->action_sprite_image_offset = 0;
|
||||
sub_693B58(peep);
|
||||
peep_update_current_action_sprite_type(peep);
|
||||
invalidate_sprite_2((rct_sprite*)peep);
|
||||
}
|
||||
}
|
||||
|
@ -1392,12 +1392,18 @@ static uint8 peep_get_action_sprite_type(rct_peep* peep)
|
|||
}
|
||||
}
|
||||
|
||||
void sub_693B58(rct_peep* peep){
|
||||
|
||||
/*
|
||||
* rct2: 0x00693B58
|
||||
*/
|
||||
void peep_update_current_action_sprite_type(rct_peep* peep){
|
||||
if (peep->sprite_type >= countof(g_peep_animation_entries)) {
|
||||
return;
|
||||
}
|
||||
uint8 action_sprite_type = peep_get_action_sprite_type(peep);
|
||||
if (action_sprite_type == peep->action_sprite_type)return;
|
||||
if (action_sprite_type == peep->action_sprite_type) {
|
||||
return;
|
||||
}
|
||||
|
||||
invalidate_sprite_2((rct_sprite*)peep);
|
||||
peep->action_sprite_type = action_sprite_type;
|
||||
|
@ -1411,16 +1417,16 @@ void sub_693B58(rct_peep* peep){
|
|||
}
|
||||
|
||||
/* 0x00693BE5 */
|
||||
void sub_693BE5(rct_peep* peep, uint8 al){
|
||||
if (al == peep->special_sprite)return;
|
||||
void peep_switch_to_special_sprite(rct_peep* peep, uint8 special_sprite_id){
|
||||
if (special_sprite_id == peep->special_sprite)return;
|
||||
|
||||
peep->special_sprite = al;
|
||||
peep->special_sprite = special_sprite_id;
|
||||
|
||||
// If NONE_1 or NONE_2
|
||||
if (peep->action >= PEEP_ACTION_NONE_1){
|
||||
peep->action_sprite_image_offset = 0;
|
||||
}
|
||||
sub_693B58(peep);
|
||||
peep_update_current_action_sprite_type(peep);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1435,7 +1441,7 @@ void remove_peep_from_ride(rct_peep* peep)
|
|||
peep_decrement_num_riders(peep);
|
||||
peep->state = PEEP_STATE_1;
|
||||
peep_window_state_update(peep);
|
||||
sub_693BE5(peep, 0);
|
||||
peep_switch_to_special_sprite(peep, 0);
|
||||
}
|
||||
|
||||
static void peep_state_reset(rct_peep* peep){
|
||||
|
@ -1443,7 +1449,7 @@ static void peep_state_reset(rct_peep* peep){
|
|||
peep->state = PEEP_STATE_1;
|
||||
peep_window_state_update(peep);
|
||||
|
||||
sub_693BE5(peep, 0);
|
||||
peep_switch_to_special_sprite(peep, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1587,7 +1593,7 @@ static sint32 peep_update_action(sint16* x, sint16* y, sint16* xy_distance, rct_
|
|||
if (peep->action_frame >= peepAnimation[peep->action_sprite_type].num_frames){
|
||||
peep->action_sprite_image_offset = 0;
|
||||
peep->action = 0xFF;
|
||||
sub_693B58(peep);
|
||||
peep_update_current_action_sprite_type(peep);
|
||||
invalidate_sprite_2((rct_sprite*)peep);
|
||||
*x = peep->x;
|
||||
*y = peep->y;
|
||||
|
@ -1658,17 +1664,17 @@ static void set_sprite_type(rct_peep* peep, uint8 type){
|
|||
}
|
||||
|
||||
peep->action_sprite_type = 0xFF;
|
||||
sub_693B58(peep);
|
||||
peep_update_current_action_sprite_type(peep);
|
||||
|
||||
if (peep->state == PEEP_STATE_SITTING){
|
||||
peep->action = PEEP_ACTION_NONE_1;
|
||||
peep->next_action_sprite_type = 7;
|
||||
sub_693BAB(peep);
|
||||
peep_switch_to_next_action_sprite_type(peep);
|
||||
}
|
||||
if (peep->state == PEEP_STATE_WATCHING){
|
||||
peep->action = PEEP_ACTION_NONE_1;
|
||||
peep->next_action_sprite_type = 2;
|
||||
sub_693BAB(peep);
|
||||
peep_switch_to_next_action_sprite_type(peep);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1924,7 +1930,7 @@ bool peep_pickup_place(rct_peep* peep, sint32 x, sint32 y, sint32 z, bool apply)
|
|||
if (peep->type == PEEP_TYPE_GUEST) {
|
||||
peep->action_sprite_type = 0xFF;
|
||||
peep->happiness_growth_rate = max(peep->happiness_growth_rate - 10, 0);
|
||||
sub_693B58(peep);
|
||||
peep_update_current_action_sprite_type(peep);
|
||||
}
|
||||
|
||||
network_set_pickup_peep(game_command_playerid, 0);
|
||||
|
@ -2113,7 +2119,7 @@ static void peep_update_falling(rct_peep* peep){
|
|||
peep->action_frame = 0;
|
||||
peep->action_sprite_image_offset = 0;
|
||||
|
||||
sub_693B58(peep);
|
||||
peep_update_current_action_sprite_type(peep);
|
||||
invalidate_sprite_2((rct_sprite*)peep);
|
||||
peep_window_state_update(peep);
|
||||
return;
|
||||
|
@ -2178,7 +2184,7 @@ static void peep_try_get_up_from_sitting(rct_peep* peep){
|
|||
peep->destination_x = (peep->x & 0xFFE0) + 16;
|
||||
peep->destination_y = (peep->y & 0xFFE0) + 16;
|
||||
peep->destination_tolerence = 5;
|
||||
sub_693B58(peep);
|
||||
peep_update_current_action_sprite_type(peep);
|
||||
}
|
||||
|
||||
/** rct2: 0x00981F2C, 0x00981F2E */
|
||||
|
@ -2202,7 +2208,7 @@ static void peep_update_sitting(rct_peep* peep){
|
|||
if (!checkForPath(peep))return;
|
||||
//691541
|
||||
|
||||
sub_693C9E(peep);
|
||||
peep_perform_next_action(peep);
|
||||
if (!(_unk_F1EE18 & F1EE18_DESTINATION_REACHED)) return;
|
||||
|
||||
sint32 ebx = peep->var_37 & 0x7;
|
||||
|
@ -2217,7 +2223,7 @@ static void peep_update_sitting(rct_peep* peep){
|
|||
invalidate_sprite_2((rct_sprite*)peep);
|
||||
peep->action = 254;
|
||||
peep->next_action_sprite_type = 7;
|
||||
sub_693BAB(peep);
|
||||
peep_switch_to_next_action_sprite_type(peep);
|
||||
|
||||
peep->sub_state++;
|
||||
|
||||
|
@ -2244,7 +2250,7 @@ static void peep_update_sitting(rct_peep* peep){
|
|||
peep->destination_x = (peep->x & 0xFFE0) + 16;
|
||||
peep->destination_y = (peep->y & 0xFFE0) + 16;
|
||||
peep->destination_tolerence = 5;
|
||||
sub_693B58(peep);
|
||||
peep_update_current_action_sprite_type(peep);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2261,7 +2267,7 @@ static void peep_update_sitting(rct_peep* peep){
|
|||
peep->action = PEEP_ACTION_SITTING_EAT_FOOD;
|
||||
peep->action_frame = 0;
|
||||
peep->action_sprite_image_offset = 0;
|
||||
sub_693B58(peep);
|
||||
peep_update_current_action_sprite_type(peep);
|
||||
invalidate_sprite_2((rct_sprite*)peep);
|
||||
return;
|
||||
}
|
||||
|
@ -2286,7 +2292,7 @@ static void peep_update_sitting(rct_peep* peep){
|
|||
}
|
||||
peep->action_frame = 0;
|
||||
peep->action_sprite_image_offset = 0;
|
||||
sub_693B58(peep);
|
||||
peep_update_current_action_sprite_type(peep);
|
||||
invalidate_sprite_2((rct_sprite*)peep);
|
||||
return;
|
||||
}
|
||||
|
@ -2891,7 +2897,7 @@ static void peep_update_ride_sub_state_2_enter_ride(rct_peep* peep, rct_ride* ri
|
|||
}
|
||||
|
||||
if (ride->type == RIDE_TYPE_SPIRAL_SLIDE){
|
||||
sub_693BE5(peep, 1);
|
||||
peep_switch_to_special_sprite(peep, 1);
|
||||
}
|
||||
|
||||
peep_update_ride_sub_state_1(peep);
|
||||
|
@ -3366,14 +3372,14 @@ static void peep_update_ride_sub_state_9(rct_peep* peep){
|
|||
return;
|
||||
}
|
||||
|
||||
sub_693BE5(peep, 0);
|
||||
peep_switch_to_special_sprite(peep, 0);
|
||||
sprite_move(x, y, peep->z, (rct_sprite*)peep);
|
||||
invalidate_sprite_2((rct_sprite*)peep);
|
||||
}
|
||||
|
||||
if (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_RIDE_PHOTO){
|
||||
uint8 secondaryItem = RidePhotoItems[ride->type];
|
||||
if (sub_69AF1E(peep, peep->current_ride, secondaryItem, ride->price_secondary)) {
|
||||
if (peep_decide_and_buy_item(peep, peep->current_ride, secondaryItem, ride->price_secondary)) {
|
||||
ride->no_secondary_items_sold++;
|
||||
}
|
||||
}
|
||||
|
@ -3842,7 +3848,7 @@ static void peep_update_ride_sub_state_17(rct_peep* peep){
|
|||
peep->action = PEEP_ACTION_JUMP;
|
||||
peep->action_frame = 0;
|
||||
peep->action_sprite_image_offset = 0;
|
||||
sub_693B58(peep);
|
||||
peep_update_current_action_sprite_type(peep);
|
||||
invalidate_sprite_2((rct_sprite*)peep);
|
||||
}
|
||||
}
|
||||
|
@ -4380,7 +4386,7 @@ static bool peep_update_fixing_sub_state_2345(bool firstRun, rct_peep *peep, rct
|
|||
peep->action = (scenario_rand() & 1) ? PEEP_ACTION_STAFF_FIX_2 : PEEP_ACTION_STAFF_FIX;
|
||||
peep->action_sprite_image_offset = 0;
|
||||
peep->action_frame = 0;
|
||||
sub_693B58(peep);
|
||||
peep_update_current_action_sprite_type(peep);
|
||||
invalidate_sprite_2((rct_sprite *) peep);
|
||||
}
|
||||
|
||||
|
@ -4417,7 +4423,7 @@ static bool peep_update_fixing_sub_state_6(bool firstRun, rct_peep *peep, rct_ri
|
|||
peep->action_sprite_image_offset = 0;
|
||||
peep->action_frame = 0;
|
||||
|
||||
sub_693B58(peep);
|
||||
peep_update_current_action_sprite_type(peep);
|
||||
invalidate_sprite_2((rct_sprite *) peep);
|
||||
}
|
||||
|
||||
|
@ -4515,7 +4521,7 @@ static bool peep_update_fixing_sub_state_8(bool firstRun, rct_peep *peep) {
|
|||
peep->action_frame = 0;
|
||||
peep->action_sprite_image_offset = 0;
|
||||
|
||||
sub_693B58(peep);
|
||||
peep_update_current_action_sprite_type(peep);
|
||||
invalidate_sprite_2((rct_sprite *) peep);
|
||||
}
|
||||
|
||||
|
@ -4620,7 +4626,7 @@ static bool peep_update_fixing_sub_state_10(bool firstRun, rct_peep *peep, rct_r
|
|||
peep->action_frame = 0;
|
||||
peep->action_sprite_image_offset = 0;
|
||||
|
||||
sub_693B58(peep);
|
||||
peep_update_current_action_sprite_type(peep);
|
||||
invalidate_sprite_2((rct_sprite *) peep);
|
||||
}
|
||||
|
||||
|
@ -4646,7 +4652,7 @@ static bool peep_update_fixing_sub_state_11(bool firstRun, rct_peep *peep, rct_r
|
|||
peep->action_frame = 0;
|
||||
peep->action_sprite_image_offset = 0;
|
||||
|
||||
sub_693B58(peep);
|
||||
peep_update_current_action_sprite_type(peep);
|
||||
invalidate_sprite_2((rct_sprite *) peep);
|
||||
}
|
||||
|
||||
|
@ -4722,7 +4728,7 @@ static bool peep_update_fixing_sub_state_13(bool firstRun, sint32 steps, rct_pee
|
|||
|
||||
if (!firstRun) {
|
||||
if (peep->state == PEEP_STATE_INSPECTING) {
|
||||
sub_6B7588(peep->current_ride);
|
||||
peep_update_ride_inspected(peep->current_ride);
|
||||
|
||||
peep->staff_rides_inspected++;
|
||||
peep->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME | RIDE_INVALIDATE_RIDE_LIST;
|
||||
|
@ -4738,7 +4744,7 @@ static bool peep_update_fixing_sub_state_13(bool firstRun, sint32 steps, rct_pee
|
|||
peep->action_frame = 0;
|
||||
peep->action_sprite_image_offset = 0;
|
||||
|
||||
sub_693B58(peep);
|
||||
peep_update_current_action_sprite_type(peep);
|
||||
invalidate_sprite_2((rct_sprite *) peep);
|
||||
}
|
||||
|
||||
|
@ -4810,7 +4816,7 @@ static bool peep_update_fixing_sub_state_14(bool firstRun, rct_peep *peep, rct_r
|
|||
/**
|
||||
* rct2: 0x6B7588
|
||||
*/
|
||||
static void sub_6B7588(sint32 rideIndex) {
|
||||
static void peep_update_ride_inspected(sint32 rideIndex) {
|
||||
rct_ride *ride = get_ride(rideIndex);
|
||||
ride->lifecycle_flags &= ~RIDE_LIFECYCLE_DUE_INSPECTION;
|
||||
|
||||
|
@ -4870,7 +4876,7 @@ static void peep_update_queuing(rct_peep* peep){
|
|||
return;
|
||||
}
|
||||
|
||||
sub_693C9E(peep);
|
||||
peep_perform_next_action(peep);
|
||||
if (peep->action < 0xFE)return;
|
||||
if (peep->sprite_type == PEEP_SPRITE_TYPE_NORMAL) {
|
||||
if (peep->time_in_queue >= 2000 && (0xFFFF & scenario_rand()) <= 119){
|
||||
|
@ -4878,7 +4884,7 @@ static void peep_update_queuing(rct_peep* peep){
|
|||
peep->action = PEEP_ACTION_EAT_FOOD;
|
||||
peep->action_frame = 0;
|
||||
peep->action_sprite_image_offset = 0;
|
||||
sub_693B58(peep);
|
||||
peep_update_current_action_sprite_type(peep);
|
||||
invalidate_sprite_2((rct_sprite*)peep);
|
||||
}
|
||||
if (peep->time_in_queue >= 3500 && (0xFFFF & scenario_rand()) <= 93)
|
||||
|
@ -4916,7 +4922,7 @@ static void peep_update_queuing(rct_peep* peep){
|
|||
peep->action = PEEP_ACTION_EAT_FOOD;
|
||||
peep->action_frame = 0;
|
||||
peep->action_sprite_image_offset = 0;
|
||||
sub_693B58(peep);
|
||||
peep_update_current_action_sprite_type(peep);
|
||||
invalidate_sprite_2((rct_sprite*)peep);
|
||||
break;
|
||||
}
|
||||
|
@ -4967,7 +4973,7 @@ static void peep_update_mowing(rct_peep* peep){
|
|||
peep->var_37++;
|
||||
|
||||
if (peep->var_37 == 1){
|
||||
sub_693BE5(peep, 2);
|
||||
peep_switch_to_special_sprite(peep, 2);
|
||||
}
|
||||
|
||||
if (peep->var_37 == countof(_9929C8)) {
|
||||
|
@ -5002,14 +5008,14 @@ static void peep_update_watering(rct_peep* peep){
|
|||
if (peep->sub_state == 0){
|
||||
if (!checkForPath(peep))return;
|
||||
|
||||
sub_693C9E(peep);
|
||||
peep_perform_next_action(peep);
|
||||
if (!(_unk_F1EE18 & F1EE18_DESTINATION_REACHED)) return;
|
||||
|
||||
peep->sprite_direction = (peep->var_37 & 3) << 3;
|
||||
peep->action = PEEP_ACTION_STAFF_WATERING;
|
||||
peep->action_frame = 0;
|
||||
peep->action_sprite_image_offset = 0;
|
||||
sub_693B58(peep);
|
||||
peep_update_current_action_sprite_type(peep);
|
||||
invalidate_sprite_2((rct_sprite*)peep);
|
||||
|
||||
peep->sub_state = 1;
|
||||
|
@ -5058,14 +5064,14 @@ static void peep_update_emptying_bin(rct_peep* peep){
|
|||
if (peep->sub_state == 0){
|
||||
if (!checkForPath(peep))return;
|
||||
|
||||
sub_693C9E(peep);
|
||||
peep_perform_next_action(peep);
|
||||
if (!(_unk_F1EE18 & F1EE18_DESTINATION_REACHED)) return;
|
||||
|
||||
peep->sprite_direction = (peep->var_37 & 3) << 3;
|
||||
peep->action = PEEP_ACTION_STAFF_EMPTY_BIN;
|
||||
peep->action_frame = 0;
|
||||
peep->action_sprite_image_offset = 0;
|
||||
sub_693B58(peep);
|
||||
peep_update_current_action_sprite_type(peep);
|
||||
invalidate_sprite_2((rct_sprite*)peep);
|
||||
|
||||
peep->sub_state = 1;
|
||||
|
@ -5148,7 +5154,7 @@ static void peep_update_sweeping(rct_peep* peep){
|
|||
peep->action = PEEP_ACTION_STAFF_SWEEP;
|
||||
peep->action_frame = 0;
|
||||
peep->action_sprite_image_offset = 0;
|
||||
sub_693B58(peep);
|
||||
peep_update_current_action_sprite_type(peep);
|
||||
invalidate_sprite_2((rct_sprite*)peep);
|
||||
return;
|
||||
}
|
||||
|
@ -5196,7 +5202,7 @@ static void peep_update_picked(rct_peep* peep){
|
|||
*/
|
||||
static void peep_update_leaving_park(rct_peep* peep){
|
||||
if (peep->var_37 != 0){
|
||||
sub_693C9E(peep);
|
||||
peep_perform_next_action(peep);
|
||||
if (!(_unk_F1EE18 & F1EE18_OUTSIDE_PARK)) return;
|
||||
peep_sprite_remove(peep);
|
||||
return;
|
||||
|
@ -5218,7 +5224,7 @@ static void peep_update_leaving_park(rct_peep* peep){
|
|||
|
||||
window_invalidate_by_class(WC_GUEST_LIST);
|
||||
|
||||
sub_693C9E(peep);
|
||||
peep_perform_next_action(peep);
|
||||
if (!(_unk_F1EE18 & F1EE18_OUTSIDE_PARK)) return;
|
||||
peep_sprite_remove(peep);
|
||||
}
|
||||
|
@ -5231,7 +5237,7 @@ static void peep_update_watching(rct_peep* peep){
|
|||
if (peep->sub_state == 0){
|
||||
if (!checkForPath(peep))return;
|
||||
|
||||
sub_693C9E(peep);
|
||||
peep_perform_next_action(peep);
|
||||
if (!(_unk_F1EE18 & F1EE18_DESTINATION_REACHED)) return;
|
||||
|
||||
peep->destination_x = peep->x;
|
||||
|
@ -5243,7 +5249,7 @@ static void peep_update_watching(rct_peep* peep){
|
|||
peep->action = 0xFE;
|
||||
peep->next_action_sprite_type = 2;
|
||||
|
||||
sub_693BAB(peep);
|
||||
peep_switch_to_next_action_sprite_type(peep);
|
||||
|
||||
peep->sub_state++;
|
||||
|
||||
|
@ -5265,7 +5271,7 @@ static void peep_update_watching(rct_peep* peep){
|
|||
peep->action = PEEP_ACTION_EAT_FOOD;
|
||||
peep->action_frame = 0;
|
||||
peep->action_sprite_image_offset = 0;
|
||||
sub_693B58(peep);
|
||||
peep_update_current_action_sprite_type(peep);
|
||||
invalidate_sprite_2((rct_sprite*)peep);
|
||||
return;
|
||||
}
|
||||
|
@ -5275,7 +5281,7 @@ static void peep_update_watching(rct_peep* peep){
|
|||
peep->action = PEEP_ACTION_TAKE_PHOTO;
|
||||
peep->action_frame = 0;
|
||||
peep->action_sprite_image_offset = 0;
|
||||
sub_693B58(peep);
|
||||
peep_update_current_action_sprite_type(peep);
|
||||
invalidate_sprite_2((rct_sprite*)peep);
|
||||
return;
|
||||
}
|
||||
|
@ -5285,7 +5291,7 @@ static void peep_update_watching(rct_peep* peep){
|
|||
peep->action = PEEP_ACTION_WAVE;
|
||||
peep->action_frame = 0;
|
||||
peep->action_sprite_image_offset = 0;
|
||||
sub_693B58(peep);
|
||||
peep_update_current_action_sprite_type(peep);
|
||||
invalidate_sprite_2((rct_sprite*)peep);
|
||||
return;
|
||||
}
|
||||
|
@ -5306,7 +5312,7 @@ static void peep_update_watching(rct_peep* peep){
|
|||
peep->destination_x = (peep->x & 0xFFE0) + 16;
|
||||
peep->destination_y = (peep->y & 0xFFE0) + 16;
|
||||
peep->destination_tolerence = 5;
|
||||
sub_693B58(peep);
|
||||
peep_update_current_action_sprite_type(peep);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5315,7 +5321,7 @@ static void peep_update_watching(rct_peep* peep){
|
|||
*/
|
||||
static void peep_update_entering_park(rct_peep* peep){
|
||||
if (peep->var_37 != 1){
|
||||
sub_693C9E(peep);
|
||||
peep_perform_next_action(peep);
|
||||
if ((_unk_F1EE18 & F1EE18_OUTSIDE_PARK)) {
|
||||
decrement_guests_heading_for_park();
|
||||
peep_sprite_remove(peep);
|
||||
|
@ -5615,7 +5621,7 @@ static void peep_update_buying(rct_peep* peep)
|
|||
peep->action_frame = 0;
|
||||
peep->action_sprite_image_offset = 0;
|
||||
|
||||
sub_693B58(peep);
|
||||
peep_update_current_action_sprite_type(peep);
|
||||
invalidate_sprite_2((rct_sprite*)peep);
|
||||
|
||||
ride->no_primary_items_sold++;
|
||||
|
@ -5626,7 +5632,7 @@ static void peep_update_buying(rct_peep* peep)
|
|||
if (ride_type->shop_item_secondary != 0xFF){
|
||||
money16 price = ride->price_secondary;
|
||||
|
||||
item_bought = sub_69AF1E(peep, peep->current_ride, ride_type->shop_item_secondary, price);
|
||||
item_bought = peep_decide_and_buy_item(peep, peep->current_ride, ride_type->shop_item_secondary, price);
|
||||
if (item_bought) {
|
||||
ride->no_secondary_items_sold++;
|
||||
}
|
||||
|
@ -5635,7 +5641,7 @@ static void peep_update_buying(rct_peep* peep)
|
|||
if (!item_bought && ride_type->shop_item != 0xFF){
|
||||
money16 price = ride->price;
|
||||
|
||||
item_bought = sub_69AF1E(peep, peep->current_ride, ride_type->shop_item, price);
|
||||
item_bought = peep_decide_and_buy_item(peep, peep->current_ride, ride_type->shop_item, price);
|
||||
if (item_bought) {
|
||||
ride->no_primary_items_sold++;
|
||||
}
|
||||
|
@ -5721,7 +5727,7 @@ static void peep_update_using_bin(rct_peep* peep){
|
|||
if (peep->sub_state == 0){
|
||||
if (!checkForPath(peep))return;
|
||||
|
||||
sub_693C9E(peep);
|
||||
peep_perform_next_action(peep);
|
||||
if (!(_unk_F1EE18 & F1EE18_DESTINATION_REACHED)) return;
|
||||
|
||||
peep->sub_state = 1;
|
||||
|
@ -5895,7 +5901,7 @@ static void peep_update_heading_to_inspect(rct_peep* peep){
|
|||
|
||||
if (!checkForPath(peep))return;
|
||||
|
||||
sub_693C9E(peep);
|
||||
peep_perform_next_action(peep);
|
||||
|
||||
if (!(_unk_F1EE18 & F1EE18_RIDE_EXIT) &&
|
||||
!(_unk_F1EE18 & F1EE18_RIDE_ENTRANCE)
|
||||
|
@ -5978,7 +5984,7 @@ static void peep_update_answering(rct_peep* peep){
|
|||
peep->action_frame = 0;
|
||||
peep->action_sprite_image_offset = 0;
|
||||
|
||||
sub_693B58(peep);
|
||||
peep_update_current_action_sprite_type(peep);
|
||||
invalidate_sprite_2((rct_sprite*)peep);
|
||||
|
||||
peep->sub_state = 1;
|
||||
|
@ -6012,7 +6018,7 @@ static void peep_update_answering(rct_peep* peep){
|
|||
|
||||
if (!checkForPath(peep))return;
|
||||
|
||||
sub_693C9E(peep);
|
||||
peep_perform_next_action(peep);
|
||||
|
||||
if (!(_unk_F1EE18 & F1EE18_RIDE_EXIT) &&
|
||||
!(_unk_F1EE18 & F1EE18_RIDE_ENTRANCE)
|
||||
|
@ -6286,7 +6292,7 @@ static void peep_update_patrolling(rct_peep* peep){
|
|||
|
||||
if (!checkForPath(peep))return;
|
||||
|
||||
sub_693C9E(peep);
|
||||
peep_perform_next_action(peep);
|
||||
if (!(_unk_F1EE18 & F1EE18_DESTINATION_REACHED)) return;
|
||||
|
||||
if ((peep->next_var_29 & 0x18) == 8){
|
||||
|
@ -6371,7 +6377,7 @@ static void peep_update_walking(rct_peep* peep){
|
|||
peep->action_frame = 0;
|
||||
peep->action_sprite_image_offset = 0;
|
||||
|
||||
sub_693B58(peep);
|
||||
peep_update_current_action_sprite_type(peep);
|
||||
invalidate_sprite_2((rct_sprite*)peep);
|
||||
}
|
||||
}
|
||||
|
@ -6386,7 +6392,7 @@ static void peep_update_walking(rct_peep* peep){
|
|||
peep->action_frame = 0;
|
||||
peep->action_sprite_image_offset = 0;
|
||||
|
||||
sub_693B58(peep);
|
||||
peep_update_current_action_sprite_type(peep);
|
||||
invalidate_sprite_2((rct_sprite*)peep);
|
||||
}
|
||||
}
|
||||
|
@ -6401,7 +6407,7 @@ static void peep_update_walking(rct_peep* peep){
|
|||
peep->action_frame = 0;
|
||||
peep->action_sprite_image_offset = 0;
|
||||
|
||||
sub_693B58(peep);
|
||||
peep_update_current_action_sprite_type(peep);
|
||||
invalidate_sprite_2((rct_sprite*)peep);
|
||||
}
|
||||
}
|
||||
|
@ -6461,7 +6467,7 @@ static void peep_update_walking(rct_peep* peep){
|
|||
}
|
||||
}
|
||||
|
||||
sub_693C9E(peep);
|
||||
peep_perform_next_action(peep);
|
||||
if (!(_unk_F1EE18 & F1EE18_DESTINATION_REACHED)) return;
|
||||
|
||||
if ((peep->next_var_29 & 0x18) == 8){
|
||||
|
@ -7004,7 +7010,7 @@ void peep_applause()
|
|||
peep->action = PEEP_ACTION_CLAP;
|
||||
peep->action_frame = 0;
|
||||
peep->action_sprite_image_offset = 0;
|
||||
sub_693B58(peep);
|
||||
peep_update_current_action_sprite_type(peep);
|
||||
invalidate_sprite_2((rct_sprite*)peep);
|
||||
}
|
||||
}
|
||||
|
@ -7744,7 +7750,7 @@ void peep_insert_new_thought(rct_peep *peep, uint8 thought_type, uint8 thought_a
|
|||
peep->action = action;
|
||||
peep->action_frame = 0;
|
||||
peep->action_sprite_image_offset = 0;
|
||||
sub_693B58(peep);
|
||||
peep_update_current_action_sprite_type(peep);
|
||||
invalidate_sprite_2((rct_sprite*)peep);
|
||||
}
|
||||
|
||||
|
@ -7842,8 +7848,10 @@ void peep_set_map_tooltip(rct_peep *peep)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void sub_693BAB(rct_peep* peep) {
|
||||
/**
|
||||
* rct2: 0x00693BAB
|
||||
*/
|
||||
void peep_switch_to_next_action_sprite_type(rct_peep* peep) {
|
||||
// TBD: Add nextActionSpriteType as function parameter and make peep->next_action_sprite_type obsolete?
|
||||
uint8 nextActionSpriteType = peep->next_action_sprite_type;
|
||||
if (nextActionSpriteType != peep->action_sprite_type) {
|
||||
|
@ -10437,7 +10445,7 @@ static sint32 guest_path_finding(rct_peep* peep)
|
|||
*
|
||||
* rct2: 0x00693C9E
|
||||
*/
|
||||
static sint32 sub_693C9E(rct_peep *peep)
|
||||
static sint32 peep_perform_next_action(rct_peep *peep)
|
||||
{
|
||||
_unk_F1EE18 = 0;
|
||||
uint8 previousAction = peep->action;
|
||||
|
@ -10922,7 +10930,7 @@ static void peep_on_enter_or_exit_ride(rct_peep *peep, sint32 rideIndex, sint32
|
|||
*
|
||||
* rct2: 0x0069AF1E
|
||||
*/
|
||||
static bool sub_69AF1E(rct_peep *peep, sint32 rideIndex, sint32 shopItem, money32 price)
|
||||
static bool peep_decide_and_buy_item(rct_peep *peep, sint32 rideIndex, sint32 shopItem, money32 price)
|
||||
{
|
||||
rct_ride* ride = get_ride(rideIndex);
|
||||
money32 value;
|
||||
|
@ -11257,7 +11265,7 @@ static void peep_give_passing_peeps_pizza(rct_peep *peep, rct_peep *otherPeep)
|
|||
otherPeep->action = PEEP_ACTION_WAVE_2;
|
||||
otherPeep->action_frame = 0;
|
||||
otherPeep->action_sprite_image_offset = 0;
|
||||
sub_693B58(otherPeep);
|
||||
peep_update_current_action_sprite_type(otherPeep);
|
||||
invalidate_sprite_2((rct_sprite*)otherPeep);
|
||||
}
|
||||
}
|
||||
|
@ -11275,7 +11283,7 @@ static void peep_make_passing_peeps_sick(rct_peep *peep, rct_peep *otherPeep)
|
|||
otherPeep->action = PEEP_ACTION_THROW_UP;
|
||||
otherPeep->action_frame = 0;
|
||||
otherPeep->action_sprite_image_offset = 0;
|
||||
sub_693B58(otherPeep);
|
||||
peep_update_current_action_sprite_type(otherPeep);
|
||||
invalidate_sprite_2((rct_sprite*)otherPeep);
|
||||
}
|
||||
}
|
||||
|
@ -11315,7 +11323,7 @@ static void peep_easter_egg_peep_interactions(rct_peep *peep)
|
|||
peep->action = PEEP_ACTION_JOY;
|
||||
peep->action_frame = 0;
|
||||
peep->action_sprite_image_offset = 0;
|
||||
sub_693B58(peep);
|
||||
peep_update_current_action_sprite_type(peep);
|
||||
invalidate_sprite_2((rct_sprite*)peep);
|
||||
}
|
||||
}
|
||||
|
@ -11777,7 +11785,7 @@ static bool peep_should_go_on_ride(rct_peep *peep, sint32 rideIndex, sint32 entr
|
|||
|
||||
// Peeps won't go on rides that aren't sufficiently undercover while it's raining.
|
||||
// The threshold is fairly low and only requires about 10-15% of the ride to be undercover.
|
||||
if (gClimateCurrentRainLevel != 0 && (ride->undercover_portion >> 5) < 3) {
|
||||
if (gClimateCurrentRainLevel != 0 && (ride->sheltered_eighths >> 5) < 3) {
|
||||
if (peepAtRide) {
|
||||
peep_insert_new_thought(peep, PEEP_THOUGHT_TYPE_NOT_WHILE_RAINING, rideIndex);
|
||||
if (peep->happiness_growth_rate >= 64) {
|
||||
|
@ -12546,7 +12554,7 @@ static void peep_read_map(rct_peep *peep)
|
|||
peep->action = PEEP_ACTION_READ_MAP;
|
||||
peep->action_frame = 0;
|
||||
peep->action_sprite_image_offset = 0;
|
||||
sub_693B58(peep);
|
||||
peep_update_current_action_sprite_type(peep);
|
||||
invalidate_sprite_2((rct_sprite*)peep);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -539,7 +539,7 @@ typedef struct rct_peep {
|
|||
// Normally 0, 1 for carrying sliding board on spiral slide ride, 2 for carrying lawn mower
|
||||
uint8 special_sprite; // 0x6D
|
||||
uint8 action_sprite_type; // 0x6E
|
||||
// Seems to be used like a local variable, as it's always set before calling sub_693BAB, which reads this again
|
||||
// Seems to be used like a local variable, as it's always set before calling peep_switch_to_next_action_sprite_type, which reads this again
|
||||
uint8 next_action_sprite_type; // 0x6F
|
||||
uint8 action_sprite_image_offset; // 0x70
|
||||
uint8 action; // 0x71
|
||||
|
@ -751,11 +751,11 @@ void peep_decrement_num_riders(rct_peep* peep);
|
|||
void peep_insert_new_thought(rct_peep *peep, uint8 thought_type, uint8 thought_arguments);
|
||||
|
||||
void peep_set_map_tooltip(rct_peep *peep);
|
||||
void sub_693B58(rct_peep* peep);
|
||||
void peep_update_current_action_sprite_type(rct_peep* peep);
|
||||
void remove_peep_from_ride(rct_peep* peep);
|
||||
void remove_peep_from_queue(rct_peep* peep);
|
||||
|
||||
void sub_693BE5(rct_peep* peep, uint8 al);
|
||||
void peep_switch_to_special_sprite(rct_peep* peep, uint8 special_sprite_id);
|
||||
void peep_update_name_sort(rct_peep *peep);
|
||||
void peep_sort();
|
||||
void peep_update_names(bool realNames);
|
||||
|
|
|
@ -437,7 +437,7 @@ void game_command_set_staff_order(sint32 *eax, sint32 *ebx, sint32 *ecx, sint32
|
|||
peep->peep_flags |= PEEP_FLAGS_SLOW_WALK;
|
||||
}
|
||||
peep->action_frame = 0;
|
||||
sub_693B58(peep);
|
||||
peep_update_current_action_sprite_type(peep);
|
||||
invalidate_sprite_2((rct_sprite*)peep);
|
||||
window_invalidate_by_number(WC_PEEP, sprite_id);
|
||||
window_invalidate_by_class(WC_STAFF_LIST);
|
||||
|
@ -1349,7 +1349,7 @@ static sint32 staff_path_finding_entertainer(rct_peep* peep) {
|
|||
peep->action_frame = 0;
|
||||
peep->action_sprite_image_offset = 0;
|
||||
|
||||
sub_693B58(peep);
|
||||
peep_update_current_action_sprite_type(peep);
|
||||
invalidate_sprite_2((rct_sprite*)peep);
|
||||
staff_entertainer_update_nearby_peeps(peep);
|
||||
}
|
||||
|
|
|
@ -433,7 +433,7 @@ typedef struct rct1_peep {
|
|||
// Normally 0, 1 for carrying sliding board on spiral slide ride, 2 for carrying lawn mower
|
||||
uint8 special_sprite; // 0x6D
|
||||
uint8 action_sprite_type; // 0x6E
|
||||
// Seems to be used like a local variable, as it's always set before calling sub_693BAB, which reads this again
|
||||
// Seems to be used like a local variable, as it's always set before calling peep_switch_to_next_action_sprite_type, which reads this again
|
||||
uint8 next_action_sprite_type; // 0x6F
|
||||
uint8 action_sprite_image_offset; // 0x70
|
||||
uint8 action; // 0x71
|
||||
|
|
|
@ -43,7 +43,7 @@ rct_crooked_house_bound_box crooked_house_data[] = {
|
|||
* @param (ebx) image_id
|
||||
* @param (edx) height
|
||||
*/
|
||||
static void sub_88ABA4(uint8 direction, uint8 x_offset, uint8 y_offset, uint32 segment, sint32 height) {
|
||||
static void paint_crooked_house_structure(uint8 direction, uint8 x_offset, uint8 y_offset, uint32 segment, sint32 height) {
|
||||
rct_map_element *original_map_element = g_currently_drawn_item;
|
||||
|
||||
rct_ride *ride = get_ride(original_map_element->properties.track.ride_index);
|
||||
|
@ -80,10 +80,10 @@ static void paint_crooked_house(uint8 rideIndex, uint8 trackSequence, uint8 dire
|
|||
track_paint_util_paint_fences(edges, position, mapElement, ride, gTrackColours[SCHEME_MISC], height, fenceSpritesRope, get_current_rotation());
|
||||
|
||||
switch(trackSequence) {
|
||||
case 3: sub_88ABA4(direction, 32, 224, 0, height); break;
|
||||
case 3: paint_crooked_house_structure(direction, 32, 224, 0, height); break;
|
||||
// case 5: sub_88ABA4(direction, 0, 224, 1, height); break;
|
||||
case 6: sub_88ABA4(direction, 224, 32, 4, height); break;
|
||||
case 7: sub_88ABA4(direction, 224, 224, 2, height); break;
|
||||
case 6: paint_crooked_house_structure(direction, 224, 32, 4, height); break;
|
||||
case 7: paint_crooked_house_structure(direction, 224, 224, 2, height); break;
|
||||
// case 8: sub_88ABA4(rideIndex, 224, 0, 3, height); break;
|
||||
}
|
||||
|
||||
|
|
|
@ -217,7 +217,7 @@ static void ride_update_vehicle_colours(sint32 rideIndex);
|
|||
static void ride_set_vehicle_colours_to_random_preset(rct_ride *ride, uint8 preset_index);
|
||||
void loc_6DDF9C(rct_ride *ride, rct_map_element *mapElement);
|
||||
bool sub_6CA2DF(sint32 *trackType, sint32 *trackDirection, sint32 *rideIndex, sint32 *edxRS16, sint32 *x, sint32 *y, sint32 *z, sint32 *properties);
|
||||
money32 sub_6CA162(sint32 rideIndex, sint32 trackType, sint32 trackDirection, sint32 edxRS16, sint32 x, sint32 y, sint32 z);
|
||||
money32 place_provisional_track_piece(sint32 rideIndex, sint32 trackType, sint32 trackDirection, sint32 edxRS16, sint32 x, sint32 y, sint32 z);
|
||||
|
||||
rct_ride *get_ride(sint32 index)
|
||||
{
|
||||
|
@ -776,7 +776,7 @@ sint32 ride_find_track_gap(rct_xy_element *input, rct_xy_element *output)
|
|||
|
||||
w = window_find_by_class(WC_RIDE_CONSTRUCTION);
|
||||
if (w != NULL && _rideConstructionState != RIDE_CONSTRUCTION_STATE_0 && _currentRideIndex == rideIndex)
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
|
||||
bool counter = true;
|
||||
track_circuit_iterator_begin(&it, *input);
|
||||
|
@ -972,7 +972,7 @@ static rct_window *ride_create_or_find_construction_window(sint32 rideIndex)
|
|||
_currentRideIndex = rideIndex;
|
||||
w = window_ride_construction_open();
|
||||
} else {
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
_currentRideIndex = rideIndex;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1170,7 +1170,7 @@ void ride_remove_peeps(sint32 rideIndex)
|
|||
|
||||
invalidate_sprite_2((rct_sprite*)peep);
|
||||
peep->state = PEEP_STATE_FALLING;
|
||||
sub_693BE5(peep, 0);
|
||||
peep_switch_to_special_sprite(peep, 0);
|
||||
|
||||
peep->happiness = min(peep->happiness, peep->happiness_growth_rate) / 2;
|
||||
peep->happiness_growth_rate = peep->happiness;
|
||||
|
@ -1334,10 +1334,10 @@ void ride_restore_provisional_track_piece()
|
|||
if (_currentTrackSelectionFlags & TRACK_SELECTION_FLAG_TRACK) {
|
||||
sint32 x, y, z, direction, type, rideIndex, edxRS16;
|
||||
if (sub_6CA2DF(&type, &direction, &rideIndex, &edxRS16, &x, &y, &z, NULL)) {
|
||||
sub_6C96C0();
|
||||
ride_construction_remove_ghosts();
|
||||
} else {
|
||||
_currentTrackPrice = sub_6CA162(rideIndex, type, direction, edxRS16, x, y, z);
|
||||
sub_6C84CE();
|
||||
_currentTrackPrice = place_provisional_track_piece(rideIndex, type, direction, edxRS16, x, y, z);
|
||||
window_ride_construction_update_active_elements();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1388,9 +1388,8 @@ void ride_remove_provisional_track_piece()
|
|||
*
|
||||
* rct2: 0x006C96C0
|
||||
*/
|
||||
void sub_6C96C0()
|
||||
void ride_construction_remove_ghosts()
|
||||
{
|
||||
|
||||
if (_currentTrackSelectionFlags & TRACK_SELECTION_FLAG_ENTRANCE_OR_EXIT) {
|
||||
ride_entrance_exit_remove_ghost();
|
||||
_currentTrackSelectionFlags &= ~TRACK_SELECTION_FLAG_ENTRANCE_OR_EXIT;
|
||||
|
@ -1401,7 +1400,10 @@ void sub_6C96C0()
|
|||
}
|
||||
}
|
||||
|
||||
void sub_6C9627()
|
||||
/*
|
||||
* rct2: 0x006C9627
|
||||
*/
|
||||
void ride_construction_invalidate_current_track()
|
||||
{
|
||||
sint32 x, y, z;
|
||||
|
||||
|
@ -1438,7 +1440,7 @@ void sub_6C9627()
|
|||
gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_ARROW;
|
||||
map_invalidate_tile_full(_currentTrackBeginX, _currentTrackBeginY);
|
||||
}
|
||||
sub_6C96C0();
|
||||
ride_construction_remove_ghosts();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1610,7 +1612,7 @@ void ride_construction_set_default_next_piece()
|
|||
void ride_select_next_section()
|
||||
{
|
||||
if (_rideConstructionState == RIDE_CONSTRUCTION_STATE_SELECTED) {
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
sint32 x = _currentTrackBeginX;
|
||||
sint32 y = _currentTrackBeginY;
|
||||
sint32 z = _currentTrackBeginZ;
|
||||
|
@ -1619,7 +1621,7 @@ void ride_select_next_section()
|
|||
rct_map_element *mapElement;
|
||||
if (sub_6C683D(&x, &y, &z, direction & 3, type, 0, &mapElement, 0)) {
|
||||
_rideConstructionState = RIDE_CONSTRUCTION_STATE_0;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
return;
|
||||
}
|
||||
rct_xy_element inputElement, outputElement;
|
||||
|
@ -1640,7 +1642,7 @@ void ride_select_next_section()
|
|||
_currentTrackSelectionFlags = 0;
|
||||
_rideConstructionArrowPulseTime = 0;
|
||||
ride_construction_set_default_next_piece();
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1651,10 +1653,10 @@ void ride_select_next_section()
|
|||
_currentTrackPieceType = mapElement->properties.track.type;
|
||||
_currentTrackSelectionFlags = 0;
|
||||
_rideConstructionArrowPulseTime = 0;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
} else if (_rideConstructionState == RIDE_CONSTRUCTION_STATE_BACK) {
|
||||
if (ride_select_forwards_from_back()) {
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1666,7 +1668,7 @@ void ride_select_next_section()
|
|||
void ride_select_previous_section()
|
||||
{
|
||||
if (_rideConstructionState == RIDE_CONSTRUCTION_STATE_SELECTED) {
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
sint32 x = _currentTrackBeginX;
|
||||
sint32 y = _currentTrackBeginY;
|
||||
sint32 z = _currentTrackBeginZ;
|
||||
|
@ -1675,7 +1677,7 @@ void ride_select_previous_section()
|
|||
rct_map_element *mapElement;
|
||||
if (sub_6C683D(&x, &y, &z, direction & 3, type, 0, &mapElement, 0)) {
|
||||
_rideConstructionState = RIDE_CONSTRUCTION_STATE_0;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
return;
|
||||
}
|
||||
track_begin_end trackBeginEnd;
|
||||
|
@ -1687,7 +1689,7 @@ void ride_select_previous_section()
|
|||
_currentTrackPieceType = trackBeginEnd.begin_element->properties.track.type;
|
||||
_currentTrackSelectionFlags = 0;
|
||||
_rideConstructionArrowPulseTime = 0;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
} else {
|
||||
_rideConstructionState = RIDE_CONSTRUCTION_STATE_BACK;
|
||||
_currentTrackBeginX = trackBeginEnd.end_x;
|
||||
|
@ -1698,11 +1700,11 @@ void ride_select_previous_section()
|
|||
_currentTrackSelectionFlags = 0;
|
||||
_rideConstructionArrowPulseTime = 0;
|
||||
ride_construction_set_default_next_piece();
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
}
|
||||
} else if (_rideConstructionState == RIDE_CONSTRUCTION_STATE_FRONT) {
|
||||
if (ride_select_backwards_from_front()) {
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1727,7 +1729,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);
|
||||
|
@ -1735,7 +1737,7 @@ static sint32 ride_modify_entrance_or_exit(rct_map_element *mapElement, sint32 x
|
|||
return 0;
|
||||
}
|
||||
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
if (
|
||||
_rideConstructionState != RIDE_CONSTRUCTION_STATE_ENTRANCE_EXIT ||
|
||||
!(input_test_flag(INPUT_FLAG_TOOL_ACTIVE)) ||
|
||||
|
@ -1752,7 +1754,7 @@ static sint32 ride_modify_entrance_or_exit(rct_map_element *mapElement, sint32 x
|
|||
_rideConstructionState = RIDE_CONSTRUCTION_STATE_ENTRANCE_EXIT;
|
||||
}
|
||||
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_CONSTRUCT;
|
||||
} else {
|
||||
// Remove entrance / exit
|
||||
|
@ -1848,13 +1850,13 @@ sint32 ride_modify(rct_xy_element *input)
|
|||
_rideConstructionArrowPulseTime = 0;
|
||||
|
||||
if (ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_HAS_NO_TRACK)) {
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
return 1;
|
||||
}
|
||||
|
||||
ride_select_next_section();
|
||||
if (_rideConstructionState == RIDE_CONSTRUCTION_STATE_FRONT) {
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -1880,7 +1882,7 @@ sint32 ride_modify(rct_xy_element *input)
|
|||
_rideConstructionArrowPulseTime = 0;
|
||||
}
|
||||
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -1888,7 +1890,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;
|
||||
|
@ -1926,7 +1928,7 @@ sint32 sub_6CC3FB(sint32 rideIndex)
|
|||
_currentTrackSelectionFlags = 0;
|
||||
_rideConstructionArrowPulseTime = 0;
|
||||
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -4099,7 +4101,7 @@ static sint32 ride_check_block_brakes(rct_xy_element *input, rct_xy_element *out
|
|||
rideIndex = input->element->properties.track.ride_index;
|
||||
w = window_find_by_class(WC_RIDE_CONSTRUCTION);
|
||||
if (w != NULL && _rideConstructionState != RIDE_CONSTRUCTION_STATE_0 && _currentRideIndex == rideIndex)
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
|
||||
track_circuit_iterator_begin(&it, *input);
|
||||
while (track_circuit_iterator_next(&it)) {
|
||||
|
@ -4148,7 +4150,7 @@ static bool ride_check_track_contains_inversions(rct_xy_element *input, rct_xy_e
|
|||
|
||||
rct_window *w = window_find_by_class(WC_RIDE_CONSTRUCTION);
|
||||
if (w != NULL && _rideConstructionState != RIDE_CONSTRUCTION_STATE_0 && rideIndex == _currentRideIndex) {
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
}
|
||||
|
||||
track_circuit_iterator it;
|
||||
|
@ -4179,7 +4181,7 @@ static bool ride_check_track_contains_banked(rct_xy_element *input, rct_xy_eleme
|
|||
|
||||
rct_window *w = window_find_by_class(WC_RIDE_CONSTRUCTION);
|
||||
if (w != NULL && _rideConstructionState != RIDE_CONSTRUCTION_STATE_0 && rideIndex == _currentRideIndex) {
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
}
|
||||
|
||||
track_circuit_iterator it;
|
||||
|
@ -4204,7 +4206,7 @@ static sint32 ride_check_station_length(rct_xy_element *input, rct_xy_element *o
|
|||
if (w != 0 &&
|
||||
_rideConstructionState != RIDE_CONSTRUCTION_STATE_0 &&
|
||||
_currentRideIndex == input->element->properties.track.ride_index){
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
}
|
||||
|
||||
output->x = input->x;
|
||||
|
@ -4259,7 +4261,7 @@ static bool ride_check_start_and_end_is_station(rct_xy_element *input, rct_xy_el
|
|||
|
||||
w = window_find_by_class(WC_RIDE_CONSTRUCTION);
|
||||
if (w != NULL && _rideConstructionState != RIDE_CONSTRUCTION_STATE_0 && rideIndex == _currentRideIndex) {
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
}
|
||||
|
||||
// Check back of the track
|
||||
|
@ -4410,7 +4412,7 @@ static void ride_set_start_finish_points(sint32 rideIndex, rct_xy_element *start
|
|||
*
|
||||
* rct2: 0x0069ED9E
|
||||
*/
|
||||
static sint32 sub_69ED9E()
|
||||
static sint32 count_free_misc_sprite_slots()
|
||||
{
|
||||
sint32 miscSpriteCount = gSpriteListCount[SPRITE_LIST_MISC];
|
||||
sint32 remainingSpriteCount = gSpriteListCount[SPRITE_LIST_NULL];
|
||||
|
@ -4771,7 +4773,7 @@ static bool ride_create_vehicles(rct_ride *ride, sint32 rideIndex, rct_xy_elemen
|
|||
|
||||
// Check if there are enough free sprite slots for all the vehicles
|
||||
sint32 totalCars = ride->num_vehicles * ride->num_cars_per_train;
|
||||
if (totalCars > sub_69ED9E()) {
|
||||
if (totalCars > count_free_misc_sprite_slots()) {
|
||||
gGameCommandErrorText = STR_UNABLE_TO_CREATE_ENOUGH_VEHICLES;
|
||||
return false;
|
||||
}
|
||||
|
@ -5007,7 +5009,7 @@ static bool ride_create_cable_lift(sint32 rideIndex, bool isApplying)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (sub_69ED9E() <= 5) {
|
||||
if (count_free_misc_sprite_slots() <= 5) {
|
||||
gGameCommandErrorText = STR_UNABLE_TO_CREATE_ENOUGH_VEHICLES;
|
||||
return false;
|
||||
}
|
||||
|
@ -6215,7 +6217,7 @@ void game_command_callback_ride_construct_placed_back(sint32 eax, sint32 ebx, si
|
|||
}
|
||||
|
||||
window_ride_construction_do_station_check();
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
}
|
||||
|
||||
void game_command_callback_ride_construct_placed_front(sint32 eax, sint32 ebx, sint32 ecx, sint32 edx, sint32 esi, sint32 edi, sint32 ebp)
|
||||
|
@ -6249,7 +6251,7 @@ void game_command_callback_ride_construct_placed_front(sint32 eax, sint32 ebx, s
|
|||
|
||||
window_ride_construction_do_station_check();
|
||||
window_ride_construction_do_entrance_exit_check();
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -7196,7 +7198,7 @@ bool ride_select_backwards_from_front()
|
|||
{
|
||||
track_begin_end trackBeginEnd;
|
||||
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
if (track_block_get_previous_from_zero(_currentTrackBeginX, _currentTrackBeginY, _currentTrackBeginZ, _currentRideIndex, _currentTrackPieceDirection, &trackBeginEnd)) {
|
||||
_rideConstructionState = RIDE_CONSTRUCTION_STATE_SELECTED;
|
||||
_currentTrackBeginX = trackBeginEnd.begin_x;
|
||||
|
@ -7216,7 +7218,7 @@ bool ride_select_forwards_from_back()
|
|||
{
|
||||
sint32 x, y, z, direction;
|
||||
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
|
||||
x = _currentTrackBeginX;
|
||||
y = _currentTrackBeginY;
|
||||
|
@ -7488,7 +7490,7 @@ foundTrack:
|
|||
|
||||
w = window_find_by_class(WC_RIDE_CONSTRUCTION);
|
||||
if (w != NULL && _rideConstructionState != RIDE_CONSTRUCTION_STATE_0 && _currentRideIndex == rideIndex) {
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
}
|
||||
|
||||
result = 0;
|
||||
|
@ -8015,7 +8017,7 @@ void sub_6CB945(sint32 rideIndex)
|
|||
footpath_queue_chain_reset();
|
||||
maze_entrance_hedge_replacement(location.x, location.y, mapElement);
|
||||
footpath_remove_edges_at(location.x, location.y, mapElement);
|
||||
sub_6A759F();
|
||||
footpath_update_queue_chains();
|
||||
map_invalidate_tile_full(location.x, location.y);
|
||||
map_element_remove(mapElement);
|
||||
mapElement--;
|
||||
|
|
|
@ -220,9 +220,9 @@ typedef struct rct_ride {
|
|||
union {
|
||||
uint8 inversions; // 0x114 (???X XXXX)
|
||||
uint8 holes; // 0x114 (???X XXXX)
|
||||
// The undercover portion is a very rough approximation of how much of the ride is undercover.
|
||||
// This is a very rough approximation of how much of the ride is undercover.
|
||||
// It reaches the maximum value of 7 at about 50% undercover and doesn't increase beyond that.
|
||||
uint8 undercover_portion; // 0x114 (XXX?-????)
|
||||
uint8 sheltered_eighths; // 0x114 (XXX?-????)
|
||||
};
|
||||
// Y is number of powered lifts, X is drops
|
||||
uint8 drops; // 0x115 (YYXX XXXX)
|
||||
|
@ -1036,8 +1036,8 @@ 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);
|
||||
void sub_6C9627();
|
||||
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);
|
||||
sint32 ride_music_params_update(sint16 x, sint16 y, sint16 z, uint8 rideIndex, uint16 sampleRate, uint32 position, uint8 *tuneId);
|
||||
|
@ -1105,8 +1105,8 @@ bool track_block_get_next_from_zero(sint16 x, sint16 y, sint16 z_start, uint8 ri
|
|||
bool track_block_get_previous(sint32 x, sint32 y, rct_map_element *mapElement, track_begin_end *outTrackBeginEnd);
|
||||
bool track_block_get_previous_from_zero(sint16 x, sint16 y, sint16 z, uint8 rideIndex, uint8 direction, track_begin_end *outTrackBeginEnd);
|
||||
|
||||
void sub_6C84CE();
|
||||
void sub_6C96C0();
|
||||
void window_ride_construction_update_active_elements();
|
||||
void ride_construction_remove_ghosts();
|
||||
money32 ride_entrance_exit_place_ghost(sint32 rideIndex, sint32 x, sint32 y, sint32 direction, sint32 placeType, sint32 stationNum);
|
||||
void ride_get_entrance_or_exit_position_from_screen_position(sint32 x, sint32 y, sint32 *outX, sint32 *outY, sint32 *outDirection);
|
||||
|
||||
|
|
|
@ -936,10 +936,10 @@ static uint32 ride_ratings_get_proximity_score()
|
|||
}
|
||||
|
||||
/**
|
||||
* Seems to calculate how much of the track is sheltered in eighths.
|
||||
* Calculates how much of the track is sheltered in eighths.
|
||||
* rct2: 0x0065E72D
|
||||
*/
|
||||
static sint32 sub_65E72D(rct_ride *ride)
|
||||
static sint32 get_num_of_sheltered_eighths(rct_ride *ride)
|
||||
{
|
||||
sint32 totalLength = ride_get_total_length(ride);
|
||||
sint32 shelteredLength = ride->sheltered_length;
|
||||
|
@ -1537,7 +1537,7 @@ static void ride_ratings_calculate_spiral_roller_coaster(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_stand_up_roller_coaster(rct_ride *ride)
|
||||
|
@ -1576,7 +1576,7 @@ static void ride_ratings_calculate_stand_up_roller_coaster(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_suspended_swinging_coaster(rct_ride *ride)
|
||||
|
@ -1617,7 +1617,7 @@ static void ride_ratings_calculate_suspended_swinging_coaster(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_inverted_roller_coaster(rct_ride *ride)
|
||||
|
@ -1661,7 +1661,7 @@ static void ride_ratings_calculate_inverted_roller_coaster(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_junior_roller_coaster(rct_ride *ride)
|
||||
|
@ -1700,7 +1700,7 @@ static void ride_ratings_calculate_junior_roller_coaster(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_miniature_railway(rct_ride *ride)
|
||||
|
@ -1731,12 +1731,12 @@ static void ride_ratings_calculate_miniature_railway(rct_ride *ride)
|
|||
ride->upkeep_cost = ride_compute_upkeep(ride);
|
||||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
sint32 edx = sub_65E72D(ride);
|
||||
sint32 edx = get_num_of_sheltered_eighths(ride);
|
||||
if (((edx >> 8) & 0xFF) >= 4)
|
||||
ride->excitement /= 4;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_monorail(rct_ride *ride)
|
||||
|
@ -1767,12 +1767,12 @@ static void ride_ratings_calculate_monorail(rct_ride *ride)
|
|||
ride->upkeep_cost = ride_compute_upkeep(ride);
|
||||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
sint32 edx = sub_65E72D(ride);
|
||||
sint32 edx = get_num_of_sheltered_eighths(ride);
|
||||
if (((edx >> 8) & 0xFF) >= 4)
|
||||
ride->excitement /= 4;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_mini_suspended_coaster(rct_ride *ride)
|
||||
|
@ -1812,7 +1812,7 @@ static void ride_ratings_calculate_mini_suspended_coaster(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_boat_ride(rct_ride *ride)
|
||||
|
@ -1886,7 +1886,7 @@ static void ride_ratings_calculate_wooden_wild_mouse(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_steeplechase(rct_ride *ride)
|
||||
|
@ -1927,7 +1927,7 @@ static void ride_ratings_calculate_steeplechase(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_car_ride(rct_ride *ride)
|
||||
|
@ -1962,7 +1962,7 @@ static void ride_ratings_calculate_car_ride(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_launched_freefall(rct_ride *ride)
|
||||
|
@ -2013,7 +2013,7 @@ static void ride_ratings_calculate_launched_freefall(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_bobsleigh_coaster(rct_ride *ride)
|
||||
|
@ -2052,7 +2052,7 @@ static void ride_ratings_calculate_bobsleigh_coaster(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_observation_tower(rct_ride *ride)
|
||||
|
@ -2083,7 +2083,7 @@ static void ride_ratings_calculate_observation_tower(rct_ride *ride)
|
|||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= 7 << 5;
|
||||
|
||||
sint32 edx = sub_65E72D(ride);
|
||||
sint32 edx = get_num_of_sheltered_eighths(ride);
|
||||
if (((edx >> 8) & 0xFF) >= 5)
|
||||
ride->excitement /= 4;
|
||||
}
|
||||
|
@ -2131,7 +2131,7 @@ static void ride_ratings_calculate_looping_roller_coaster(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_dinghy_slide(rct_ride *ride)
|
||||
|
@ -2170,7 +2170,7 @@ static void ride_ratings_calculate_dinghy_slide(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_mine_train_coaster(rct_ride *ride)
|
||||
|
@ -2211,7 +2211,7 @@ static void ride_ratings_calculate_mine_train_coaster(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_chairlift(rct_ride *ride)
|
||||
|
@ -2248,7 +2248,7 @@ static void ride_ratings_calculate_chairlift(rct_ride *ride)
|
|||
ride->upkeep_cost = ride_compute_upkeep(ride);
|
||||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
sint32 edx = sub_65E72D(ride);
|
||||
sint32 edx = get_num_of_sheltered_eighths(ride);
|
||||
if (((edx >> 8) & 0xFF) >= 4)
|
||||
ride->excitement /= 4;
|
||||
|
||||
|
@ -2299,7 +2299,7 @@ static void ride_ratings_calculate_corkscrew_roller_coaster(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_maze(rct_ride *ride)
|
||||
|
@ -2403,7 +2403,7 @@ static void ride_ratings_calculate_go_karts(rct_ride *ride)
|
|||
ride->upkeep_cost = ride_compute_upkeep(ride);
|
||||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
sint32 edx = sub_65E72D(ride);
|
||||
sint32 edx = get_num_of_sheltered_eighths(ride);
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= edx << 5;
|
||||
|
@ -2442,7 +2442,7 @@ static void ride_ratings_calculate_log_flume(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_river_rapids(rct_ride *ride)
|
||||
|
@ -2476,7 +2476,7 @@ static void ride_ratings_calculate_river_rapids(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_dodgems(rct_ride *ride)
|
||||
|
@ -2820,7 +2820,7 @@ static void ride_ratings_calculate_reverse_freefall_coaster(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_lift(rct_ride *ride)
|
||||
|
@ -2856,7 +2856,7 @@ static void ride_ratings_calculate_lift(rct_ride *ride)
|
|||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= 7 << 5;
|
||||
|
||||
if ((sub_65E72D(ride) >> 8) >= 5)
|
||||
if ((get_num_of_sheltered_eighths(ride) >> 8) >= 5)
|
||||
ride->excitement /= 4;
|
||||
}
|
||||
|
||||
|
@ -2896,7 +2896,7 @@ static void ride_ratings_calculate_vertical_drop_roller_coaster(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_cash_machine(rct_ride *ride)
|
||||
|
@ -2996,7 +2996,7 @@ static void ride_ratings_calculate_flying_roller_coaster(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_virginia_reel(rct_ride *ride)
|
||||
|
@ -3034,7 +3034,7 @@ static void ride_ratings_calculate_virginia_reel(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_splash_boats(rct_ride *ride)
|
||||
|
@ -3067,7 +3067,7 @@ static void ride_ratings_calculate_splash_boats(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_mini_helicopters(rct_ride *ride)
|
||||
|
@ -3151,7 +3151,7 @@ static void ride_ratings_calculate_lay_down_roller_coaster(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_suspended_monorail(rct_ride *ride)
|
||||
|
@ -3182,7 +3182,7 @@ static void ride_ratings_calculate_suspended_monorail(rct_ride *ride)
|
|||
ride->upkeep_cost = ride_compute_upkeep(ride);
|
||||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
sint32 edx = sub_65E72D(ride);
|
||||
sint32 edx = get_num_of_sheltered_eighths(ride);
|
||||
if (((edx >> 8) & 0xFF) >= 4)
|
||||
ride->excitement /= 4;
|
||||
|
||||
|
@ -3238,7 +3238,7 @@ static void ride_ratings_calculate_reverser_roller_coaster(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_heartline_twister_coaster(rct_ride *ride)
|
||||
|
@ -3279,7 +3279,7 @@ static void ride_ratings_calculate_heartline_twister_coaster(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_mini_golf(rct_ride *ride)
|
||||
|
@ -3320,7 +3320,7 @@ static void ride_ratings_calculate_mini_golf(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_first_aid(rct_ride *ride)
|
||||
|
@ -3385,7 +3385,7 @@ static void ride_ratings_calculate_ghost_train(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_twister_roller_coaster(rct_ride *ride)
|
||||
|
@ -3431,7 +3431,7 @@ static void ride_ratings_calculate_twister_roller_coaster(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_wooden_roller_coaster(rct_ride *ride)
|
||||
|
@ -3472,7 +3472,7 @@ static void ride_ratings_calculate_wooden_roller_coaster(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_side_friction_roller_coaster(rct_ride *ride)
|
||||
|
@ -3512,7 +3512,7 @@ static void ride_ratings_calculate_side_friction_roller_coaster(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_wild_mouse(rct_ride *ride)
|
||||
|
@ -3553,7 +3553,7 @@ static void ride_ratings_calculate_wild_mouse(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_multi_dimension_roller_coaster(rct_ride *ride)
|
||||
|
@ -3599,7 +3599,7 @@ static void ride_ratings_calculate_multi_dimension_roller_coaster(rct_ride *ride
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_giga_coaster(rct_ride *ride)
|
||||
|
@ -3645,7 +3645,7 @@ static void ride_ratings_calculate_giga_coaster(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_roto_drop(rct_ride *ride)
|
||||
|
@ -3677,7 +3677,7 @@ static void ride_ratings_calculate_roto_drop(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_flying_saucers(rct_ride *ride)
|
||||
|
@ -3783,7 +3783,7 @@ static void ride_ratings_calculate_monorail_cycles(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_compact_inverted_coaster(rct_ride *ride)
|
||||
|
@ -3827,7 +3827,7 @@ static void ride_ratings_calculate_compact_inverted_coaster(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_water_coaster(rct_ride *ride)
|
||||
|
@ -3869,7 +3869,7 @@ static void ride_ratings_calculate_water_coaster(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_air_powered_vertical_coaster(rct_ride *ride)
|
||||
|
@ -3901,7 +3901,7 @@ static void ride_ratings_calculate_air_powered_vertical_coaster(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_inverted_hairpin_coaster(rct_ride *ride)
|
||||
|
@ -3943,7 +3943,7 @@ static void ride_ratings_calculate_inverted_hairpin_coaster(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_magic_carpet(rct_ride *ride)
|
||||
|
@ -4028,7 +4028,7 @@ static void ride_ratings_calculate_river_rafts(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_enterprise(rct_ride *ride)
|
||||
|
@ -4099,7 +4099,7 @@ static void ride_ratings_calculate_inverted_impulse_coaster(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_mini_roller_coaster(rct_ride *ride)
|
||||
|
@ -4139,7 +4139,7 @@ static void ride_ratings_calculate_mini_roller_coaster(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_mine_ride(rct_ride *ride)
|
||||
|
@ -4176,7 +4176,7 @@ static void ride_ratings_calculate_mine_ride(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
static void ride_ratings_calculate_lim_launched_roller_coaster(rct_ride *ride)
|
||||
|
@ -4222,7 +4222,7 @@ static void ride_ratings_calculate_lim_launched_roller_coaster(rct_ride *ride)
|
|||
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME;
|
||||
|
||||
ride->inversions &= 0x1F;
|
||||
ride->inversions |= sub_65E72D(ride) << 5;
|
||||
ride->inversions |= get_num_of_sheltered_eighths(ride) << 5;
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
|
|
|
@ -870,7 +870,7 @@ static sint32 track_design_place_scenery(rct_td6_scenery_element *scenery_start,
|
|||
if (_trackDesignPlaceOperation == PTD_OPERATION_4) bl = 105;
|
||||
|
||||
footpath_connect_edges(mapCoord.x, mapCoord.y, map_element, bl);
|
||||
sub_6A759F();
|
||||
footpath_update_queue_chains();
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
|
@ -1268,7 +1268,7 @@ static bool track_design_place_ride(rct_track_td6 *td6, sint16 x, sint16 y, sint
|
|||
* bl == 6, Clear white outlined track.
|
||||
* rct2: 0x006D01B3
|
||||
*/
|
||||
sint32 sub_6D01B3(rct_track_td6 *td6, uint8 bl, uint8 rideIndex, sint32 x, sint32 y, sint32 z)
|
||||
sint32 place_virtual_track(rct_track_td6 *td6, uint8 bl, uint8 rideIndex, sint32 x, sint32 y, sint32 z)
|
||||
{
|
||||
byte_F4414E = (bl & PTD_OPERATION_DONT_PLACE_SCENERY) ? BYTE_F4414E_DONT_PLACE_SCENERY : 0;
|
||||
_trackDesignPlaceOperation = bl & 0x7F;
|
||||
|
@ -1322,7 +1322,7 @@ sint32 sub_6D01B3(rct_track_td6 *td6, uint8 bl, uint8 rideIndex, sint32 x, sint3
|
|||
* ebx = ride_id
|
||||
* cost = edi
|
||||
*/
|
||||
static bool sub_6D2189(rct_track_td6 *td6, money32 *cost, uint8 *rideId, uint8 *flags)
|
||||
static bool track_design_place_preview(rct_track_td6 *td6, money32 *cost, uint8 *rideId, uint8 *flags)
|
||||
{
|
||||
*flags = 0;
|
||||
|
||||
|
@ -1361,7 +1361,7 @@ static bool sub_6D2189(rct_track_td6 *td6, money32 *cost, uint8 *rideId, uint8 *
|
|||
sint32 mapSize = gMapSize << 4;
|
||||
|
||||
_currentTrackPieceDirection = 0;
|
||||
sint32 z = sub_6D01B3(td6, PTD_OPERATION_GET_PLACE_Z, 0, mapSize, mapSize, 16);
|
||||
sint32 z = place_virtual_track(td6, PTD_OPERATION_GET_PLACE_Z, 0, mapSize, mapSize, 16);
|
||||
|
||||
if (byte_F4414E & BYTE_F4414E_HAS_SCENERY) {
|
||||
*flags |= TRACK_DESIGN_FLAG_HAS_SCENERY;
|
||||
|
@ -1375,7 +1375,7 @@ static bool sub_6D2189(rct_track_td6 *td6, money32 *cost, uint8 *rideId, uint8 *
|
|||
*flags |= TRACK_DESIGN_FLAG_SCENERY_UNAVAILABLE;
|
||||
}
|
||||
|
||||
money32 resultCost = sub_6D01B3(td6, operation, rideIndex, mapSize, mapSize, z);
|
||||
money32 resultCost = place_virtual_track(td6, operation, rideIndex, mapSize, mapSize, z);
|
||||
gParkFlags = backup_park_flags;
|
||||
|
||||
if (resultCost != MONEY32_UNDEFINED) {
|
||||
|
@ -1441,10 +1441,10 @@ static money32 place_track_design(sint16 x, sint16 y, sint16 z, uint8 flags, uin
|
|||
money32 cost = 0;
|
||||
if (!(flags & GAME_COMMAND_FLAG_APPLY)) {
|
||||
_trackDesignDontPlaceScenery = false;
|
||||
cost = sub_6D01B3(td6, PTD_OPERATION_1, rideIndex, x, y, z);
|
||||
cost = place_virtual_track(td6, PTD_OPERATION_1, rideIndex, x, y, z);
|
||||
if (byte_F4414E & BYTE_F4414E_SCENERY_UNAVAILABLE) {
|
||||
_trackDesignDontPlaceScenery = true;
|
||||
cost = sub_6D01B3(td6, PTD_OPERATION_DONT_PLACE_SCENERY | PTD_OPERATION_1, rideIndex, x, y, z);
|
||||
cost = place_virtual_track(td6, PTD_OPERATION_DONT_PLACE_SCENERY | PTD_OPERATION_1, rideIndex, x, y, z);
|
||||
}
|
||||
} else {
|
||||
uint8 operation;
|
||||
|
@ -1456,7 +1456,7 @@ static money32 place_track_design(sint16 x, sint16 y, sint16 z, uint8 flags, uin
|
|||
|
||||
if (_trackDesignDontPlaceScenery)
|
||||
operation |= PTD_OPERATION_DONT_PLACE_SCENERY;
|
||||
cost = sub_6D01B3(td6, operation, rideIndex, x, y, z);
|
||||
cost = place_virtual_track(td6, operation, rideIndex, x, y, z);
|
||||
}
|
||||
|
||||
if (cost == MONEY32_UNDEFINED || !(flags & GAME_COMMAND_FLAG_APPLY)) {
|
||||
|
@ -1683,7 +1683,7 @@ void track_design_draw_preview(rct_track_td6 *td6, uint8 *pixels)
|
|||
money32 cost;
|
||||
uint8 rideIndex;
|
||||
uint8 flags;
|
||||
if (!sub_6D2189(td6, &cost, &rideIndex, &flags)) {
|
||||
if (!track_design_place_preview(td6, &cost, &rideIndex, &flags)) {
|
||||
memset(pixels, 0, TRACK_PREVIEW_IMAGE_SIZE * 4);
|
||||
track_design_preview_restore_map(mapBackup);
|
||||
return;
|
||||
|
|
|
@ -215,7 +215,7 @@ void track_design_dispose(rct_track_td6 *td6);
|
|||
|
||||
void track_design_mirror(rct_track_td6 *td6);
|
||||
|
||||
sint32 sub_6D01B3(rct_track_td6 *td6, uint8 bl, uint8 rideIndex, sint32 x, sint32 y, sint32 z);
|
||||
sint32 place_virtual_track(rct_track_td6 *td6, uint8 bl, uint8 rideIndex, sint32 x, sint32 y, sint32 z);
|
||||
|
||||
void game_command_place_track_design(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp);
|
||||
void game_command_place_maze_design(sint32* eax, sint32* ebx, sint32* ecx, sint32* edx, sint32* esi, sint32* edi, sint32* ebp);
|
||||
|
|
|
@ -927,7 +927,7 @@ static bool track_design_save_to_td6_for_maze(uint8 rideIndex, rct_track_td6 *td
|
|||
|
||||
// Save global vars as they are still used by scenery
|
||||
sint16 startZ = gTrackPreviewOrigin.z;
|
||||
sub_6D01B3(td6, PTD_OPERATION_DRAW_OUTLINES, 0, 4096, 4096, 0);
|
||||
place_virtual_track(td6, PTD_OPERATION_DRAW_OUTLINES, 0, 4096, 4096, 0);
|
||||
gTrackPreviewOrigin = (rct_xyz16) { startX, startY, startZ };
|
||||
|
||||
gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_CONSTRUCT;
|
||||
|
@ -1107,7 +1107,7 @@ static bool track_design_save_to_td6_for_tracked_ride(uint8 rideIndex, rct_track
|
|||
td6->entrance_elements = realloc(td6->entrance_elements, numEntranceElements * sizeof(rct_td6_entrance_element) + 1);
|
||||
*((uint8*)&td6->entrance_elements[numEntranceElements]) = 0xFF;
|
||||
|
||||
sub_6D01B3(td6, PTD_OPERATION_DRAW_OUTLINES, 0, 4096, 4096, 0);
|
||||
place_virtual_track(td6, PTD_OPERATION_DRAW_OUTLINES, 0, 4096, 4096, 0);
|
||||
|
||||
// Resave global vars for scenery reasons.
|
||||
gTrackPreviewOrigin = (rct_xyz16) { start_x, start_y, start_z };
|
||||
|
|
|
@ -6927,7 +6927,7 @@ static void vehicle_trigger_on_ride_photo(rct_vehicle *vehicle, rct_map_element
|
|||
*
|
||||
* rct2: 0x006DEDE8
|
||||
*/
|
||||
static void sub_6DEDE8(rct_vehicle *vehicle)
|
||||
static void vehicle_update_handle_scenery_door(rct_vehicle *vehicle)
|
||||
{
|
||||
sint32 trackType = vehicle->track_type >> 2;
|
||||
const rct_preview_track *trackBlock = TrackBlocks[trackType];
|
||||
|
@ -7012,7 +7012,7 @@ static void vehicle_update_handle_water_splash(rct_vehicle *vehicle)
|
|||
*
|
||||
* rct2: 0x006DB807
|
||||
*/
|
||||
static void sub_6DB807(rct_vehicle *vehicle)
|
||||
static void vehicle_update_reverser_car_bogies(rct_vehicle *vehicle)
|
||||
{
|
||||
const rct_vehicle_info *moveInfo = vehicle_get_move_info(
|
||||
vehicle->var_CD,
|
||||
|
@ -7200,7 +7200,7 @@ static bool vehicle_update_motion_collision_detection(
|
|||
*
|
||||
* rct2: 0x006DB7D6
|
||||
*/
|
||||
static void sub_6DB7D6(rct_vehicle *vehicle)
|
||||
static void vehicle_reverse_reverser_car(rct_vehicle *vehicle)
|
||||
{
|
||||
rct_vehicle *previousVehicle = GET_VEHICLE(vehicle->prev_vehicle_on_ride);
|
||||
rct_vehicle *nextVehicle = GET_VEHICLE(vehicle->next_vehicle_on_ride);
|
||||
|
@ -7211,8 +7211,8 @@ static void sub_6DB7D6(rct_vehicle *vehicle)
|
|||
previousVehicle->track_progress = 86;
|
||||
nextVehicle->track_progress = 158;
|
||||
|
||||
sub_6DB807(nextVehicle);
|
||||
sub_6DB807(previousVehicle);
|
||||
vehicle_update_reverser_car_bogies(nextVehicle);
|
||||
vehicle_update_reverser_car_bogies(previousVehicle);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -7470,7 +7470,7 @@ loc_6DB41D:
|
|||
vehicle->update_flags ^= VEHICLE_UPDATE_FLAG_13;
|
||||
}
|
||||
if (vehicleEntry->flags_a & VEHICLE_ENTRY_FLAG_A_8) {
|
||||
sub_6DEDE8(vehicle);
|
||||
vehicle_update_handle_scenery_door(vehicle);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -7608,7 +7608,7 @@ loc_6DAEB9:
|
|||
trackType == TRACK_ELEM_RIGHT_REVERSER) &&
|
||||
vehicle->track_progress == 96
|
||||
) {
|
||||
sub_6DB7D6(vehicle);
|
||||
vehicle_reverse_reverser_car(vehicle);
|
||||
|
||||
const rct_vehicle_info *moveInfo2 = vehicle_get_move_info(
|
||||
vehicle->var_CD,
|
||||
|
|
|
@ -175,7 +175,7 @@ void scenario_begin()
|
|||
gParkFlags &= ~PARK_FLAGS_NO_MONEY;
|
||||
if (gParkFlags & PARK_FLAGS_NO_MONEY_SCENARIO)
|
||||
gParkFlags |= PARK_FLAGS_NO_MONEY;
|
||||
sub_684AC3();
|
||||
research_reset_current_item();
|
||||
scenery_set_default_placement_configuration();
|
||||
news_item_init_queue();
|
||||
if (gScenarioObjectiveType != OBJECTIVE_NONE)
|
||||
|
|
|
@ -576,7 +576,7 @@ static void window_editor_inventions_list_close(rct_window *w)
|
|||
// When used in-game (as a cheat)
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_EDITOR)) {
|
||||
gSilentResearch = true;
|
||||
sub_684AC3();
|
||||
research_reset_current_item();
|
||||
gSilentResearch = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -773,7 +773,7 @@ static void window_editor_object_selection_close(rct_window *w)
|
|||
// Used for in-game object selection cheat
|
||||
// This resets the ride selection list and resets research to 0 on current item
|
||||
gSilentResearch = true;
|
||||
sub_684AC3();
|
||||
research_reset_current_item();
|
||||
gSilentResearch = false;
|
||||
}
|
||||
research_remove_non_separate_vehicle_types();
|
||||
|
|
|
@ -1208,7 +1208,7 @@ static void window_map_set_land_rights_tool_update(sint32 x, sint32 y)
|
|||
*
|
||||
* rct2: 0x00666EEF
|
||||
*/
|
||||
static void sub_666EEF(sint32 x, sint32 y, sint16 *mapX, sint16 *mapY, sint16 *mapZ, sint32 *direction)
|
||||
static void place_park_entrance_get_map_position(sint32 x, sint32 y, sint16 *mapX, sint16 *mapY, sint16 *mapZ, sint32 *direction)
|
||||
{
|
||||
rct_map_element *mapElement;
|
||||
|
||||
|
@ -1243,7 +1243,7 @@ static void window_map_place_park_entrance_tool_update(sint32 x, sint32 y)
|
|||
map_invalidate_map_selection_tiles();
|
||||
gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE;
|
||||
gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_CONSTRUCT;
|
||||
sub_666EEF(x, y, &mapX, &mapY, &mapZ, &direction);
|
||||
place_park_entrance_get_map_position(x, y, &mapX, &mapY, &mapZ, &direction);
|
||||
if (mapX == (sint16)-1) {
|
||||
park_entrance_remove_ghost();
|
||||
return;
|
||||
|
@ -1322,7 +1322,7 @@ static void window_map_place_park_entrance_tool_down(sint32 x, sint32 y)
|
|||
|
||||
sint16 mapX, mapY, mapZ;
|
||||
sint32 direction;
|
||||
sub_666EEF(x, y, &mapX, &mapY, &mapZ, &direction);
|
||||
place_park_entrance_get_map_position(x, y, &mapX, &mapY, &mapZ, &direction);
|
||||
if (mapX != MAP_LOCATION_NULL) {
|
||||
gGameCommandErrorTitle = STR_CANT_BUILD_PARK_ENTRANCE_HERE;
|
||||
money32 price = game_do_command(
|
||||
|
|
|
@ -166,7 +166,7 @@ rct_window *window_maze_construction_open()
|
|||
*/
|
||||
static void window_maze_construction_close(rct_window *w)
|
||||
{
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
viewport_set_visibility(0);
|
||||
|
||||
map_invalidate_map_selection_tiles();
|
||||
|
@ -199,7 +199,7 @@ static void window_maze_construction_entrance_mouseup(rct_window *w, rct_widgeti
|
|||
gRideEntranceExitPlaceStationIndex = 0;
|
||||
input_set_flag(INPUT_FLAG_6, true);
|
||||
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
|
||||
// ???
|
||||
uint8 old_state = _rideConstructionState;
|
||||
|
@ -352,7 +352,7 @@ static void window_maze_construction_toolupdate(rct_window* w, rct_widgetindex w
|
|||
* rct2: 0x006C825F
|
||||
*/
|
||||
static void window_maze_construction_entrance_tooldown(sint32 x, sint32 y, rct_window* w){
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
|
||||
map_invalidate_selection_rect();
|
||||
|
||||
|
@ -484,7 +484,7 @@ static void window_maze_construction_construct(sint32 direction)
|
|||
{
|
||||
sint32 x, y, z, flags, mode;
|
||||
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
|
||||
x = _currentTrackBeginX + (TileDirectionDelta[direction].x / 2);
|
||||
y = _currentTrackBeginY + (TileDirectionDelta[direction].y / 2);
|
||||
|
|
|
@ -35,14 +35,6 @@
|
|||
#include "../world/map.h"
|
||||
#include "../world/entrance.h"
|
||||
|
||||
/* move to ride.c */
|
||||
static void sub_6B2FA9(rct_windownumber number)
|
||||
{
|
||||
rct_window* w = window_find_by_number(WC_RIDE, number);
|
||||
if (w != NULL && w->page == 1)
|
||||
window_close(w);
|
||||
}
|
||||
|
||||
#pragma region Widgets
|
||||
|
||||
enum {
|
||||
|
@ -499,7 +491,7 @@ static void window_ride_construction_update_map_selection();
|
|||
static void window_ride_construction_update_possible_ride_configurations();
|
||||
static void window_ride_construction_update_widgets(rct_window *w);
|
||||
static void window_ride_construction_select_map_tiles(rct_ride *ride, sint32 trackType, sint32 trackDirection, sint32 x, sint32 y);
|
||||
money32 sub_6CA162(sint32 rideIndex, sint32 trackType, sint32 trackDirection, sint32 edxRS16, sint32 x, sint32 y, sint32 z);
|
||||
money32 place_provisional_track_piece(sint32 rideIndex, sint32 trackType, sint32 trackDirection, sint32 edxRS16, sint32 x, sint32 y, sint32 z);
|
||||
static void window_ride_construction_show_special_track_dropdown(rct_window *w, rct_widget *widget);
|
||||
static void ride_selected_track_set_seat_rotation(sint32 seatRotation);
|
||||
static void loc_6C7502(sint32 al);
|
||||
|
@ -539,6 +531,14 @@ static sint32 ride_get_alternative_type(rct_ride *ride)
|
|||
ride->type;
|
||||
}
|
||||
|
||||
/* move to ride.c */
|
||||
static void close_ride_window_for_construction(rct_windownumber number)
|
||||
{
|
||||
rct_window* w = window_find_by_number(WC_RIDE, number);
|
||||
if (w != NULL && w->page == 1)
|
||||
window_close(w);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* rct2: 0x006CB481
|
||||
|
@ -546,7 +546,7 @@ static sint32 ride_get_alternative_type(rct_ride *ride)
|
|||
rct_window *window_ride_construction_open()
|
||||
{
|
||||
sint32 rideIndex = _currentRideIndex;
|
||||
sub_6B2FA9(rideIndex);
|
||||
close_ride_window_for_construction(rideIndex);
|
||||
|
||||
rct_window *w;
|
||||
rct_ride* ride = get_ride(rideIndex);
|
||||
|
@ -642,7 +642,7 @@ rct_window *window_ride_construction_open()
|
|||
*/
|
||||
static void window_ride_construction_close(rct_window *w)
|
||||
{
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
viewport_set_visibility(0);
|
||||
|
||||
map_invalidate_map_selection_tiles();
|
||||
|
@ -1309,83 +1309,83 @@ static void window_ride_construction_mousedown(rct_widgetindex widgetIndex, rct_
|
|||
window_ride_construction_update_enabled_track_pieces();
|
||||
switch (widgetIndex) {
|
||||
case WIDX_LEFT_CURVE:
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
_currentTrackCurve = TRACK_CURVE_LEFT;
|
||||
_currentTrackPrice = MONEY32_UNDEFINED;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
break;
|
||||
case WIDX_RIGHT_CURVE:
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
_currentTrackCurve = TRACK_CURVE_RIGHT;
|
||||
_currentTrackPrice = MONEY32_UNDEFINED;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
break;
|
||||
case WIDX_LEFT_CURVE_SMALL:
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
_currentTrackCurve = TRACK_CURVE_LEFT_SMALL;
|
||||
_currentTrackPrice = MONEY32_UNDEFINED;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
break;
|
||||
case WIDX_RIGHT_CURVE_SMALL:
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
_currentTrackCurve = TRACK_CURVE_RIGHT_SMALL;
|
||||
_currentTrackPrice = MONEY32_UNDEFINED;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
break;
|
||||
case WIDX_LEFT_CURVE_VERY_SMALL:
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
_currentTrackCurve = TRACK_CURVE_LEFT_VERY_SMALL;
|
||||
_currentTrackPrice = MONEY32_UNDEFINED;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
break;
|
||||
case WIDX_RIGHT_CURVE_VERY_SMALL:
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
_currentTrackCurve = TRACK_CURVE_RIGHT_VERY_SMALL;
|
||||
_currentTrackPrice = MONEY32_UNDEFINED;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
break;
|
||||
case WIDX_LEFT_CURVE_LARGE:
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
_currentTrackCurve = TRACK_CURVE_LEFT_LARGE;
|
||||
_currentTrackPrice = MONEY32_UNDEFINED;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
break;
|
||||
case WIDX_RIGHT_CURVE_LARGE:
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
_currentTrackCurve = TRACK_CURVE_RIGHT_LARGE;
|
||||
_currentTrackPrice = MONEY32_UNDEFINED;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
break;
|
||||
case WIDX_STRAIGHT:
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
if (_currentTrackCurve != TRACK_CURVE_NONE)
|
||||
_currentTrackBankEnd = TRACK_BANK_NONE;
|
||||
_currentTrackCurve = TRACK_CURVE_NONE;
|
||||
_currentTrackPrice = MONEY32_UNDEFINED;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
break;
|
||||
case WIDX_SLOPE_DOWN_STEEP:
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
if (is_track_enabled(TRACK_HELIX_SMALL)) {
|
||||
if (_currentTrackCurve == TRACK_CURVE_LEFT && _currentTrackBankEnd == TRACK_BANK_LEFT) {
|
||||
_currentTrackCurve = TRACK_ELEM_LEFT_HALF_BANKED_HELIX_DOWN_LARGE | 0x100;
|
||||
_currentTrackPrice = MONEY32_UNDEFINED;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
break;
|
||||
} else if (_currentTrackCurve == TRACK_CURVE_RIGHT && _currentTrackBankEnd == TRACK_BANK_RIGHT) {
|
||||
_currentTrackCurve = TRACK_ELEM_RIGHT_HALF_BANKED_HELIX_DOWN_LARGE | 0x100;
|
||||
_currentTrackPrice = MONEY32_UNDEFINED;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
break;
|
||||
} else if (_currentTrackCurve == TRACK_CURVE_LEFT_SMALL && _currentTrackBankEnd == TRACK_BANK_LEFT) {
|
||||
_currentTrackCurve = TRACK_ELEM_LEFT_HALF_BANKED_HELIX_DOWN_SMALL | 0x100;
|
||||
_currentTrackPrice = MONEY32_UNDEFINED;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
break;
|
||||
} else if (_currentTrackCurve == TRACK_CURVE_RIGHT_SMALL && _currentTrackBankEnd == TRACK_BANK_RIGHT) {
|
||||
_currentTrackCurve = TRACK_ELEM_RIGHT_HALF_BANKED_HELIX_DOWN_SMALL | 0x100;
|
||||
_currentTrackPrice = MONEY32_UNDEFINED;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1393,12 +1393,12 @@ static void window_ride_construction_mousedown(rct_widgetindex widgetIndex, rct_
|
|||
if (_currentTrackCurve == TRACK_CURVE_LEFT && _currentTrackBankEnd == TRACK_BANK_LEFT) {
|
||||
_currentTrackCurve = TRACK_ELEM_LEFT_QUARTER_BANKED_HELIX_LARGE_DOWN | 0x100;
|
||||
_currentTrackPrice = MONEY32_UNDEFINED;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
break;
|
||||
} else if (_currentTrackCurve == TRACK_CURVE_RIGHT && _currentTrackBankEnd == TRACK_BANK_RIGHT) {
|
||||
_currentTrackCurve = TRACK_ELEM_RIGHT_QUARTER_BANKED_HELIX_LARGE_DOWN | 0x100;
|
||||
_currentTrackPrice = MONEY32_UNDEFINED;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1407,12 +1407,12 @@ static void window_ride_construction_mousedown(rct_widgetindex widgetIndex, rct_
|
|||
if (_currentTrackCurve == TRACK_CURVE_LEFT) {
|
||||
_currentTrackCurve = TRACK_ELEM_LEFT_QUARTER_HELIX_LARGE_DOWN | 0x100;
|
||||
_currentTrackPrice = MONEY32_UNDEFINED;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
break;
|
||||
} else if (_currentTrackCurve == TRACK_CURVE_RIGHT) {
|
||||
_currentTrackCurve = TRACK_ELEM_RIGHT_QUARTER_HELIX_LARGE_DOWN | 0x100;
|
||||
_currentTrackPrice = MONEY32_UNDEFINED;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1424,14 +1424,14 @@ static void window_ride_construction_mousedown(rct_widgetindex widgetIndex, rct_
|
|||
}
|
||||
break;
|
||||
case WIDX_SLOPE_DOWN:
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
if (_rideConstructionState == 2 && _currentTrackBankEnd != TRACK_BANK_NONE) {
|
||||
_currentTrackBankEnd = TRACK_BANK_NONE;
|
||||
}
|
||||
loc_6C7502(6);
|
||||
break;
|
||||
case WIDX_LEVEL:
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
if (_rideConstructionState == RIDE_CONSTRUCTION_STATE_FRONT && _previousTrackSlopeEnd == 6) {
|
||||
if (_currentTrackCurve == TRACK_CURVE_LEFT_SMALL) {
|
||||
_currentTrackBankEnd = TRACK_BANK_LEFT;
|
||||
|
@ -1448,41 +1448,41 @@ static void window_ride_construction_mousedown(rct_widgetindex widgetIndex, rct_
|
|||
loc_6C7502(0);
|
||||
break;
|
||||
case WIDX_SLOPE_UP:
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
if (_rideConstructionState == 1 && _currentTrackBankEnd != TRACK_BANK_NONE) {
|
||||
_currentTrackBankEnd = TRACK_BANK_NONE;
|
||||
}
|
||||
if (ride->type == RIDE_TYPE_REVERSE_FREEFALL_COASTER || ride->type == RIDE_TYPE_AIR_POWERED_VERTICAL_COASTER) {
|
||||
if (_rideConstructionState == RIDE_CONSTRUCTION_STATE_FRONT && _currentTrackCurve == TRACK_CURVE_NONE) {
|
||||
_currentTrackCurve = TRACK_ELEM_REVERSE_FREEFALL_SLOPE | 0x100;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
}
|
||||
} else {
|
||||
loc_6C7502(2);
|
||||
}
|
||||
break;
|
||||
case WIDX_SLOPE_UP_STEEP:
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
if (is_track_enabled(TRACK_HELIX_SMALL)) {
|
||||
if (_currentTrackCurve == TRACK_CURVE_LEFT && _currentTrackBankEnd == TRACK_BANK_LEFT) {
|
||||
_currentTrackCurve = TRACK_ELEM_LEFT_HALF_BANKED_HELIX_UP_LARGE | 0x100;
|
||||
_currentTrackPrice = MONEY32_UNDEFINED;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
break;
|
||||
} else if (_currentTrackCurve == TRACK_CURVE_RIGHT && _currentTrackBankEnd == TRACK_BANK_RIGHT) {
|
||||
_currentTrackCurve = TRACK_ELEM_RIGHT_HALF_BANKED_HELIX_UP_LARGE | 0x100;
|
||||
_currentTrackPrice = MONEY32_UNDEFINED;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
break;
|
||||
} else if (_currentTrackCurve == TRACK_CURVE_LEFT_SMALL && _currentTrackBankEnd == TRACK_BANK_LEFT) {
|
||||
_currentTrackCurve = TRACK_ELEM_LEFT_HALF_BANKED_HELIX_UP_SMALL | 0x100;
|
||||
_currentTrackPrice = MONEY32_UNDEFINED;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
break;
|
||||
} else if (_currentTrackCurve == TRACK_CURVE_RIGHT_SMALL && _currentTrackBankEnd == TRACK_BANK_RIGHT) {
|
||||
_currentTrackCurve = TRACK_ELEM_RIGHT_HALF_BANKED_HELIX_UP_SMALL | 0x100;
|
||||
_currentTrackPrice = MONEY32_UNDEFINED;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1490,12 +1490,12 @@ static void window_ride_construction_mousedown(rct_widgetindex widgetIndex, rct_
|
|||
if (_currentTrackCurve == TRACK_CURVE_LEFT && _currentTrackBankEnd == TRACK_BANK_LEFT) {
|
||||
_currentTrackCurve = TRACK_ELEM_LEFT_QUARTER_BANKED_HELIX_LARGE_UP | 0x100;
|
||||
_currentTrackPrice = MONEY32_UNDEFINED;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
break;
|
||||
} else if (_currentTrackCurve == TRACK_CURVE_RIGHT && _currentTrackBankEnd == TRACK_BANK_RIGHT) {
|
||||
_currentTrackCurve = TRACK_ELEM_RIGHT_QUARTER_BANKED_HELIX_LARGE_UP | 0x100;
|
||||
_currentTrackPrice = MONEY32_UNDEFINED;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1504,12 +1504,12 @@ static void window_ride_construction_mousedown(rct_widgetindex widgetIndex, rct_
|
|||
if (_currentTrackCurve == TRACK_CURVE_LEFT) {
|
||||
_currentTrackCurve = TRACK_ELEM_LEFT_QUARTER_HELIX_LARGE_UP | 0x100;
|
||||
_currentTrackPrice = MONEY32_UNDEFINED;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
break;
|
||||
} else if (_currentTrackCurve == TRACK_CURVE_RIGHT) {
|
||||
_currentTrackCurve = TRACK_ELEM_RIGHT_QUARTER_HELIX_LARGE_UP | 0x100;
|
||||
_currentTrackPrice = MONEY32_UNDEFINED;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1521,28 +1521,28 @@ static void window_ride_construction_mousedown(rct_widgetindex widgetIndex, rct_
|
|||
}
|
||||
break;
|
||||
case WIDX_CHAIN_LIFT:
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
_currentTrackLiftHill ^= 1;
|
||||
if (_currentTrackLiftHill & 1) {
|
||||
_currentTrackAlternative &= ~RIDE_TYPE_ALTERNATIVE_TRACK_PIECES;
|
||||
}
|
||||
_currentTrackPrice = MONEY32_UNDEFINED;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
break;
|
||||
case WIDX_BANK_LEFT:
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
if (_currentlyShowingBrakeSpeed == 0) {
|
||||
_currentTrackBankEnd = TRACK_BANK_LEFT;
|
||||
_currentTrackPrice = MONEY32_UNDEFINED;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
}
|
||||
break;
|
||||
case WIDX_BANK_STRAIGHT:
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
if (_currentlyShowingBrakeSpeed == 0) {
|
||||
_currentTrackBankEnd = TRACK_BANK_NONE;
|
||||
_currentTrackPrice = MONEY32_UNDEFINED;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
} else {
|
||||
uint8 *brakesSpeedPtr = &_currentBrakeSpeed2;
|
||||
uint8 maxBrakesSpeed = 30;
|
||||
|
@ -1556,17 +1556,17 @@ static void window_ride_construction_mousedown(rct_widgetindex widgetIndex, rct_
|
|||
ride_construction_set_brakes_speed(brakesSpeed);
|
||||
} else {
|
||||
*brakesSpeedPtr = brakesSpeed;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case WIDX_BANK_RIGHT:
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
if (_currentlyShowingBrakeSpeed == 0) {
|
||||
_currentTrackBankEnd = TRACK_BANK_RIGHT;
|
||||
_currentTrackPrice = MONEY32_UNDEFINED;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
} else {
|
||||
uint8 *brakesSpeedPtr = &_currentBrakeSpeed2;
|
||||
if (_currentlyShowingBrakeSpeed != 1) {
|
||||
|
@ -1578,7 +1578,7 @@ static void window_ride_construction_mousedown(rct_widgetindex widgetIndex, rct_
|
|||
ride_construction_set_brakes_speed(brakesSpeed);
|
||||
} else {
|
||||
*brakesSpeedPtr = brakesSpeed;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1587,17 +1587,17 @@ static void window_ride_construction_mousedown(rct_widgetindex widgetIndex, rct_
|
|||
window_ride_construction_show_special_track_dropdown(w, widget);
|
||||
break;
|
||||
case WIDX_U_TRACK:
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
_currentTrackAlternative &= ~RIDE_TYPE_ALTERNATIVE_TRACK_PIECES;
|
||||
_currentTrackPrice = MONEY32_UNDEFINED;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
break;
|
||||
case WIDX_O_TRACK:
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
_currentTrackAlternative |= RIDE_TYPE_ALTERNATIVE_TRACK_PIECES;
|
||||
_currentTrackLiftHill &= ~1;
|
||||
_currentTrackPrice = MONEY32_UNDEFINED;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
break;
|
||||
case WIDX_SEAT_ROTATION_ANGLE_SPINNER_UP:
|
||||
if (_currentSeatRotationAngle < 15) {
|
||||
|
@ -1605,7 +1605,7 @@ static void window_ride_construction_mousedown(rct_widgetindex widgetIndex, rct_
|
|||
ride_selected_track_set_seat_rotation(_currentSeatRotationAngle + 1);
|
||||
} else {
|
||||
_currentSeatRotationAngle++;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -1615,7 +1615,7 @@ static void window_ride_construction_mousedown(rct_widgetindex widgetIndex, rct_
|
|||
ride_selected_track_set_seat_rotation(_currentSeatRotationAngle - 1);
|
||||
} else {
|
||||
_currentSeatRotationAngle--;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -1633,7 +1633,7 @@ static void window_ride_construction_dropdown(rct_window *w, rct_widgetindex wid
|
|||
if (dropdownIndex == -1)
|
||||
return;
|
||||
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
_currentTrackPrice = MONEY32_UNDEFINED;
|
||||
sint32 trackPiece = _currentPossibleRideConfigurations[dropdownIndex];
|
||||
switch (trackPiece) {
|
||||
|
@ -1649,7 +1649,7 @@ static void window_ride_construction_dropdown(rct_window *w, rct_widgetindex wid
|
|||
break;
|
||||
}
|
||||
_currentTrackCurve = trackPiece | 0x100;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1663,9 +1663,9 @@ static void window_ride_construction_construct(rct_window *w)
|
|||
|
||||
_currentTrackPrice = MONEY32_UNDEFINED;
|
||||
_trackPlaceCost = MONEY32_UNDEFINED;
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
if (sub_6CA2DF(&trackType, &trackDirection, &rideIndex, &edxRS16, &x, &y, &z, &properties)) {
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1691,7 +1691,7 @@ static void window_ride_construction_construct(rct_window *w)
|
|||
if (_trackPlaceCost == MONEY32_UNDEFINED) {
|
||||
if (network_get_mode() == NETWORK_MODE_CLIENT)
|
||||
game_command_callback = 0; // don't do callback if we can't afford the track piece
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1767,7 +1767,7 @@ static void window_ride_construction_construct(rct_window *w)
|
|||
if (network_get_mode() == NETWORK_MODE_CLIENT)
|
||||
return;
|
||||
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1783,19 +1783,19 @@ static void window_ride_construction_mouseup_demolish(rct_window* w)
|
|||
//bool gotoStartPlacementMode;
|
||||
|
||||
_currentTrackPrice = MONEY32_UNDEFINED;
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
|
||||
// Select the track element that is to be deleted
|
||||
_rideConstructionState2 = RIDE_CONSTRUCTION_STATE_SELECTED;
|
||||
if (_rideConstructionState == RIDE_CONSTRUCTION_STATE_FRONT) {
|
||||
if (!ride_select_backwards_from_front()) {
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
return;
|
||||
}
|
||||
_rideConstructionState2 = RIDE_CONSTRUCTION_STATE_FRONT;
|
||||
} else if (_rideConstructionState == RIDE_CONSTRUCTION_STATE_BACK) {
|
||||
if (!ride_select_forwards_from_back()) {
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
return;
|
||||
}
|
||||
_rideConstructionState2 = RIDE_CONSTRUCTION_STATE_BACK;
|
||||
|
@ -1808,7 +1808,7 @@ static void window_ride_construction_mouseup_demolish(rct_window* w)
|
|||
direction = _currentTrackPieceDirection;
|
||||
type = _currentTrackPieceType;
|
||||
if (sub_6C683D(&x, &y, &z, direction & 3, type, 0, &mapElement, 0)) {
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1838,7 +1838,7 @@ static void window_ride_construction_mouseup_demolish(rct_window* w)
|
|||
type = _currentTrackPieceType;
|
||||
|
||||
if (sub_6C683D(&x, &y, &z, direction, type, 0, &mapElement, 0)) {
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1856,7 +1856,7 @@ static void window_ride_construction_mouseup_demolish(rct_window* w)
|
|||
GAME_COMMAND_FLAG_APPLY
|
||||
);
|
||||
if (cost == MONEY32_UNDEFINED) {
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1890,9 +1890,9 @@ void window_ride_construction_mouseup_demolish_next_piece(sint32 x, sint32 y, si
|
|||
sint32 b5 = _currentTrackAlternative;
|
||||
sint32 b4 = _currentTrackLiftHill;
|
||||
ride_construction_set_default_next_piece();
|
||||
sub_6C84CE();
|
||||
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;
|
||||
|
@ -1902,7 +1902,7 @@ void window_ride_construction_mouseup_demolish_next_piece(sint32 x, sint32 y, si
|
|||
_currentTrackBankEnd = bankStart;
|
||||
_currentTrackAlternative = b5;
|
||||
_currentTrackLiftHill = b4;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1937,7 +1937,7 @@ void window_ride_construction_mouseup_demolish_next_piece(sint32 x, sint32 y, si
|
|||
else if (_rideConstructionState2 == RIDE_CONSTRUCTION_STATE_BACK) {
|
||||
ride_select_previous_section();
|
||||
}
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1948,9 +1948,9 @@ void window_ride_construction_mouseup_demolish_next_piece(sint32 x, sint32 y, si
|
|||
static void window_ride_construction_rotate(rct_window *w)
|
||||
{
|
||||
_currentTrackPieceDirection = (_currentTrackPieceDirection + 1) & 3;
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
_currentTrackPrice = MONEY32_UNDEFINED;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1961,19 +1961,19 @@ 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;
|
||||
gRideEntranceExitPlaceRideIndex = w->number & 0xFF;
|
||||
gRideEntranceExitPlaceStationIndex = 0;
|
||||
input_set_flag(INPUT_FLAG_6, true);
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
if (_rideConstructionState != RIDE_CONSTRUCTION_STATE_ENTRANCE_EXIT) {
|
||||
gRideEntranceExitPlacePreviousRideConstructionState = _rideConstructionState;
|
||||
_rideConstructionState = RIDE_CONSTRUCTION_STATE_ENTRANCE_EXIT;
|
||||
}
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1985,19 +1985,19 @@ 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;
|
||||
gRideEntranceExitPlaceRideIndex = w->number & 0xFF;
|
||||
gRideEntranceExitPlaceStationIndex = 0;
|
||||
input_set_flag(INPUT_FLAG_6, true);
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
if (_rideConstructionState != RIDE_CONSTRUCTION_STATE_ENTRANCE_EXIT) {
|
||||
gRideEntranceExitPlacePreviousRideConstructionState = _rideConstructionState;
|
||||
_rideConstructionState = RIDE_CONSTRUCTION_STATE_ENTRANCE_EXIT;
|
||||
}
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2035,7 +2035,7 @@ static void window_ride_construction_update(rct_window *w)
|
|||
if (_rideConstructionState == RIDE_CONSTRUCTION_STATE_ENTRANCE_EXIT) {
|
||||
if (!widget_is_active_tool(w, WIDX_ENTRANCE) && !widget_is_active_tool(w, WIDX_EXIT)) {
|
||||
_rideConstructionState = gRideEntranceExitPlacePreviousRideConstructionState;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2469,7 +2469,7 @@ static void sub_6CBCE2(
|
|||
*
|
||||
* rct2: 0x006C84CE
|
||||
*/
|
||||
void sub_6C84CE()
|
||||
void window_ride_construction_update_active_elements()
|
||||
{
|
||||
rct_window *w;
|
||||
rct_map_element *mapElement;
|
||||
|
@ -2752,12 +2752,12 @@ static void window_ride_construction_update_enabled_track_pieces()
|
|||
*
|
||||
* rct2: 0x006CA162
|
||||
*/
|
||||
money32 sub_6CA162(sint32 rideIndex, sint32 trackType, sint32 trackDirection, sint32 edxRS16, sint32 x, sint32 y, sint32 z)
|
||||
money32 place_provisional_track_piece(sint32 rideIndex, sint32 trackType, sint32 trackDirection, sint32 edxRS16, sint32 x, sint32 y, sint32 z)
|
||||
{
|
||||
rct_ride *ride;
|
||||
money32 result;
|
||||
|
||||
sub_6C96C0();
|
||||
ride_construction_remove_ghosts();
|
||||
ride = get_ride(rideIndex);
|
||||
if (ride->type == RIDE_TYPE_MAZE) {
|
||||
result = game_do_command(x, 105 | (4 << 8), y, rideIndex | (trackType << 8) | (edxRS16 << 16), GAME_COMMAND_SET_MAZE_TRACK, z, 0);
|
||||
|
@ -2807,7 +2807,7 @@ void sub_6C94D8()
|
|||
// Recheck if area is fine for new track.
|
||||
// Set by footpath placement
|
||||
if (_currentTrackSelectionFlags & TRACK_SELECTION_FLAG_RECHECK) {
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
_currentTrackSelectionFlags &= ~TRACK_SELECTION_FLAG_RECHECK;
|
||||
}
|
||||
|
||||
|
@ -2816,10 +2816,10 @@ void sub_6C94D8()
|
|||
case RIDE_CONSTRUCTION_STATE_BACK:
|
||||
if (!(_currentTrackSelectionFlags & TRACK_SELECTION_FLAG_TRACK)) {
|
||||
if (sub_6CA2DF(&type, &direction, &rideIndex, &edxRS16, &x, &y, &z, NULL)) {
|
||||
sub_6C96C0();
|
||||
ride_construction_remove_ghosts();
|
||||
} else {
|
||||
_currentTrackPrice = sub_6CA162(rideIndex, type, direction, edxRS16, x, y, z);
|
||||
sub_6C84CE();
|
||||
_currentTrackPrice = place_provisional_track_piece(rideIndex, type, direction, edxRS16, x, y, z);
|
||||
window_ride_construction_update_active_elements();
|
||||
}
|
||||
}
|
||||
_rideConstructionArrowPulseTime--;
|
||||
|
@ -2859,7 +2859,7 @@ void sub_6C94D8()
|
|||
direction = _currentTrackPieceDirection & 3;
|
||||
type = _currentTrackPieceType;
|
||||
if (sub_6C683D(&x, &y, &z, direction, type, 0, NULL, _currentTrackSelectionFlags & TRACK_SELECTION_FLAG_ARROW ? 2 : 1)) {
|
||||
sub_6C96C0();
|
||||
ride_construction_remove_ghosts();
|
||||
_rideConstructionState = RIDE_CONSTRUCTION_STATE_0;
|
||||
}
|
||||
break;
|
||||
|
@ -3587,7 +3587,7 @@ static void ride_selected_track_set_seat_rotation(sint32 seatRotation)
|
|||
y = _currentTrackBeginY;
|
||||
z = _currentTrackBeginZ;
|
||||
sub_6C683D(&x, &y, &z, _currentTrackPieceDirection & 3, _currentTrackPieceType, seatRotation, NULL, (1 << 5));
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3603,7 +3603,7 @@ static void loc_6C7502(sint32 al)
|
|||
_currentTrackLiftHill &= ~1;
|
||||
}
|
||||
}
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3629,7 +3629,7 @@ static void ride_construction_set_brakes_speed(sint32 brakesSpeed)
|
|||
0
|
||||
);
|
||||
}
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3647,7 +3647,7 @@ void ride_construction_toolupdate_construct(sint32 screenX, sint32 screenY)
|
|||
gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_CONSTRUCT;
|
||||
gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_ARROW;
|
||||
if (!ride_get_place_position_from_screen_position(screenX, screenY, &x, &y)) {
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
map_invalidate_map_selection_tiles();
|
||||
return;
|
||||
}
|
||||
|
@ -3670,7 +3670,7 @@ void ride_construction_toolupdate_construct(sint32 screenX, sint32 screenY)
|
|||
|
||||
sint32 trackType, trackDirection, rideIndex, edxRS16;
|
||||
if (sub_6CA2DF(&trackType, &trackDirection, &rideIndex, &edxRS16, NULL, NULL, NULL, NULL)) {
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
map_invalidate_map_selection_tiles();
|
||||
return;
|
||||
}
|
||||
|
@ -3730,7 +3730,7 @@ void ride_construction_toolupdate_construct(sint32 screenX, sint32 screenY)
|
|||
if (ride->type == RIDE_TYPE_MAZE) {
|
||||
for (;;) {
|
||||
sub_6CA2DF(&trackType, &trackDirection, &rideIndex, &edxRS16, &x, &y, &z, NULL);
|
||||
_currentTrackPrice = sub_6CA162(rideIndex, trackType, trackDirection, edxRS16, x, y, z);
|
||||
_currentTrackPrice = place_provisional_track_piece(rideIndex, trackType, trackDirection, edxRS16, x, y, z);
|
||||
if (_currentTrackPrice != MONEY32_UNDEFINED)
|
||||
break;
|
||||
|
||||
|
@ -3753,7 +3753,7 @@ void ride_construction_toolupdate_construct(sint32 screenX, sint32 screenY)
|
|||
|
||||
for (;;) {
|
||||
sub_6CA2DF(&trackType, &trackDirection, &rideIndex, &edxRS16, &x, &y, &z, NULL);
|
||||
_currentTrackPrice = sub_6CA162(rideIndex, trackType, trackDirection, edxRS16, x, y, z);
|
||||
_currentTrackPrice = place_provisional_track_piece(rideIndex, trackType, trackDirection, edxRS16, x, y, z);
|
||||
if (_currentTrackPrice != MONEY32_UNDEFINED)
|
||||
break;
|
||||
|
||||
|
@ -3769,7 +3769,7 @@ void ride_construction_toolupdate_construct(sint32 screenX, sint32 screenY)
|
|||
_currentTrackBeginZ += 16;
|
||||
}
|
||||
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
map_invalidate_map_selection_tiles();
|
||||
}
|
||||
|
||||
|
@ -3789,7 +3789,7 @@ void ride_construction_toolupdate_entrance_exit(sint32 screenX, sint32 screenY)
|
|||
gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_ARROW;
|
||||
ride_get_entrance_or_exit_position_from_screen_position(screenX, screenY, &x, &y, &direction);
|
||||
if (gRideEntranceExitPlaceDirection == 255) {
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
return;
|
||||
}
|
||||
gMapSelectFlags |= MAP_SELECT_FLAG_ENABLE;
|
||||
|
@ -3817,7 +3817,7 @@ void ride_construction_toolupdate_entrance_exit(sint32 screenX, sint32 screenY)
|
|||
_currentTrackPrice = ride_entrance_exit_place_ghost(
|
||||
_currentRideIndex, x, y, direction, gRideEntranceExitPlaceType, stationNum
|
||||
);
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3832,7 +3832,7 @@ void ride_construction_tooldown_construct(sint32 screenX, sint32 screenY)
|
|||
rct_window *w;
|
||||
|
||||
map_invalidate_map_selection_tiles();
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
|
||||
if (sub_6CA2DF(&trackType, &trackDirection, &rideIndex, &edxRS16, &x, &y, &z, &properties))
|
||||
return;
|
||||
|
@ -3956,7 +3956,7 @@ void ride_construction_tooldown_construct(sint32 screenX, sint32 screenY)
|
|||
_currentTrackBeginZ = z;
|
||||
_currentTrackSelectionFlags = 0;
|
||||
_rideConstructionArrowPulseTime = 0;
|
||||
sub_6C84CE();
|
||||
window_ride_construction_update_active_elements();
|
||||
w = window_find_by_class(WC_RIDE_CONSTRUCTION);
|
||||
if (w == NULL)
|
||||
break;
|
||||
|
@ -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;
|
||||
|
@ -4028,7 +4028,7 @@ void ride_construction_tooldown_construct(sint32 screenX, sint32 screenY)
|
|||
*/
|
||||
static void ride_construction_tooldown_entrance_exit(sint32 screenX, sint32 screenY)
|
||||
{
|
||||
sub_6C9627();
|
||||
ride_construction_invalidate_current_track();
|
||||
map_invalidate_selection_rect();
|
||||
gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE;
|
||||
gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_ARROW;
|
||||
|
|
|
@ -262,7 +262,7 @@ static void window_track_place_toolupdate(rct_window* w, rct_widgetindex widgetI
|
|||
|
||||
// Check if tool map position has changed since last update
|
||||
if (mapX == _window_track_place_last_x && mapY == _window_track_place_last_y) {
|
||||
sub_6D01B3(_trackDesign, PTD_OPERATION_DRAW_OUTLINES, 0, mapX, mapY, 0);
|
||||
place_virtual_track(_trackDesign, PTD_OPERATION_DRAW_OUTLINES, 0, mapX, mapY, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -296,7 +296,7 @@ static void window_track_place_toolupdate(rct_window* w, rct_widgetindex widgetI
|
|||
widget_invalidate(w, WIDX_PRICE);
|
||||
}
|
||||
|
||||
sub_6D01B3(_trackDesign, PTD_OPERATION_DRAW_OUTLINES, 0, mapX, mapY, mapZ);
|
||||
place_virtual_track(_trackDesign, PTD_OPERATION_DRAW_OUTLINES, 0, mapX, mapY, mapZ);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -384,7 +384,7 @@ static void window_track_place_invalidate(rct_window *w)
|
|||
static void window_track_place_clear_provisional()
|
||||
{
|
||||
if (_window_track_place_last_was_valid) {
|
||||
sub_6D01B3(
|
||||
place_virtual_track(
|
||||
_trackDesign,
|
||||
PTD_OPERATION_CLEAR_OUTLINES,
|
||||
_window_track_place_ride_index,
|
||||
|
@ -421,7 +421,7 @@ static sint32 window_track_place_get_base_z(sint32 x, sint32 y)
|
|||
if (mapElement->properties.surface.terrain & 0x1F)
|
||||
z = max(z, (mapElement->properties.surface.terrain & 0x1F) << 4);
|
||||
|
||||
return z + sub_6D01B3(_trackDesign, PTD_OPERATION_GET_PLACE_Z, 0, x, y, z);
|
||||
return z + place_virtual_track(_trackDesign, PTD_OPERATION_GET_PLACE_Z, 0, x, y, z);
|
||||
}
|
||||
|
||||
static void window_track_place_attempt_placement(rct_track_td6 *td6, sint32 x, sint32 y, sint32 z, sint32 bl, money32 *cost, uint8 *rideIndex)
|
||||
|
|
|
@ -440,7 +440,7 @@ static money32 RideEntranceExitPlace(sint16 x,
|
|||
}
|
||||
|
||||
footpath_connect_edges(x, y, mapElement, flags);
|
||||
sub_6A759F();
|
||||
footpath_update_queue_chains();
|
||||
|
||||
map_invalidate_tile_full(x, y);
|
||||
}
|
||||
|
@ -546,7 +546,7 @@ static money32 RideEntranceExitRemove(sint16 x, sint16 y, uint8 rideIndex, uint8
|
|||
ride->entrances[stationNum] = 0xFFFF;
|
||||
}
|
||||
|
||||
sub_6A759F();
|
||||
footpath_update_queue_chains();
|
||||
|
||||
map_invalidate_tile_full(x, y);
|
||||
}
|
||||
|
@ -734,7 +734,7 @@ extern "C"
|
|||
sint32 placeType,
|
||||
sint32 stationNum)
|
||||
{
|
||||
sub_6C96C0();
|
||||
ride_construction_remove_ghosts();
|
||||
money32 result = RideEntranceExitPlaceGhost(rideIndex, x, y, direction, placeType, stationNum);
|
||||
|
||||
if (result != MONEY32_UNDEFINED)
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "../util/util.h"
|
||||
|
||||
void footpath_interrupt_peeps(sint32 x, sint32 y, sint32 z);
|
||||
void sub_6A7642(sint32 x, sint32 y, rct_map_element *mapElement);
|
||||
void footpath_update_queue_entrance_banner(sint32 x, sint32 y, rct_map_element *mapElement);
|
||||
|
||||
uint8 gFootpathProvisionalFlags;
|
||||
rct_xyz16 gFootpathProvisionalPosition;
|
||||
|
@ -161,7 +161,7 @@ static void loc_6A6620(sint32 flags, sint32 x, sint32 y, rct_map_element *mapEle
|
|||
if (!(flags & GAME_COMMAND_FLAG_7))
|
||||
footpath_connect_edges(x, y, mapElement, flags);
|
||||
|
||||
sub_6A759F();
|
||||
footpath_update_queue_chains();
|
||||
map_invalidate_tile_full(x, y);
|
||||
}
|
||||
|
||||
|
@ -446,7 +446,7 @@ money32 footpath_remove_real(sint32 x, sint32 y, sint32 z, sint32 flags)
|
|||
footpath_remove_edges_at(x, y, mapElement);
|
||||
map_invalidate_tile_full(x, y);
|
||||
map_element_remove(mapElement);
|
||||
sub_6A759F();
|
||||
footpath_update_queue_chains();
|
||||
}
|
||||
|
||||
money32 cost = -MONEY(10,00);
|
||||
|
@ -842,7 +842,7 @@ void footpath_interrupt_peeps(sint32 x, sint32 y, sint32 z)
|
|||
peep->destination_x = (peep->x & 0xFFE0) + 16;
|
||||
peep->destination_y = (peep->y & 0xFFE0) + 16;
|
||||
peep->destination_tolerence = 5;
|
||||
sub_693B58(peep);
|
||||
peep_update_current_action_sprite_type(peep);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1302,11 +1302,11 @@ void footpath_connect_edges(sint32 x, sint32 y, rct_map_element *mapElement, sin
|
|||
rct_neighbour_list neighbourList;
|
||||
rct_neighbour neighbour;
|
||||
|
||||
sub_6A759F();
|
||||
footpath_update_queue_chains();
|
||||
|
||||
neighbour_list_init(&neighbourList);
|
||||
|
||||
sub_6A7642(x, y, mapElement);
|
||||
footpath_update_queue_entrance_banner(x, y, mapElement);
|
||||
for (sint32 direction = 0; direction < 4; direction++) {
|
||||
loc_6A6C85(x, y, direction, mapElement, flags, true, &neighbourList);
|
||||
}
|
||||
|
@ -1474,7 +1474,7 @@ void footpath_queue_chain_push(uint8 rideIndex)
|
|||
*
|
||||
* rct2: 0x006A759F
|
||||
*/
|
||||
void sub_6A759F()
|
||||
void footpath_update_queue_chains()
|
||||
{
|
||||
for (uint8 *queueChainPtr = _footpathQueueChain; queueChainPtr < _footpathQueueChainNext; queueChainPtr++) {
|
||||
uint8 rideIndex = *queueChainPtr;
|
||||
|
@ -1940,7 +1940,7 @@ void footpath_update_path_wide_flags(sint32 x, sint32 y)
|
|||
*
|
||||
* rct2: 0x006A7642
|
||||
*/
|
||||
void sub_6A7642(sint32 x, sint32 y, rct_map_element *mapElement)
|
||||
void footpath_update_queue_entrance_banner(sint32 x, sint32 y, rct_map_element *mapElement)
|
||||
{
|
||||
sint32 elementType = map_element_get_type(mapElement);
|
||||
switch (elementType) {
|
||||
|
@ -2059,7 +2059,7 @@ void footpath_remove_edges_at(sint32 x, sint32 y, rct_map_element *mapElement)
|
|||
return;
|
||||
}
|
||||
|
||||
sub_6A7642(x, y, mapElement);
|
||||
footpath_update_queue_entrance_banner(x, y, mapElement);
|
||||
|
||||
for (sint32 direction = 0; direction < 4; direction++) {
|
||||
sint32 z1 = mapElement->base_height;
|
||||
|
|
|
@ -87,7 +87,7 @@ void footpath_get_coordinates_from_pos(sint32 screenX, sint32 screenY, sint32 *x
|
|||
void footpath_bridge_get_info_from_pos(sint32 screenX, sint32 screenY, sint32 *x, sint32 *y, sint32 *direction, rct_map_element **mapElement);
|
||||
void footpath_remove_litter(sint32 x, sint32 y, sint32 z);
|
||||
void footpath_connect_edges(sint32 x, sint32 y, rct_map_element *mapElement, sint32 flags);
|
||||
void sub_6A759F();
|
||||
void footpath_update_queue_chains();
|
||||
bool fence_in_the_way(sint32 x, sint32 y, sint32 z0, sint32 z1, sint32 direction);
|
||||
void footpath_chain_ride_queue(sint32 rideIndex, sint32 entranceIndex, sint32 x, sint32 y, rct_map_element *mapElement, sint32 direction);
|
||||
void footpath_update_path_wide_flags(sint32 x, sint32 y);
|
||||
|
|
|
@ -213,7 +213,7 @@ static bool map_animation_invalidate_small_scenery(sint32 x, sint32 y, sint32 ba
|
|||
peep->action = PEEP_ACTION_CHECK_TIME;
|
||||
peep->action_frame = 0;
|
||||
peep->action_sprite_image_offset = 0;
|
||||
sub_693B58(peep);
|
||||
peep_update_current_action_sprite_type(peep);
|
||||
invalidate_sprite_1((rct_sprite*)peep);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue