diff --git a/complex.cpp b/complex.cpp index df414bb0..c335312a 100644 --- a/complex.cpp +++ b/complex.cpp @@ -2606,11 +2606,11 @@ namespace sword { cell *pos(cell *c, int s) { int t = c->type; s *= 2; - s += S42/t; - s %= S84; - if(s<0) s += S84; + s += sword_angles/t; + s %= (2 * sword_angles); + if(s<0) s += sword_angles * 2; s *= t; - s /= S84; + s /= (sword_angles * 2); return c->move(s); } @@ -2619,7 +2619,7 @@ namespace sword { cell *pos(int id, bool rev) { if(!orbcount(rev)) return NULL; - return pos(playerpos(id), angle[id] + (rev ? S21 : 0)); + return pos(playerpos(id), angle[id] + (rev ? sword_angles/2 : 0)); } bool at(cell *where, bool noplayer) { @@ -2643,13 +2643,13 @@ namespace sword { int s2 = neighborId(c2, c1); if(s1 < 0 || s2 < 0) return angle; if(c1->c.mirror(s1)) - return ((s2*S42/c2->type - angle + s1*S42/c1->type) + S21) % S42; + return ((s2*sword_angles/c2->type - angle + s1*sword_angles/c1->type) + sword_angles/2) % sword_angles; else - return ((s2*S42/c2->type - s1*S42/c1->type) + S21 + angle) % S42; + return ((s2*sword_angles/c2->type - s1*sword_angles/c1->type) + sword_angles/2 + angle) % sword_angles; } void shuffle(int i) { - sword::angle[i] = euclid ? S7*hrand(6) : PURE ? 3*hrand(S14)+1 : hrand(S42); + sword::angle[i] = euclid ? S7*hrand(6) : PURE ? 3*hrand(sword_angles/3)+1 : hrand(sword_angles); } void reset() { diff --git a/game.cpp b/game.cpp index 323bb67d..08a8b6dd 100644 --- a/game.cpp +++ b/game.cpp @@ -5256,8 +5256,8 @@ void sideAttack(cell *mf, int dir, eMonster who, int bonuskill) { template void do_swords(cell *mf, cell *mt, eMonster who, const T& f) { for(int bb=0; bb<2; bb++) if(who == moPlayer && sword::orbcount(bb)) { - cell *sf = sword::pos(mf, sword::angle[multi::cpid] + (bb?S21:0)); - cell *st = sword::pos(mt, sword::shift(mf, mt, sword::angle[multi::cpid]) + (bb?S21:0)); + cell *sf = sword::pos(mf, sword::angle[multi::cpid] + (bb?sword_angles/2:0)); + cell *st = sword::pos(mt, sword::shift(mf, mt, sword::angle[multi::cpid]) + (bb?sword_angles/2:0)); f(st, bb); if(sf != st && !isNeighbor(sf,st)) { // also attack the in-transit cell diff --git a/graph.cpp b/graph.cpp index cf5a86e1..26c8af2a 100644 --- a/graph.cpp +++ b/graph.cpp @@ -336,30 +336,30 @@ void drawPlayerEffects(const transmatrix& V, cell *c, bool onplayer) { else { int& ang = angle[multi::cpid]; - ang %= S42; + ang %= sword_angles; #if CAP_QUEUE || CAP_SHAPES transmatrix Vnow = gmatrix[c] * rgpushxto0(inverse(gmatrix[c]) * tC0(V)) * ddspin(c,0,M_PI); // (IRREGULAR ? ddspin(c,0,M_PI) : spin(-hexshiftat(c))); #endif #if CAP_QUEUE - if(!euclid) for(int a=0; a