/** * * rct2: 0x0068E8DA */ void title_load() { if (RCT2_GLOBAL(0x009DEA6E, uint8) & 1) RCT2_CALLPROC_X(0x00667C15, 0, 1, 0, 0, 0, 0, 0);//Game pause toggle RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) = SCREEN_FLAGS_TITLE_DEMO; reset_park_entrances(); user_string_clear_all(); reset_sprite_list(); ride_init_all(); window_guest_list_init_vars_a(); sub_6BD3A4(); // RCT2_CALLPROC_EBPSAFE(0x006BD3A4); map_init(); park_init(); date_reset(); climate_reset(CLIMATE_COOL_AND_WET); RCT2_CALLPROC_EBPSAFE(0x006DFEE4); window_new_ride_init_vars(); window_guest_list_init_vars_b(); window_staff_list_init_vars(); map_update_tile_pointers(); //RCT2_CALLPROC_EBPSAFE(0x0068AFFD); reset_0x69EBE4();// RCT2_CALLPROC_EBPSAFE(0x0069EBE4); viewport_init_all(); news_item_init_queue(); title_create_windows(); title_init_showcase(); gfx_invalidate_screen(); RCT2_GLOBAL(0x009DEA66, uint16) = 0; }
/** * * rct2: 0x006729FD */ void trackmanager_load() { rct_window *mainWindow; object_unload_all(); map_init(); set_all_land_owned(); RCT2_CALLPROC_EBPSAFE(0x006B9CB0); reset_park_entrances(); reset_saved_strings(); reset_sprite_list(); ride_init_all(); window_guest_list_init_vars_a(); sub_6BD3A4(); park_init(); finance_init(); date_reset(); window_guest_list_init_vars_b(); window_staff_list_init_vars(); RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) = SCREEN_FLAGS_TRACK_MANAGER; RCT2_GLOBAL(0x0141F570, uint8) = 0; window_new_ride_init_vars(); viewport_init_all(); news_item_init_queue(); RCT2_CALLPROC_EBPSAFE(0x0066EF38); // window_main_editor_create mainWindow = window_get_main(); window_scroll_to_location(mainWindow, 2400, 2400, 112); mainWindow->flags &= ~WF_SCROLLING_TO_LOCATION; RCT2_CALLPROC_EBPSAFE(0x006837E3); gfx_invalidate_screen(); RCT2_GLOBAL(0x009DEA66, sint16) = 0; rct2_endupdate(); }
/** * * rct2: 0x0068E8DA */ void title_load() { if (RCT2_GLOBAL(0x009DEA6E, uint8) & 1) RCT2_CALLPROC_X(0x00667C15, 0, 1, 0, 0, 0, 0, 0); RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) = SCREEN_FLAGS_TITLE_DEMO; reset_park_entrances(); reset_saved_strings(); RCT2_CALLPROC_EBPSAFE(0x0069EB13); ride_init_all(); window_guest_list_init_vars_a(); RCT2_CALLPROC_EBPSAFE(0x006BD3A4); map_init(); park_init(); date_reset(); RCT2_CALLPROC_X(0x006C45ED, 0, 0, 0, 0, 0, 0, 0); RCT2_CALLPROC_EBPSAFE(0x006DFEE4); window_new_ride_init_vars(); window_guest_list_init_vars_b(); window_staff_init_vars(); RCT2_CALLPROC_EBPSAFE(0x0068AFFD); RCT2_CALLPROC_EBPSAFE(0x0069EBE4); viewport_init_all(); news_item_init_queue(); title_create_windows(); title_init_showcase(); gfx_invalidate_screen(); RCT2_GLOBAL(0x009DEA66, uint16) = 0; }
/** * * rct2: 0x006AB199 */ static void window_editor_object_selection_close() { rct_window* w; window_get_register(w); //if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_EDITOR)) // return; RCT2_CALLPROC_EBPSAFE(0x6ABB66); editor_load_selected_objects(); reset_loaded_objects(); object_free_scenario_text(); RCT2_CALLPROC_EBPSAFE(0x6AB316); if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_EDITOR) { research_populate_list_random(); research_remove_non_separate_vehicle_types(); } else { // Used for in-game object selection cheat research_reset_items(); research_populate_list_researched(); gSilentResearch = true; sub_684AC3(); gSilentResearch = false; } window_new_ride_init_vars(); }
/** * * rct2: 0x0068E8DA */ void title_load() { log_verbose("loading title"); if (RCT2_GLOBAL(RCT2_ADDRESS_GAME_PAUSED, uint8) & 1) pause_toggle(); RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) = SCREEN_FLAGS_TITLE_DEMO; reset_park_entrances(); user_string_clear_all(); reset_sprite_list(); ride_init_all(); window_guest_list_init_vars_a(); staff_reset_modes(); map_init(150); park_init(); date_reset(); climate_reset(CLIMATE_COOL_AND_WET); scenery_set_default_placement_configuration(); window_new_ride_init_vars(); window_guest_list_init_vars_b(); window_staff_list_init_vars(); map_update_tile_pointers(); reset_0x69EBE4(); stop_ride_music(); stop_crowd_sound(); //stop_other_sounds(); viewport_init_all(); news_item_init_queue(); title_create_windows(); title_init_showcase(); gfx_invalidate_screen(); RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_AGE, uint16) = 0; #ifndef DISABLE_NETWORK network_close(); #endif if (gOpenRCT2ShowChangelog) { gOpenRCT2ShowChangelog = false; window_changelog_open(); } log_verbose("loading title finished"); }
/** * * rct2: 0x0066FFE1 */ void editor_load() { rct_window *mainWindow; pause_sounds(); unpause_sounds(); object_unload_all(); map_init(); RCT2_CALLPROC_EBPSAFE(0x006B9CB0); reset_park_entrances(); reset_saved_strings(); reset_sprite_list(); ride_init_all(); window_guest_list_init_vars_a(); sub_6BD3A4(); park_init(); finance_init(); date_reset(); window_guest_list_init_vars_b(); window_staff_list_init_vars(); RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) = SCREEN_FLAGS_SCENARIO_EDITOR; RCT2_GLOBAL(0x0141F570, uint8) = 0; RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) |= PARK_FLAGS_SHOW_REAL_GUEST_NAMES; window_new_ride_init_vars(); RCT2_GLOBAL(0x0141F571, uint8) = 4; viewport_init_all(); news_item_init_queue(); RCT2_CALLPROC_EBPSAFE(0x0066EF38); // window_main_editor_create mainWindow = window_get_main(); window_scroll_to_location(mainWindow, 2400, 2400, 112); mainWindow->flags &= ~WF_SCROLLING_TO_LOCATION; RCT2_CALLPROC_EBPSAFE(0x006837E3); gfx_invalidate_screen(); RCT2_GLOBAL(0x009DEA66, sint16) = 0; // rct2_endupdate(); }
/** * * rct2: 0x00678761 */ static void title_update_showcase() { rct_window* w; uint8 script_opcode, script_operand; short x, y, z; int i; if (_scriptWaitCounter <= 0) { do { script_opcode = *_currentScript++; switch (script_opcode) { case TITLE_SCRIPT_WAIT: _scriptWaitCounter = (*_currentScript++) * 32; break; case TITLE_SCRIPT_LOAD: if (!scenario_load(get_file_path(PATH_ID_SIXFLAGS_MAGICMOUNTAIN))) { log_fatal("OpenRCT2 can not currently cope when unable to load title screen scenario."); exit(-1); } w = window_get_main(); w->viewport_target_sprite = -1; w->saved_view_x = RCT2_GLOBAL(RCT2_ADDRESS_SAVED_VIEW_X, sint16); w->saved_view_y = RCT2_GLOBAL(RCT2_ADDRESS_SAVED_VIEW_Y, sint16); { char _cl = (RCT2_GLOBAL(0x0138869E, sint16) & 0xFF) - w->viewport->zoom; w->viewport->zoom = RCT2_GLOBAL(0x0138869E, sint16) & 0xFF; *((char*)(&RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_ROTATION, sint32))) = RCT2_GLOBAL(0x0138869E, sint16) >> 8; if (_cl != 0) { if (_cl < 0) { _cl = -_cl; w->viewport->view_width >>= _cl; w->viewport->view_height >>= _cl; } else { w->viewport->view_width <<= _cl; w->viewport->view_height <<= _cl; } } w->saved_view_x -= w->viewport->view_width >> 1; w->saved_view_y -= w->viewport->view_height >> 1; } window_invalidate(w); sub_69E9A7(); window_new_ride_init_vars(); sub_684AC3(); RCT2_CALLPROC_EBPSAFE(0x006DFEE4); news_item_init_queue(); gfx_invalidate_screen(); RCT2_GLOBAL(0x009DEA66, sint16) = 0; RCT2_GLOBAL(0x009DEA5C, sint16) = 0x0D6D8; break; case TITLE_SCRIPT_LOCATION: x = (*_currentScript++) * 32 + 16; y = (*_currentScript++) * 32 + 16; z = map_element_height(x, y); // Update viewport w = window_get_main(); if (w != NULL) { window_scroll_to_location(w, x, y, z); w->flags &= ~0x08; viewport_update_position(w); } break; case TITLE_SCRIPT_ROTATE: script_operand = (*_currentScript++); w = window_get_main(); if (w != NULL) for (i = 0; i < script_operand; i++) window_rotate_camera(w); break; case TITLE_SCRIPT_RESTART: _currentScript = _magicMountainScript; if (gRandomShowcase) { if (_currentScript != NULL) free((uint8*)_currentScript); _currentScript = generate_random_script(); } break; } } while (_scriptWaitCounter == 0);
int rct2_init() { log_verbose("initialising game"); RCT2_GLOBAL(RCT2_ADDRESS_SCENARIO_TICKS, uint32) = 0; RCT2_GLOBAL(0x009AC310, char*) = RCT2_GLOBAL(RCT2_ADDRESS_CMDLINE, char*); get_system_time(); util_srand((unsigned int)time(0)); RCT2_GLOBAL(0x009DEA69, short) = RCT2_GLOBAL(RCT2_ADDRESS_OS_TIME_DAY, short); RCT2_GLOBAL(0x009DEA6B, short) = RCT2_GLOBAL(RCT2_ADDRESS_OS_TIME_MONTH, short); if (!rct2_init_directories()) return 0; if (!rct2_startup_checks()) return 0; config_reset_shortcut_keys(); config_shortcut_keys_load(); RCT2_GLOBAL(RCT2_ADDRESS_PLACE_OBJECT_MODIFIER, uint8) = 0; // config_load(); object_list_load(); scenario_load_list(); ride_list_item item = { 253, 0 }; track_load_list(item); gfx_load_g1(); gfx_load_g2(); font_sprite_initialise_characters(); if (!gOpenRCT2Headless) { platform_init(); audio_init_ride_sounds_and_info(); } viewport_init_all(); news_item_init_queue(); get_local_time(); reset_park_entrances(); user_string_clear_all(); reset_sprite_list(); ride_init_all(); window_guest_list_init_vars_a(); staff_reset_modes(); map_init(150); park_init(); if (!gOpenRCT2Headless) window_title_menu_open(); date_reset(); climate_reset(CLIMATE_COOL_AND_WET); scenery_set_default_placement_configuration(); window_new_ride_init_vars(); window_guest_list_init_vars_b(); window_staff_list_init_vars(); if (!gOpenRCT2Headless) { title_load(); gfx_clear(RCT2_ADDRESS(RCT2_ADDRESS_SCREEN_DPI, rct_drawpixelinfo), 10); } log_verbose("initialising game finished"); return 1; }