mirror of https://github.com/OpenRCT2/OpenRCT2.git
don't show confirmation prompt for loading on title screen, fixes #145
This commit is contained in:
parent
c07edd0d10
commit
fafc8083ac
|
@ -286,7 +286,7 @@ enum {
|
||||||
} WINDOW_CLASS;
|
} WINDOW_CLASS;
|
||||||
|
|
||||||
enum PROMPT_MODE {
|
enum PROMPT_MODE {
|
||||||
PM_SAVE_BEFORE_LOAD,
|
PM_SAVE_BEFORE_LOAD = 0,
|
||||||
PM_SAVE_BEFORE_QUIT,
|
PM_SAVE_BEFORE_QUIT,
|
||||||
PM_SAVE_BEFORE_QUIT2,
|
PM_SAVE_BEFORE_QUIT2,
|
||||||
PM_QUIT
|
PM_QUIT
|
||||||
|
|
|
@ -117,6 +117,12 @@ void window_save_prompt_open()
|
||||||
|
|
||||||
prompt_mode = RCT2_GLOBAL(RCT2_ADDRESS_SAVE_PROMPT_MODE, uint16);
|
prompt_mode = RCT2_GLOBAL(RCT2_ADDRESS_SAVE_PROMPT_MODE, uint16);
|
||||||
|
|
||||||
|
// do not show save prompt if we're in the title demo and click on load game
|
||||||
|
if (prompt_mode != PM_QUIT && RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TITLE_DEMO) {
|
||||||
|
game_load_or_quit_no_save_prompt();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Check if window is already open
|
// Check if window is already open
|
||||||
window = window_bring_to_front_by_id(WC_SAVE_PROMPT, 0);
|
window = window_bring_to_front_by_id(WC_SAVE_PROMPT, 0);
|
||||||
if (window == NULL) {
|
if (window == NULL) {
|
||||||
|
@ -146,14 +152,13 @@ void window_save_prompt_open()
|
||||||
y,
|
y,
|
||||||
(uint32*)window_save_prompt_events,
|
(uint32*)window_save_prompt_events,
|
||||||
WC_SAVE_PROMPT,
|
WC_SAVE_PROMPT,
|
||||||
0
|
WF_TRANSPARENT | WF_STICK_TO_FRONT
|
||||||
);
|
);
|
||||||
|
|
||||||
window->widgets = widgets;
|
window->widgets = widgets;
|
||||||
window->enabled_widgets = enabled_widgets;
|
window->enabled_widgets = enabled_widgets;
|
||||||
window_init_scroll_widgets(window);
|
window_init_scroll_widgets(window);
|
||||||
window->colours[0] = 154;
|
window->colours[0] = 154;
|
||||||
window->flags |= WF_TRANSPARENT;
|
|
||||||
|
|
||||||
// Pause the game
|
// Pause the game
|
||||||
RCT2_GLOBAL(0x009DEA6E, uint8) |= 2;
|
RCT2_GLOBAL(0x009DEA6E, uint8) |= 2;
|
||||||
|
@ -170,6 +175,12 @@ void window_save_prompt_open()
|
||||||
window_save_prompt_widgets[WIDX_LABEL].image = prompt_mode + STR_SAVE_BEFORE_LOADING;
|
window_save_prompt_widgets[WIDX_LABEL].image = prompt_mode + STR_SAVE_BEFORE_LOADING;
|
||||||
|
|
||||||
if (!gGeneral_config.confirmation_prompt) {
|
if (!gGeneral_config.confirmation_prompt) {
|
||||||
|
/* game_load_or_quit_no_save_prompt() will exec requested task and close this window
|
||||||
|
* immediately again.
|
||||||
|
* TODO restructure these functions when we're sure game_load_or_quit_no_save_prompt()
|
||||||
|
* and game_load_or_quit() are not called by the original binary anymore.
|
||||||
|
*/
|
||||||
|
|
||||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & 0x0D) {
|
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & 0x0D) {
|
||||||
game_load_or_quit_no_save_prompt();
|
game_load_or_quit_no_save_prompt();
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue