mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-24 09:00:34 +00:00
fixed some references to fp43; preradom patterns no longer crash in Torus
This commit is contained in:
parent
44ea56baf2
commit
35b192405d
14
complex.cpp
14
complex.cpp
@ -2735,15 +2735,15 @@ namespace prairie {
|
||||
}
|
||||
}
|
||||
pair<int,bool> 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)
|
||||
|
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user