1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-23 01:47:39 +00:00

more elegant cellwalkers

This commit is contained in:
Zeno Rogue
2018-03-24 12:59:01 +01:00
parent 2c09c5ee56
commit ac37b6df99
20 changed files with 371 additions and 467 deletions

View File

@@ -602,9 +602,7 @@ void buildRug() {
rugpoint *w2 = vptr.at(c3);
if(a4) {
cellwalker cw(c, j);
cwstep(cw); cwspin(cw, -1); cwstep(cw);
cell *c4 = cw.c;
cell *c4 = (cellwalker(c,j) + wstep - 1 + wstep).c;
cell *cm = c; comp(cm, c); comp(cm, c2); comp(cm, c3); comp(cm, c4);
if(cm == c || cm == c4)
addTriangle(v, w, w2);