mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
remove various callprocs
This commit is contained in:
@@ -566,6 +566,7 @@ void window_ride_construct(rct_window *w);
|
||||
void window_ride_list_open();
|
||||
rct_window *window_ride_construction_open();
|
||||
rct_window *window_maze_construction_open();
|
||||
void window_maze_construction_update_pressed_widgets();
|
||||
void window_track_place_open();
|
||||
rct_window *window_new_ride_open();
|
||||
rct_window *window_new_ride_open_research();
|
||||
|
||||
@@ -1285,7 +1285,7 @@ int ride_modify_maze(rct_map_element *mapElement, int x, int y)
|
||||
_currentTrackBeginZ = mapElement->base_height * 8;
|
||||
_currentTrackSelectionFlags = 0;
|
||||
_rideConstructionArrowPulseTime = 0;
|
||||
RCT2_CALLPROC_X(0x006CD887, 0, 0, 0, 0, 0, 0, 0);
|
||||
window_maze_construction_update_pressed_widgets();
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -4398,7 +4398,7 @@ void game_command_demolish_ride(int *eax, int *ebx, int *ecx, int *edx, int *esi
|
||||
ride_stop_peeps_queuing(ride_id);
|
||||
*ebx = ride_get_refund_price(ride_id);
|
||||
|
||||
RCT2_CALLPROC_X(0x006CB945, 0, 0, 0, ride_id, 0, 0, 0);
|
||||
sub_6CB945(ride_id);
|
||||
news_item_disable_news(NEWS_ITEM_RIDE, ride_id);
|
||||
|
||||
for(int i = 0; i < MAX_BANNERS; i++){
|
||||
@@ -5354,3 +5354,12 @@ void game_command_set_ride_vehicles(int *eax, int *ebx, int *ecx, int *edx, int
|
||||
}
|
||||
*ebx = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* rct2: 0x006CB945
|
||||
*/
|
||||
void sub_6CB945(int rideIndex)
|
||||
{
|
||||
RCT2_CALLPROC_X(0x006CB945, 0, 0, 0, rideIndex, 0, 0, 0);
|
||||
}
|
||||
|
||||
@@ -952,4 +952,6 @@ void ride_set_num_vehicles(int rideIndex, int numVehicles);
|
||||
void ride_set_num_cars_per_vehicle(int rideIndex, int numCarsPerVehicle);
|
||||
void game_command_set_ride_vehicles(int *eax, int *ebx, int *ecx, int *edx, int *esi, int *edi, int *ebp);
|
||||
|
||||
void sub_6CB945(int rideIndex);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1856,7 +1856,7 @@ int track_place_ride(sint16 x, sint16 y, sint16 z, uint8 rideIndex, uint8** trac
|
||||
}
|
||||
|
||||
if (RCT2_GLOBAL(0x00F440D4, uint8) == 6){
|
||||
RCT2_CALLPROC_X(0x006CB945, 0, 0, 0, RCT2_GLOBAL(0x00F440A7, uint8), 0, 0, 0);
|
||||
sub_6CB945(RCT2_GLOBAL(0x00F440A7, uint8));
|
||||
rct_ride* ride = GET_RIDE(RCT2_GLOBAL(0x00F440A7, uint8));
|
||||
user_string_free(ride->name);
|
||||
ride->type = RIDE_TYPE_NULL;
|
||||
|
||||
@@ -1213,11 +1213,7 @@ void window_guest_overview_tool_down(){
|
||||
return;
|
||||
}
|
||||
|
||||
int _edx;
|
||||
_edx = (dest_z / 8) | (((dest_z / 8) + 1) << 8);
|
||||
int flags = RCT2_CALLPROC_X(0x68B93A, tile_x, 0xF, tile_y, _edx, (int)w, 0, 0);
|
||||
|
||||
if (flags & 0x100){
|
||||
if (!map_can_construct_at(tile_x, tile_y, dest_z / 8, (dest_z / 8) + 1, 15)){
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) != 0x3A5 ){
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) != 0x49B){
|
||||
window_error_open(0x785, -1);
|
||||
|
||||
@@ -209,3 +209,36 @@ static void window_maze_construction_paint()
|
||||
|
||||
window_draw_widgets(w, dpi);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* rct2: 0x006CD887
|
||||
*/
|
||||
void window_maze_construction_update_pressed_widgets()
|
||||
{
|
||||
rct_window *w;
|
||||
|
||||
w = window_find_by_class(WC_RIDE_CONSTRUCTION);
|
||||
if (w == NULL)
|
||||
return;
|
||||
|
||||
uint64 pressedWidgets = w->pressed_widgets;
|
||||
pressedWidgets &= ~(1ULL << WIDX_MAZE_BUILD_MODE);
|
||||
pressedWidgets &= ~(1ULL << WIDX_MAZE_MOVE_MODE);
|
||||
pressedWidgets &= ~(1ULL << WIDX_MAZE_FILL_MODE);
|
||||
|
||||
switch (_rideConstructionState) {
|
||||
case RIDE_CONSTRUCTION_STATE_6:
|
||||
pressedWidgets |= (1ULL << WIDX_MAZE_BUILD_MODE);
|
||||
break;
|
||||
case RIDE_CONSTRUCTION_STATE_7:
|
||||
pressedWidgets |= (1ULL << WIDX_MAZE_MOVE_MODE);
|
||||
break;
|
||||
case RIDE_CONSTRUCTION_STATE_8:
|
||||
pressedWidgets |= (1ULL << WIDX_MAZE_FILL_MODE);
|
||||
break;
|
||||
}
|
||||
|
||||
w->pressed_widgets = pressedWidgets;
|
||||
window_invalidate(w);
|
||||
}
|
||||
|
||||
@@ -1139,11 +1139,7 @@ void window_staff_overview_tool_down(){
|
||||
return;
|
||||
}
|
||||
|
||||
int _edx;
|
||||
_edx = (dest_z / 8) | (((dest_z / 8) + 1) << 8);
|
||||
int flags = RCT2_CALLPROC_X(0x68B93A, tile_x, 0xF, tile_y, _edx, (int)w, 0, 0);
|
||||
|
||||
if (flags & 0x100){
|
||||
if (!map_can_construct_at(tile_x, tile_y, dest_z / 8, (dest_z / 8) + 1, 15)){
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) != 0x3A5){
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) != 0x49B){
|
||||
window_error_open(0x785, -1);
|
||||
|
||||
@@ -1387,7 +1387,7 @@ money32 map_change_surface_style(int x0, int y0, int x1, int y1, uint8 surfaceSt
|
||||
mapElement->type |= (surfaceStyle >> 3) & MAP_ELEMENT_DIRECTION_MASK;
|
||||
|
||||
map_invalidate_tile_full(x, y);
|
||||
RCT2_CALLPROC_X(0x00673883, x, 0, y, map_element_height(x, y), 0, 0, 0);
|
||||
footpath_remove_litter(x, y, map_element_height(x, y));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ static bool map_animation_invalidate_small_scenery(int x, int y, int baseZ)
|
||||
peep->action_frame = 0;
|
||||
peep->action_sprite_image_offset = 0;
|
||||
sub_693B58(peep);
|
||||
RCT2_CALLPROC_X(0x006EC53F, 0, 0, 0, 0, (int)peep, 0, 0);
|
||||
sub_6EC53F((rct_sprite*)peep);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -764,6 +764,51 @@ void move_sprite_to_list(rct_sprite *sprite, uint8 cl)
|
||||
++(RCT2_GLOBAL(0x13573C8 + cl, uint16));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* rct: 0x00673200
|
||||
*/
|
||||
static void sub_673200(rct_sprite *sprite)
|
||||
{
|
||||
RCT2_CALLPROC_X(0x00673200, 0, 0, 0, 0, (int)sprite, 0, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* rct: 0x00673298
|
||||
*/
|
||||
static void sub_673298(rct_sprite *sprite)
|
||||
{
|
||||
RCT2_CALLPROC_X(0x00673298, 0, 0, 0, 0, (int)sprite, 0, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* rct: 0x00673385
|
||||
*/
|
||||
static void sub_673385(rct_sprite *sprite)
|
||||
{
|
||||
RCT2_CALLPROC_X(0x00673385, 0, 0, 0, 0, (int)sprite, 0, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* rct: 0x0067339D
|
||||
*/
|
||||
static void sub_67339D(rct_sprite *sprite)
|
||||
{
|
||||
RCT2_CALLPROC_X(0x0067339D, 0, 0, 0, 0, (int)sprite, 0, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* rct: 0x006733B4
|
||||
*/
|
||||
static void sub_6733B4(rct_sprite *sprite)
|
||||
{
|
||||
RCT2_CALLPROC_X(0x006733B4, 0, 0, 0, 0, (int)sprite, 0, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* rct: 0x006731CD
|
||||
@@ -772,22 +817,22 @@ void sprite_misc_update(rct_sprite *sprite)
|
||||
{
|
||||
switch (sprite->unknown.misc_identifier) {
|
||||
case SPRITE_MISC_0:
|
||||
RCT2_CALLPROC_X(0x00673200, 0, 0, 0, 0, (int)sprite, 0, 0);
|
||||
sub_673200(sprite);
|
||||
break;
|
||||
case SPRITE_MISC_MONEY_EFFECT:
|
||||
money_effect_update(&sprite->money_effect);
|
||||
break;
|
||||
case SPRITE_MISC_2:
|
||||
RCT2_CALLPROC_X(0x00673298, 0, 0, 0, 0, (int)sprite, 0, 0);
|
||||
sub_673298(sprite);
|
||||
break;
|
||||
case SPRITE_MISC_3:
|
||||
RCT2_CALLPROC_X(0x00673385, 0, 0, 0, 0, (int)sprite, 0, 0);
|
||||
sub_673385(sprite);
|
||||
break;
|
||||
case SPRITE_MISC_4:
|
||||
RCT2_CALLPROC_X(0x0067339D, 0, 0, 0, 0, (int)sprite, 0, 0);
|
||||
sub_67339D(sprite);
|
||||
break;
|
||||
case SPRITE_MISC_5:
|
||||
RCT2_CALLPROC_X(0x006733B4, 0, 0, 0, 0, (int)sprite, 0, 0);
|
||||
sub_6733B4(sprite);
|
||||
break;
|
||||
case SPRITE_MISC_JUMPING_FOUNTAIN_WATER:
|
||||
case SPRITE_MISC_JUMPING_FOUNTAIN_SNOW:
|
||||
@@ -975,4 +1020,13 @@ void litter_create(int x, int y, int z, int direction, int type)
|
||||
sprite_move(x, y, z, (rct_sprite*)litter);
|
||||
sub_6EC60B((rct_sprite*)litter);
|
||||
litter->creationTick = RCT2_GLOBAL(RCT2_ADDRESS_SCENARIO_TICKS, uint32);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* rct2: 0x006EC53F
|
||||
*/
|
||||
void sub_6EC53F(rct_sprite *sprite)
|
||||
{
|
||||
RCT2_CALLPROC_X(0x006EC53F, 0, 0, 0, 0, (int)sprite, 0, 0);
|
||||
}
|
||||
|
||||
@@ -257,5 +257,6 @@ void invalidate_sprite(rct_sprite *sprite);
|
||||
void sub_6EC60B(rct_sprite* sprite);
|
||||
void sprite_remove(rct_sprite *sprite);
|
||||
void litter_create(int x, int y, int z, int direction, int type);
|
||||
void sub_6EC53F(rct_sprite *sprite);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user