Exemple #1
0
/**
 *
 *  rct2: 0x0066DF17
 */
static void window_save_prompt_close()
{
    // Unpause the game
    RCT2_GLOBAL(0x009DEA6E, uint8) &= ~2;
    unpause_sounds();
    window_invalidate_by_id(0x80 | WC_TOP_TOOLBAR, 0);
}
Exemple #2
0
/**
 * 
 *  rct2: 0x00674EB6
 */
static int open_load_game_dialog()
{
	int result;
	format_string((char*)0x0141ED68, STR_LOAD_GAME_DIALOG_TITLE, 0);
	strcpy((char*)0x0141EF68, (char*)RCT2_ADDRESS_SAVED_GAMES_PATH);
	format_string((char*)0x0141EE68, STR_RCT2_SAVED_GAME, 0);
	pause_sounds();
	result = osinterface_open_common_file_dialog(1, (char*)0x0141ED68, (char*)0x0141EF68, "*.SV6", (char*)0x0141EE68);
	unpause_sounds();
	// window_proc
	return result;
}
Exemple #3
0
/**
 * 
 *  rct2: 0x00674F40
 */
static int open_landscape_file_dialog()
{
	int result;
	format_string((char*)0x0141ED68, STR_LOAD_LANDSCAPE_DIALOG_TITLE, 0);
	strcpy((char*)0x0141EF68, (char*)RCT2_ADDRESS_LANDSCAPES_PATH);
	format_string((char*)0x0141EE68, STR_RCT2_LANDSCAPE_FILE, 0);
	pause_sounds();
	result = osinterface_open_common_file_dialog(1, (char*)0x0141ED68, (char*)0x0141EF68, "*.SV6;*.SV4;*.SC6", (char*)0x0141EE68);
	unpause_sounds();
	// window_proc
	return result;
}
Exemple #4
0
/**
 * 
 *  rct2: 0x00667C15
 */
static void game_pause_toggle()
{
	char input_bl;

	__asm mov input_bl, bl

	if (input_bl & 1) {
		RCT2_GLOBAL(0x009DEA6E, uint32) ^= 1;
		window_invalidate_by_id(WC_TOP_TOOLBAR, 0);
		if (RCT2_GLOBAL(0x009DEA6E, uint32) & 1)
			pause_sounds();
		else
			unpause_sounds();
	}

	__asm mov ebx, 0
}
/**
 *
 *  rct2: 0x00675181
 */
static int show_save_scenario_dialog(char *resultPath)
{
	rct_s6_info *s6Info = (rct_s6_info*)0x0141F570;

	int result;
	char title[256];
	char filename[MAX_PATH];
	char filterName[256];


	format_string(title, STR_SAVE_SCENARIO, NULL);
	subsitute_path(filename, RCT2_ADDRESS(RCT2_ADDRESS_SCENARIOS_PATH, char), s6Info->name);
	strcat(filename, ".SC6");
	format_string(filterName, STR_RCT2_SCENARIO_FILE, NULL);

	pause_sounds();
	result = platform_open_common_file_dialog(0, title, filename, "*.SC6", filterName);
	unpause_sounds();

	if (result)
		safe_strncpy(resultPath, filename, MAX_PATH);
	return result;
}
Exemple #6
0
/**
 *
 *  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();
}