From b74ca7b4c8ec5c2b1fd5d31fe75c4d7d78375e62 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Tue, 27 Mar 2018 14:08:56 +0200 Subject: [PATCH] immediate overgeneration --- config.cpp | 4 +++- dialogs.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/config.cpp b/config.cpp index 1efb411a..2c582add 100644 --- a/config.cpp +++ b/config.cpp @@ -742,11 +742,13 @@ void showGraphConfig() { XLAT("movement animation speed"), XLAT("+5 = move instantly")); - if(xuni == 'r') + if(xuni == 'r') { dialog::editNumber(sightrange, 4, allowIncreasedSight() ? 10 : 7, 1, 7, XLAT("sight range"), XLAT("Roughly 42% cells are on the edge of your sight range. Reducing " "the sight range makes HyperRogue work faster, but also makes " "the game effectively harder.")); + dialog::reaction = [] () { if(overgenerate) doOvergenerate(); }; + } if(xuni == 'k') { glyphsortorder = eGlyphsortorder((glyphsortorder+6+(shiftmul>0?1:-1)) % gsoMAX); diff --git a/dialogs.cpp b/dialogs.cpp index 13bc28c5..c1557471 100644 --- a/dialogs.cpp +++ b/dialogs.cpp @@ -760,8 +760,10 @@ namespace dialog { conformal::do_rotate = 1; else if(uni == 'd' && ne.editwhat == &conformal::rotation) conformal::do_rotate = 2; - else if(uni == 'o' && ne.editwhat == &ne.intbuf && ne.intval == &sightrange && cheater) + else if(uni == 'o' && ne.editwhat == &ne.intbuf && ne.intval == &sightrange && cheater) { overgenerate = !overgenerate; + if(overgenerate) doOvergenerate(); + } else if(uni == 'o' && ne.editwhat == &vid.linewidth) vid.antialias ^= AA_LINEWIDTH; else if(uni == 'p' && ne.editwhat == &vid.alpha) {