1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-11-14 12:47:10 +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

@@ -2029,8 +2029,8 @@ bool drawMonster(const transmatrix& Vparam, int ct, cell *c, int col) {
multi::cpid = m.first;
auto cw = m.second;
if(d&1) cwmirrorat(cw, xdir);
if(d>=2) cwspin(cw, 2);
if(d>=4) cwspin(cw, 2);
if(d>=2) cw += 2;
if(d>=4) cw += 2;
transmatrix Vs = Vparam;
bool mirr = cw.mirrored;
Vs = Vs * ddspin(c, cw.spin-cwt.spin, euclid ? 0 : S42);
@@ -2538,7 +2538,7 @@ void drawMovementArrows(cell *c, transmatrix V) {
movedir md = vectodir(spin(-d * M_PI/4) * tC0(pushone()));
int u = md.d;
cellwalker xc = cwt; cwspin(xc, u); cwstep(xc);
cellwalker xc = cwt + u + wstep;
if(xc.c == c) {
transmatrix fixrot = rgpushxto0(tC0(V));
// make it more transparent