1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-08-31 17:57:56 +00:00

viewctr is no more... major reduction of redundancy/complexity

This commit is contained in:
Zeno Rogue
2019-11-14 00:26:50 +01:00
parent 74a139ca3e
commit ef9e2236ba
27 changed files with 102 additions and 270 deletions

View File

@@ -970,7 +970,6 @@ void init_textureconfig() {
addsaver(si_save.id, "center type", 1);
addsaver(si_save.dir, "center direction", 0);
addsaver(si_save.reflect, "center reflection", false);
addsaver(viewctr.spin, "center spin", 0);
addsaver(config.data.twidth, "texture resolution", 2048);
addsaver(config.gsplits, "precision", 1);
@@ -1012,7 +1011,7 @@ bool texture_config::save() {
targetgeometry = geometry;
targetvariation = variation;
cell *ctr = viewcenter();
cell *ctr = centerover;
si_save = patterns::getpatterninfo0(ctr);
if(archimedean) csymbol = arcm::current.symbol;
@@ -1071,11 +1070,9 @@ bool texture_config::load() {
celllister cl(currentmap->gamestart(), 20, 10000, NULL);
bool found = false;
for(cell *c: cl.lst) if(euclid || ctof(c)) {
cell *ctr = viewcenter();
auto si_here = patterns::getpatterninfo0(c);
if(si_here.id == si_save.id && si_here.reflect == si_save.reflect && si_here.dir == si_save.dir) {
if(euclid) centerover.at = ctr;
else viewctr.at = ctr->master;
centerover = c;
found = true;
break;
}