gp:: in saved config

This commit is contained in:
Zeno Rogue 2018-04-11 00:53:05 +02:00
parent 8dcaed3aaf
commit f459607a90
2 changed files with 6 additions and 1 deletions

View File

@ -251,6 +251,10 @@ void initConfig() {
addsaver(vid.euclid_to_sphere, "euclid to sphere projection", 1.5);
addsaver(vid.twopoint_param, "twopoint parameter", 1);
addsaver(gp::on, "goldberg", false);
addsaver(gp::param.first, "goldberg-x", gp::param.first);
addsaver(gp::param.second, "goldberg-y", gp::param.second);
#if CAP_SHMUP
shmup::initConfig();
#endif
@ -301,6 +305,7 @@ void resetModes(char leave) {
if(shmup::on != (leave == rg::shmup)) restartGame(rg::shmup);
if(inv::on != (leave == rg::inv)) restartGame(rg::inv);
if(chaosmode != (leave == rg::chaos)) restartGame(rg::chaos);
if(gp::on != (leave == rg::gp)) restartGame(rg::gp);
if(nonbitrunc != (leave == rg::bitrunc)) restartGame(rg::bitrunc);
if(peace::on != (leave == rg::peace)) restartGame(rg::peace);
#if CAP_TOUR

View File

@ -1118,7 +1118,7 @@ void restartGame(char switchWhat, bool push, bool keep_screens) {
if(switchWhat == rg::bitrunc || switchWhat == rg::gp) {
if(euclid6) geometry = gNormal;
nonbitrunc = !nonbitrunc;
gp::on = (switchWhat == rg::gp);
gp::on = (switchWhat == rg::gp && !gp::on);
resetGeometry();
#if CAP_TEXTURE
if(texture::config.tstate == texture::tsActive)