/** * * rct2: 0x006CFA31 */ static void window_track_list_mouseup(rct_window *w, int widgetIndex) { switch (widgetIndex) { case WIDX_CLOSE: window_close(w); if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_MANAGER) { window_close_by_number(WC_MANAGE_TRACK_DESIGN, w->number); window_close_by_number(WC_TRACK_DELETE_PROMPT, w->number); trackmanager_load(); } break; case WIDX_ROTATE: RCT2_GLOBAL(RCT2_ADDRESS_TRACK_PREVIEW_ROTATION, uint8)++; RCT2_GLOBAL(RCT2_ADDRESS_TRACK_PREVIEW_ROTATION, uint8) %= 4; window_invalidate(w); break; case WIDX_TOGGLE_SCENERY: RCT2_GLOBAL(RCT2_ADDRESS_TRACK_DESIGN_SCENERY_TOGGLE, uint8) ^= 1; reset_track_list_cache(); window_invalidate(w); break; case WIDX_BACK: window_close(w); if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_MANAGER) { window_close_by_number(WC_MANAGE_TRACK_DESIGN, w->number); window_close_by_number(WC_TRACK_DELETE_PROMPT, w->number); trackmanager_load(); } else { window_new_ride_open(); } break; } }
rct_window *window_new_ride_open_research() { rct_window *w; w = window_new_ride_open(); window_new_ride_set_page(w, WINDOW_NEW_RIDE_PAGE_RESEARCH); return w; }
/** * Opens the window/tab for the subject of the news item * * rct2: 0x0066EBE6 * */ void news_item_open_subject(sint32 type, sint32 subject) { rct_peep* peep; rct_window* window; switch (type) { case NEWS_ITEM_RIDE: window_ride_main_open(subject); break; case NEWS_ITEM_PEEP_ON_RIDE: case NEWS_ITEM_PEEP: peep = GET_PEEP(subject); window_guest_open(peep); break; case NEWS_ITEM_MONEY: window_finances_open(); break; case NEWS_ITEM_RESEARCH: if (subject >= 0x10000) { // Open ride list window window_new_ride_open(); // Switch to right tab and scroll to ride location ride_list_item rideItem; rideItem.type = subject >> 8; rideItem.entry_index = subject & 0xFF; window_new_ride_focus(rideItem); break; } // Check if window is already open window = window_bring_to_front_by_class(WC_SCENERY); if (window == NULL) { window = window_find_by_class(WC_TOP_TOOLBAR); if (window != NULL) { window_invalidate(window); if (!tool_set(window, WC_TOP_TOOLBAR__WIDX_SCENERY, TOOL_ARROW)) { input_set_flag(INPUT_FLAG_6, true); window_scenery_open(); } } } // Switch to new scenery tab window = window_find_by_class(WC_SCENERY); if (window != NULL) window_event_mouse_down_call(window, WC_SCENERY__WIDX_SCENERY_TAB_1 + subject); break; case NEWS_ITEM_PEEPS: window_guest_list_open_with_filter(GLFT_GUESTS_THINKING_X, subject);; break; case NEWS_ITEM_AWARD: window_park_awards_open(); break; case NEWS_ITEM_GRAPH: window_park_rating_open(); break; }
/** * * rct2: 0x0066C957 */ static void window_editor_top_toolbar_mouseup() { short widgetIndex; rct_window *w, *mainWindow; window_widget_get_registers(w, widgetIndex); switch (widgetIndex) { case WIDX_ZOOM_IN: if ((mainWindow = window_get_main()) != NULL) window_zoom_in(mainWindow); break; case WIDX_ZOOM_OUT: if ((mainWindow = window_get_main()) != NULL) window_zoom_out(mainWindow); break; case WIDX_ROTATE: if ((mainWindow = window_get_main()) != NULL) window_rotate_camera(mainWindow); break; case WIDX_SCENERY: if (!tool_set(w, WIDX_SCENERY, 0)) { RCT2_GLOBAL(0x009DE518, uint32) |= (1 << 6); window_scenery_open(); } break; case WIDX_PATH: toggle_footpath_window(); break; case WIDX_LAND: toggle_land_window(w, WIDX_LAND); break; case WIDX_CLEAR_SCENERY: toggle_clear_scenery_window(w, WIDX_CLEAR_SCENERY); break; case WIDX_WATER: toggle_water_window(w, WIDX_WATER); break; case WIDX_MAP: window_map_open(); break; case WIDX_CONSTRUCT_RIDE: window_new_ride_open(); break; } }
/** * * rct2: 0x0066F6B0 */ void window_editor_bottom_toolbar_jump_forward_from_object_selection() { if (!window_editor_bottom_toolbar_check_object_selection()) return; if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) { reset_researched_ride_types_and_entries(); window_new_ride_open(); gS6Info.editor_step = EDITOR_STEP_ROLLERCOASTER_DESIGNER; gfx_invalidate_screen(); } else { reset_researched_scenery_items(); scenery_set_default_placement_configuration(); gS6Info.editor_step = EDITOR_STEP_LANDSCAPE_EDITOR; window_map_open(); gfx_invalidate_screen(); } }
/** * * rct2: 0x0066F6E3 */ static void sub_66F6E3() { RCT2_GLOBAL(0x01357404, uint32) = 0xFFFFFFFF; RCT2_GLOBAL(0x01357408, uint32) = 0xFFFFFFFF; RCT2_GLOBAL(0x0135740C, uint32) = 0xFFFFFFFF; RCT2_GLOBAL(0x01357410, uint32) = 0xFFFFFFFF; for (int i = 0; i < 128; i++) { RCT2_ADDRESS(0x01357444, uint32)[i] = RCT2_ADDRESS(0x0097C468, uint32)[i]; RCT2_ADDRESS(0x01357644, uint32)[i] = RCT2_ADDRESS(0x0097C5D4, uint32)[i]; } for (int i = 0; i < 8; i++) { RCT2_ADDRESS(0x01357424, uint32)[i] = 0xFFFFFFFF; } window_new_ride_open(); RCT2_GLOBAL(0x0141F570, uint8) = 6; gfx_invalidate_screen(); }
/** * * rct2: 0x006CFA31 */ static void window_track_list_mouseup(rct_window *w, rct_widgetindex widgetIndex) { switch (widgetIndex) { case WIDX_CLOSE: window_close(w); break; case WIDX_ROTATE: _currentTrackPieceDirection++; _currentTrackPieceDirection %= 4; window_invalidate(w); break; case WIDX_TOGGLE_SCENERY: gTrackDesignSceneryToggle = !gTrackDesignSceneryToggle; _loadedTrackDesignIndex = TRACK_DESIGN_INDEX_UNLOADED; window_invalidate(w); break; case WIDX_BACK: window_close(w); if (!(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER)) { window_new_ride_open(); } break; } }