Пример #1
0
/**
 *
 *  rct2: 0x0066DDF2
 */
static void window_save_prompt_mouseup(rct_window *w, sint32 widgetIndex)
{
	if (gScreenFlags & (SCREEN_FLAGS_TITLE_DEMO | SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)) {
		switch (widgetIndex) {
		case WQIDX_OK:
			game_load_or_quit_no_save_prompt();
			break;
		case WQIDX_CLOSE:
		case WQIDX_CANCEL:
			window_close(w);
			break;
		}
		return;
	} else {
		switch (widgetIndex) {
		case WIDX_SAVE:
			if (gScreenFlags & (SCREEN_FLAGS_EDITOR)) {
				window_loadsave_open(LOADSAVETYPE_SAVE | LOADSAVETYPE_LANDSCAPE, gS6Info.name);
			} else {
				save_game_as();
			}
			window_close(w);
			gLoadSaveCallback = window_save_prompt_callback;
			break;
		case WIDX_DONT_SAVE:
			game_load_or_quit_no_save_prompt();
			return;
		case WIDX_CLOSE:
		case WIDX_CANCEL:
			window_close(w);
			return;
		}
	}
}
Пример #2
0
/**
 *
 *  rct2: 0x0066DDF2
 */
static void window_save_prompt_mouseup(rct_window *w, int widgetIndex)
{
	if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & (SCREEN_FLAGS_TITLE_DEMO | SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)) {
		switch (widgetIndex) {
		case WQIDX_OK:
			game_load_or_quit_no_save_prompt();
			break;
		case WQIDX_CLOSE:
		case WQIDX_CANCEL:
			window_close(w);
			break;
		}
		return;
	} else {
		switch (widgetIndex) {
		case WIDX_SAVE:
			save_game_as();
			window_close(w);
			gLoadSaveCallback = window_save_prompt_callback;
			break;
		case WIDX_DONT_SAVE:
			game_load_or_quit_no_save_prompt();
			return;
		case WIDX_CLOSE:
		case WIDX_CANCEL:
			window_close(w);
			return;
		}
	}

	if (RCT2_GLOBAL(RCT2_ADDRESS_ON_TUTORIAL, uint8) != 0) {
		if (RCT2_GLOBAL(RCT2_ADDRESS_ON_TUTORIAL, uint8) != 1) {
			RCT2_CALLPROC_EBPSAFE(0x0066EE54);
			game_load_or_quit_no_save_prompt();
			return;
		} else {
			tutorial_stop();
			game_load_or_quit_no_save_prompt();
			return;
		}
	}
}