1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-23 21:07:17 +00:00

improved keyboard control in orthogonal projection of the sphere

This commit is contained in:
Zeno Rogue 2018-07-23 16:07:27 +02:00
parent 3c6e3008eb
commit e601533a37
3 changed files with 5 additions and 4 deletions

View File

@ -58,7 +58,7 @@ movedir vectodir(const hyperpoint& P) {
transmatrix U = shmup::ggmatrix(cwt.c);
hyperpoint H = sphereflip * tC0(U);
transmatrix Centered = rgpushxto0(H) * sphereflip;
transmatrix Centered = sphereflip * rgpushxto0(H);
ld binv = 99;
@ -82,7 +82,7 @@ movedir vectodir(const hyperpoint& P) {
res.subdir = dirdist[(i+1)%cwt.c->type] < dirdist[(i+cwt.c->type-1)%cwt.c->type] ? 1 : -1;
}
}
// if(euclid) bdir = (bdir + 3) % 6;
return res;
}

View File

@ -2563,12 +2563,12 @@ void drawMovementArrows(cell *c, transmatrix V) {
int u = md.d;
cellwalker xc = cwt + u + wstep;
if(xc.c == c) {
transmatrix fixrot = rgpushxto0(tC0(V));
transmatrix fixrot = sphereflip * rgpushxto0(sphereflip * tC0(V));
// make it more transparent
int col = getcs().uicolor;
col -= (col & 0xFF) >> 1;
poly_outline = OUTLINE_DEFAULT;
queuepoly(fixrot * spin(-d * M_PI/4 + (sphereflipped()?M_PI:0))/* * eupush(1,0)*/, shArrow, col);
queuepoly(fixrot * spin(-d * M_PI/4), shArrow, col);
if((c->type & 1) && (isStunnable(c->monst) || c->wall == waThumperOn)) {
transmatrix Centered = rgpushxto0(tC0(cwtV));

View File

@ -422,4 +422,5 @@ void playSound(cell*, const string &s, int vol) { printf("play sound: %s vol %d\
#endif
#endif
}