diff --git a/complex.cpp b/complex.cpp index 07924344..ee0eab17 100644 --- a/complex.cpp +++ b/complex.cpp @@ -2735,15 +2735,15 @@ namespace prairie { } } pair fv = fieldpattern::fieldval(c); - fv = currfp.gmul(fv, fp43.inverses[c->fval-1]); + fv = currfp.gmul(fv, currfp.inverses[c->fval-1]); - rd = currfp.getdist(fv, fp43.distriver); - int rl = currfp.getdist(fv, fp43.distriverleft); - int rr = currfp.getdist(fv, fp43.distriverright); + rd = currfp.getdist(fv, currfp.distriver); + int rl = currfp.getdist(fv, currfp.distriverleft); + int rr = currfp.getdist(fv, currfp.distriverright); - c->LHU.fi.flowerdist = currfp.getdist(fv, fp43.distflower); - c->LHU.fi.walldist = currfp.getdist(fv, fp43.distwall); - c->LHU.fi.walldist2 = currfp.getdist(fv, fp43.distwall2); + c->LHU.fi.flowerdist = currfp.getdist(fv, currfp.distflower); + c->LHU.fi.walldist = currfp.getdist(fv, currfp.distwall); + c->LHU.fi.walldist2 = currfp.getdist(fv, currfp.distwall2); c->LHU.fi.rval = 0; if(rd <= 7 && rl < rr) diff --git a/mapeditor.cpp b/mapeditor.cpp index 96746750..1d3d5bb5 100644 --- a/mapeditor.cpp +++ b/mapeditor.cpp @@ -1784,29 +1784,29 @@ namespace mapeditor { int canvasback = linf[laCanvas].color >> 2; int generateCanvas(cell *c) { - if(whichCanvas == 'C') { + if(whichCanvas == 'C' && !torus) { using namespace fieldpattern; int z = currfp.getdist(fieldval(c), make_pair(0,false)); if(z < currfp.circrad) return 0x00C000; - int z2 = currfp.getdist(fieldval(c), make_pair(fp43.otherpole,false)); - if(z2 < currfp.disthep[fp43.otherpole] - fp43.circrad) + int z2 = currfp.getdist(fieldval(c), make_pair(currfp.otherpole,false)); + if(z2 < currfp.disthep[currfp.otherpole] - currfp.circrad) return 0x3000; return 0x6000; } - if(whichCanvas == 'D') { + if(whichCanvas == 'D' && !torus) { using namespace fieldpattern; int z = currfp.getdist(fieldval(c), make_pair(0,false)); - return 255 * (currfp.maxdist+1-z) / fp43.maxdist; + return 255 * (currfp.maxdist+1-z) / currfp.maxdist; } - if(whichCanvas == 'N') { + if(whichCanvas == 'N' && !torus) { using namespace fieldpattern; int z = currfp.getdist(fieldval(c), make_pair(0,false)); - int z2 = currfp.getdist(fieldval(c), make_pair(fp43.otherpole,false)); + int z2 = currfp.getdist(fieldval(c), make_pair(currfp.otherpole,false)); if(z < z2) return 0x00C000; if(z > z2) return 0xC00000; return 0xCCCC00; } - if(whichCanvas == 'S') { + if(whichCanvas == 'S' && !torus) { return 0x3F1F0F * fieldpattern::subval(c).second + 0x000080; } if(whichCanvas == 'g')