mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-25 17:40:36 +00:00
rogueviz:: improved the visualization of edges in quotient geometries
This commit is contained in:
parent
6e1983baa9
commit
2efbccd334
15
rogueviz.cpp
15
rogueviz.cpp
@ -1060,7 +1060,7 @@ void drawVertex(const transmatrix &V, cell *c, shmup::monster *m) {
|
|||||||
|
|
||||||
if(hilite) ghilite = true;
|
if(hilite) ghilite = true;
|
||||||
|
|
||||||
if(ei->lastdraw < frameid) {
|
if(ei->lastdraw < frameid || quotient) {
|
||||||
ei->lastdraw = frameid;
|
ei->lastdraw = frameid;
|
||||||
|
|
||||||
int xlalpha = (hilite || hiliteclick) ? 64 : 20;
|
int xlalpha = (hilite || hiliteclick) ? 64 : 20;
|
||||||
@ -1072,9 +1072,12 @@ void drawVertex(const transmatrix &V, cell *c, shmup::monster *m) {
|
|||||||
else xlalpha = int(pow(ld(.5), ggamma) * 255);
|
else xlalpha = int(pow(ld(.5), ggamma) * 255);
|
||||||
|
|
||||||
if(svg::in && xlalpha < 16) continue;
|
if(svg::in && xlalpha < 16) continue;
|
||||||
|
if(quotient && &vd != &vd1) continue;
|
||||||
|
|
||||||
transmatrix& gm1 = shmup::ggmatrix(vd1.m->base);
|
transmatrix gm1 = V; // shmup::ggmatrix(vd1.m->base);
|
||||||
transmatrix& gm2 = shmup::ggmatrix(vd2.m->base);
|
transmatrix gm2 =
|
||||||
|
quotient ? V * shmup::calc_relative_matrix(vd2.m->base, c, NOHINT) :
|
||||||
|
shmup::ggmatrix(vd2.m->base);
|
||||||
|
|
||||||
hyperpoint h1 = gm1 * vd1.m->at * C0;
|
hyperpoint h1 = gm1 * vd1.m->at * C0;
|
||||||
hyperpoint h2 = gm2 * vd2.m->at * C0;
|
hyperpoint h2 = gm2 * vd2.m->at * C0;
|
||||||
@ -1112,9 +1115,9 @@ void drawVertex(const transmatrix &V, cell *c, shmup::monster *m) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
if(ei->orig && ei->orig->cpdist >= 3) ei->orig = NULL;
|
if(!quotient && ei->orig && ei->orig->cpdist >= 3) ei->orig = NULL;
|
||||||
if(!ei->orig) {
|
if(!ei->orig) {
|
||||||
ei->orig = euclid ? cwt.c : viewctr.h->c7; // cwt.c;
|
ei->orig = quotient ? c : euclid ? cwt.c : viewctr.h->c7; // cwt.c;
|
||||||
ei->prec.clear();
|
ei->prec.clear();
|
||||||
|
|
||||||
transmatrix T = inverse(shmup::ggmatrix(ei->orig));
|
transmatrix T = inverse(shmup::ggmatrix(ei->orig));
|
||||||
@ -1133,7 +1136,7 @@ void drawVertex(const transmatrix &V, cell *c, shmup::monster *m) {
|
|||||||
else
|
else
|
||||||
storeline(ei->prec, T*h1, T*h2);
|
storeline(ei->prec, T*h1, T*h2);
|
||||||
}
|
}
|
||||||
queuetable(shmup::ggmatrix(ei->orig), ei->prec, isize(ei->prec), col, 0,
|
queuetable(quotient ? V : shmup::ggmatrix(ei->orig), ei->prec, isize(ei->prec), col, 0,
|
||||||
PPR_STRUCT0);
|
PPR_STRUCT0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user