mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-03 04:39:17 +00:00
start menu options no longer reset the graphical options -- there is a separate entry for that
This commit is contained in:
parent
df0578a1fe
commit
06cfd5e2d6
29
config.cpp
29
config.cpp
@ -380,18 +380,35 @@ bool have_current_settings() {
|
||||
if(tactic::on) modecount += 10;
|
||||
if(randomPatternsMode) modecount += 10;
|
||||
if(geometry != gNormal) modecount += 10;
|
||||
|
||||
if(modecount > 1)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool have_current_graph_settings() {
|
||||
if(vid.xposition || vid.yposition || vid.alpha != 1 || vid.scale != 1)
|
||||
return true;
|
||||
if(pmodel != mdDisk || vid.monmode != DEFAULT_MONMODE || vid.wallmode != DEFAULT_WALLMODE)
|
||||
return true;
|
||||
if(firstland != laIce || multi::players != 1 || rug::rugged)
|
||||
return true;
|
||||
if(modecount > 1)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void reset_graph_settings() {
|
||||
pmodel = mdDisk; vid.alpha = 1; vid.scale = 1;
|
||||
vid.xposition = vid.yposition = 0;
|
||||
#if CAP_RUG
|
||||
if(rug::rugged) rug::close();
|
||||
#endif
|
||||
|
||||
vid.monmode = DEFAULT_MONMODE;
|
||||
vid.wallmode = DEFAULT_WALLMODE;
|
||||
}
|
||||
|
||||
void resetModes(char leave) {
|
||||
popAllGames();
|
||||
if(shmup::on != (leave == rg::shmup)) stop_game_and_switch_mode(rg::shmup);
|
||||
@ -416,14 +433,6 @@ void resetModes(char leave) {
|
||||
set_geometry(gNormal);
|
||||
set_variation(eVariation::bitruncated);
|
||||
|
||||
pmodel = mdDisk; vid.alpha = 1; vid.scale = 1;
|
||||
vid.xposition = vid.yposition = 0;
|
||||
#if CAP_RUG
|
||||
if(rug::rugged) rug::close();
|
||||
#endif
|
||||
|
||||
vid.monmode = DEFAULT_MONMODE;
|
||||
vid.wallmode = DEFAULT_WALLMODE;
|
||||
start_game();
|
||||
}
|
||||
|
||||
|
@ -697,7 +697,13 @@ void showStartMenu() {
|
||||
dialog::addBreak(100);
|
||||
dialog::addBigItem(XLAT1("use current/saved settings"), SDLK_ESCAPE);
|
||||
}
|
||||
|
||||
|
||||
if(have_current_graph_settings()) {
|
||||
dialog::addBreak(100);
|
||||
dialog::addBigItem(XLAT1("reset the graphics settings"), 'r');
|
||||
dialog::add_action([] () { reset_graph_settings(); });
|
||||
}
|
||||
|
||||
dialog::addBreak(100);
|
||||
dialog::addBigItem(XLAT("main menu"), 'm');
|
||||
dialog::addInfo(XLAT("more options"));
|
||||
|
Loading…
Reference in New Issue
Block a user