mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-05-16 06:04:07 +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(tactic::on) modecount += 10;
|
||||||
if(randomPatternsMode) modecount += 10;
|
if(randomPatternsMode) modecount += 10;
|
||||||
if(geometry != gNormal) 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)
|
if(vid.xposition || vid.yposition || vid.alpha != 1 || vid.scale != 1)
|
||||||
return true;
|
return true;
|
||||||
if(pmodel != mdDisk || vid.monmode != DEFAULT_MONMODE || vid.wallmode != DEFAULT_WALLMODE)
|
if(pmodel != mdDisk || vid.monmode != DEFAULT_MONMODE || vid.wallmode != DEFAULT_WALLMODE)
|
||||||
return true;
|
return true;
|
||||||
if(firstland != laIce || multi::players != 1 || rug::rugged)
|
if(firstland != laIce || multi::players != 1 || rug::rugged)
|
||||||
return true;
|
return true;
|
||||||
if(modecount > 1)
|
|
||||||
return true;
|
|
||||||
return false;
|
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) {
|
void resetModes(char leave) {
|
||||||
popAllGames();
|
popAllGames();
|
||||||
if(shmup::on != (leave == rg::shmup)) stop_game_and_switch_mode(rg::shmup);
|
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_geometry(gNormal);
|
||||||
set_variation(eVariation::bitruncated);
|
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();
|
start_game();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -697,7 +697,13 @@ void showStartMenu() {
|
|||||||
dialog::addBreak(100);
|
dialog::addBreak(100);
|
||||||
dialog::addBigItem(XLAT1("use current/saved settings"), SDLK_ESCAPE);
|
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::addBreak(100);
|
||||||
dialog::addBigItem(XLAT("main menu"), 'm');
|
dialog::addBigItem(XLAT("main menu"), 'm');
|
||||||
dialog::addInfo(XLAT("more options"));
|
dialog::addInfo(XLAT("more options"));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user