/** * * 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: 0x006AA0C6 */ int object_read_and_load_entries(FILE *file) { object_unload_all(); int i, j; rct_object_entry *entries; // Read all the object entries entries = malloc(OBJECT_ENTRY_COUNT * sizeof(rct_object_entry)); sawyercoding_read_chunk(file, (uint8*)entries); // Load each object for (i = 0; i < OBJECT_ENTRY_COUNT; i++) { if (!check_object_entry(&entries[i])) continue; // Get entry group index int entryGroupIndex = i; for (j = 0; j < countof(object_entry_group_counts); j++) { if (entryGroupIndex < object_entry_group_counts[j]) break; entryGroupIndex -= object_entry_group_counts[j]; } // Load the obect if (!object_load(entryGroupIndex, &entries[i])) { // Failed to load the object free(entries); memcpy((char*)0x13CE952, entries[i].name, 8); object_unload_all(); return 0; } } free(entries); return 1; }
/** * * 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(); }