예제 #1
0
/**
*
*  rct2: 0x0066F62C
*/
void window_editor_bottom_toolbar_jump_back_to_landscape_editor() {
	window_close_all();
	sub_6DFED0();
	scenery_set_default_placement_configuration();
	g_editor_step = EDITOR_STEP_LANDSCAPE_EDITOR;
	window_map_open();
	gfx_invalidate_screen();
}
예제 #2
0
/**
 *
 *  rct2: 0x0066F6B0
 */
void window_editor_bottom_toolbar_jump_forward_from_object_selection()
{
	if (!window_editor_bottom_toolbar_check_object_selection())
		return;

	if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_DESIGNER) {
		sub_66F6E3();
	} else {
		sub_6DFED0();
		scenery_set_default_placement_configuration();
		RCT2_GLOBAL(0x00141F570, uint8) = 1;
		window_map_open();
		gfx_invalidate_screen();
	}
}
예제 #3
0
/**
 *
 *  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: 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();
    }
}
예제 #5
0
파일: rct2.c 프로젝트: Aitchwing/OpenRCT2
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;
}