1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-29 17:54:50 +01:00

remove various callprocs

This commit is contained in:
IntelOrca
2015-06-29 17:22:01 +01:00
parent c3d5d5f6c2
commit 40ba6a3efa
11 changed files with 113 additions and 21 deletions

View File

@@ -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);

View File

@@ -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);
}

View File

@@ -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);