mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-11 18:00:34 +00:00
field pattern on Euclidean does torus instead of crashing
This commit is contained in:
parent
c5324ff2f5
commit
f2af1d63f6
@ -992,6 +992,14 @@ namespace mapeditor {
|
||||
case 'H':
|
||||
return towerval(c);
|
||||
case 'F': {
|
||||
if(euclid) {
|
||||
using namespace torusconfig;
|
||||
eucoord cx, cy;
|
||||
decodeMaster(c->master, cx, cy);
|
||||
int cd = cx * dx + cy * dy;
|
||||
cd %= qty; if(cd<0) cd += qty;
|
||||
return cd;
|
||||
}
|
||||
pair<int, bool> p = fieldpattern::fieldval(c);
|
||||
return 10*p.first + (p.second?6:7);
|
||||
}
|
||||
@ -1023,7 +1031,7 @@ namespace mapeditor {
|
||||
if(drawcell == cwt.c) return vid.cs.charid;
|
||||
if(drawcell->monst) return drawcell->monst;
|
||||
if(drawcell->item) return drawcell->item;
|
||||
return subpattern(drawcell);
|
||||
return subpattern(drawcell) % (USERSHAPEIDS);
|
||||
}
|
||||
|
||||
int subpatternShape(int i) {
|
||||
|
@ -971,7 +971,7 @@ hpcshape
|
||||
|
||||
#define USERLAYERS 32
|
||||
#define USERSHAPEGROUPS 8
|
||||
#define USERSHAPEIDS 256
|
||||
#define USERSHAPEIDS 4096
|
||||
|
||||
struct usershapelayer {
|
||||
vector<hyperpoint> list;
|
||||
|
Loading…
Reference in New Issue
Block a user