/** * type == 0 -> guests on ride * type == 1 -> guests in queue * type == 2 -> guests thinking about ride * type == 3 -> guests thinking X, opened from news item * index is number of the ride or index of the thought * values of eax and edx probably determine the filter name string * * rct2: 0x006993BA */ void window_guest_list_open_with_filter(int type, int index) { uint32 eax, edx; window_guest_list_open(); _window_guest_list_selected_page = 0; _window_guest_list_num_pages = 1; _window_guest_list_tracking_only = false; RCT2_GLOBAL(0x009AC7E0, uint8) = 0; RCT2_GLOBAL(0x009AC7F0, uint8) = 0; rct_ride *ride = NULL; if (type != 3) { // common for cases 0, 1, 2 ride = GET_RIDE(index & 0x000000FF); eax = ride->name; edx = ride->name_arguments; } switch(type) { case 0: _window_guest_list_selected_filter = 0; eax = (eax << 16) + 1435; if ((RCT2_GLOBAL(0x97CF40 + ride->type * 8, uint32) & 0x400000) != 0) eax++; RCT2_GLOBAL(0x00F1EDF6, uint32) = eax; RCT2_GLOBAL(0x00F1EDFA, uint32) = edx; _window_guest_list_highlighted_index = 0xFFFF; _window_guest_list_selected_tab = 0; _window_guest_list_selected_view = 0; break; case 1: _window_guest_list_selected_filter = 0; eax = (eax << 16) + 1433; RCT2_GLOBAL(0x00F1EDF6, uint32) = eax; RCT2_GLOBAL(0x00F1EDFA, uint32) = edx; _window_guest_list_highlighted_index = 0xFFFF; _window_guest_list_selected_tab = 0; _window_guest_list_selected_view = 0; break; case 2: _window_guest_list_selected_filter = 1; eax = (eax << 16) + 0xFFFF; RCT2_GLOBAL(0x00F1EDF6, uint32) = eax; RCT2_GLOBAL(0x00F1EDFA, uint32) = edx; _window_guest_list_highlighted_index = 0xFFFF; _window_guest_list_selected_tab = 0; _window_guest_list_selected_view = 1; break; case 3: _window_guest_list_selected_filter = 1; index = (index & 0x000000FF) + 1480; RCT2_GLOBAL(0x00F1EDF6, uint32) = index; RCT2_GLOBAL(0x00F1EDFA, uint32) = 0; _window_guest_list_highlighted_index = 0xFFFF; _window_guest_list_selected_tab = 0; _window_guest_list_selected_view = 1; break; } }
/** * * rct2: 0x0066C957 */ static void window_game_top_toolbar_mouseup() { short widgetIndex; rct_window *w, *mainWindow; __asm mov widgetIndex, dx __asm mov w, esi switch (widgetIndex) { case WIDX_PAUSE: game_do_command(0, 1, 0, 0, 2, 0, 0); break; case WIDX_FASTFORWARD: window_cheats_open(); break; case WIDX_ZOOM_OUT: if ((mainWindow = window_get_main()) != NULL) window_zoom_out(mainWindow); break; case WIDX_ZOOM_IN: if ((mainWindow = window_get_main()) != NULL) window_zoom_in(mainWindow); break; case WIDX_ROTATE: if ((mainWindow = window_get_main()) != NULL) window_rotate_camera(mainWindow); break; case WIDX_MAP: RCT2_CALLPROC_EBPSAFE(0x0068C88A); //window_map_open(); break; case WIDX_CLEAR_SCENERY: if ((RCT2_GLOBAL(0x009DE518, uint32) & (1 << 3)) && RCT2_GLOBAL(RCT2_ADDRESS_TOOL_WINDOWCLASS, uint8) == 1 && RCT2_GLOBAL(RCT2_ADDRESS_TOOL_WIDGETINDEX, uint16) == 16) { tool_cancel(); } else { show_gridlines(); tool_set(w, WIDX_CLEAR_SCENERY, 12); RCT2_GLOBAL(0x009DE518, uint32) |= (1 << 6); RCT2_GLOBAL(RCT2_ADDRESS_LAND_TOOL_SIZE, sint16) = 2; window_clear_scenery_open(); } break; case WIDX_LAND: if ((RCT2_GLOBAL(0x009DE518, uint32) & (1 << 3)) && RCT2_GLOBAL(RCT2_ADDRESS_TOOL_WINDOWCLASS, uint8) == 1 && RCT2_GLOBAL(RCT2_ADDRESS_TOOL_WIDGETINDEX, uint16) == 7) { tool_cancel(); } else { show_gridlines(); tool_set(w, WIDX_LAND, 18); RCT2_GLOBAL(0x009DE518, uint32) |= (1 << 6); RCT2_GLOBAL(RCT2_ADDRESS_LAND_TOOL_SIZE, sint16) = 1; window_land_open(); } break; case WIDX_WATER: if ((RCT2_GLOBAL(0x009DE518, uint32) & (1 << 3)) && RCT2_GLOBAL(RCT2_ADDRESS_TOOL_WINDOWCLASS, uint8) == 1 && RCT2_GLOBAL(RCT2_ADDRESS_TOOL_WIDGETINDEX, uint16) == 8) { tool_cancel(); } else { show_gridlines(); tool_set(w, WIDX_WATER, 19); RCT2_GLOBAL(0x009DE518, uint32) |= (1 << 6); RCT2_GLOBAL(RCT2_ADDRESS_LAND_TOOL_SIZE, sint16) = 1; window_water_open(); } break; case WIDX_SCENERY: if (!tool_set(w, WIDX_SCENERY, 0)) { RCT2_GLOBAL(0x009DE518, uint32) |= (1 << 6); RCT2_CALLPROC_EBPSAFE(0x006E0FEF); } break; case WIDX_PATH: if (window_find_by_id(WC_FOOTPATH, 0) == NULL) { window_footpath_open(); } else { tool_cancel(); window_close_by_id(0x80 | WC_FOOTPATH, 0); } break; case WIDX_CONSTRUCT_RIDE: RCT2_CALLPROC_EBPSAFE(0x006B3CFF); break; case WIDX_RIDES: window_ride_list_open(); break; case WIDX_PARK: window_park_entrance_open(); break; case WIDX_STAFF: RCT2_CALLPROC_EBPSAFE(0x006BD3CC); break; case WIDX_GUESTS: window_guest_list_open(); break; } }
/** * * rct2: 0x006993BA * * @param index The number of the ride or index of the thought */ rct_window * window_guest_list_open_with_filter(sint32 type, sint32 index) { rct_window * w = window_guest_list_open(); _window_guest_list_selected_page = 0; _window_guest_list_num_pages = 1; _window_guest_list_tracking_only = false; switch(type) { case GLFT_GUESTS_ON_RIDE: { Ride *ride = get_ride(index & 0x000000FF); _window_guest_list_filter_arguments[0] = STR_ON_RIDE; if (ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_IN_RIDE)) { _window_guest_list_filter_arguments[0] = STR_IN_RIDE; } _window_guest_list_filter_arguments[1] = ride->name; _window_guest_list_filter_arguments[2] = ride->name_arguments_type_name; _window_guest_list_filter_arguments[3] = ride->name_arguments_number; _window_guest_list_selected_filter = 0; _window_guest_list_highlighted_index = 0xFFFF; _window_guest_list_selected_tab = 0; _window_guest_list_selected_view = 0; break; } case GLFT_GUESTS_IN_QUEUE: { Ride *ride = get_ride(index & 0x000000FF); _window_guest_list_filter_arguments[0] = STR_QUEUING_FOR; _window_guest_list_filter_arguments[1] = ride->name; _window_guest_list_filter_arguments[2] = ride->name_arguments_type_name; _window_guest_list_filter_arguments[3] = ride->name_arguments_number; _window_guest_list_selected_filter = 0; _window_guest_list_highlighted_index = 0xFFFF; _window_guest_list_selected_tab = 0; _window_guest_list_selected_view = 0; break; } case GLFT_GUESTS_THINKING_ABOUT_RIDE: { Ride *ride = get_ride(index & 0x000000FF); _window_guest_list_filter_arguments[0] = STR_NONE; _window_guest_list_filter_arguments[1] = ride->name; _window_guest_list_filter_arguments[2] = ride->name_arguments_type_name; _window_guest_list_filter_arguments[3] = ride->name_arguments_number; _window_guest_list_selected_filter = 1; _window_guest_list_highlighted_index = 0xFFFF; _window_guest_list_selected_tab = 0; _window_guest_list_selected_view = 1; break; } case GLFT_GUESTS_THINKING_X: { _window_guest_list_filter_arguments[0] = PeepThoughts[(index & 0x000000FF)]; _window_guest_list_filter_arguments[1] = 0; _window_guest_list_filter_arguments[2] = 0; _window_guest_list_filter_arguments[3] = 0; _window_guest_list_selected_filter = 1; _window_guest_list_highlighted_index = 0xFFFF; _window_guest_list_selected_tab = 0; _window_guest_list_selected_view = 1; break; } } return w; }