mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-10-17 07:07:38 +00:00
draw:: fixed drawing mode on quotient spaces
This commit is contained in:
@@ -216,12 +216,14 @@ EX namespace mapeditor {
|
|||||||
}
|
}
|
||||||
cell *b = centerover;
|
cell *b = centerover;
|
||||||
|
|
||||||
auto xh1 = inverse_shift(ggmatrix(b), h1);
|
shiftmatrix T = rgpushxto0(h1);
|
||||||
virtualRebase(b, xh1);
|
auto T1 = inverse_shift(ggmatrix(b), T);
|
||||||
|
virtualRebase(b, T1);
|
||||||
|
hyperpoint xh1 = tC0(T1);
|
||||||
|
|
||||||
auto l = new dtline;
|
auto l = new dtline;
|
||||||
l->s = xh1;
|
l->s = xh1;
|
||||||
l->e = inverse_shift(ggmatrix(b), h2);
|
l->e = inverse_shift(T*inverse(T1), h2);
|
||||||
dt_add(b, l);
|
dt_add(b, l);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -271,6 +273,7 @@ EX namespace mapeditor {
|
|||||||
|
|
||||||
dtfree *cfree;
|
dtfree *cfree;
|
||||||
cell *cfree_at;
|
cell *cfree_at;
|
||||||
|
shiftmatrix cfree_old;
|
||||||
|
|
||||||
EX void dt_finish() {
|
EX void dt_finish() {
|
||||||
cfree = nullptr;
|
cfree = nullptr;
|
||||||
@@ -284,14 +287,16 @@ EX namespace mapeditor {
|
|||||||
auto T1 = inverse_shift(ggmatrix(b), T);
|
auto T1 = inverse_shift(ggmatrix(b), T);
|
||||||
virtualRebase(b, T1);
|
virtualRebase(b, T1);
|
||||||
|
|
||||||
if(cfree)
|
if(cfree) {
|
||||||
cfree->lh.push_back(inverse_shift(ggmatrix(cfree_at), tC0(T)));
|
cfree->lh.push_back(inverse_shift(cfree_old, tC0(T)));
|
||||||
|
}
|
||||||
|
|
||||||
if(b != cfree_at && !(dtfill && cfree_at)) {
|
if(b != cfree_at && !(dtfill && cfree_at)) {
|
||||||
cfree = new dtfree;
|
cfree = new dtfree;
|
||||||
dt_add(b, cfree);
|
dt_add(b, cfree);
|
||||||
cfree->lh.push_back(tC0(T1));
|
cfree->lh.push_back(tC0(T1));
|
||||||
cfree_at = b;
|
cfree_at = b;
|
||||||
|
cfree_old = T * inverse(T1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user