1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-04-27 11:01:23 +00:00

added MAXMDIM guards

This commit is contained in:
Zeno Rogue
2020-01-29 18:18:51 +01:00
parent 3500d67af6
commit f05fa60400
6 changed files with 44 additions and 5 deletions

View File

@@ -3603,12 +3603,14 @@ EX bool fat_edges = false;
EX void gridline(const transmatrix& V1, const hyperpoint h1, const transmatrix& V2, const hyperpoint h2, color_t col, int prec) {
ld d = hdist(V1*h1, V2*h2);
#if MAXMDIM >= 4
if(WDIM == 3 && fat_edges) {
transmatrix T = V1 * rgpushxto0(h1);
transmatrix S = rspintox(inverse(T) * V2 * h2);
queuepoly(T * S, cgi.generate_pipe(d, vid.linewidth), col);
return;
}
#endif
while(d > precise_width && d < 100 && grid_depth < 10) {
if(!eqmatrix(V1, V2, 1e-6)) { gridline(V1, h1, V1, inverse(V1) * V2 * h2, col, prec); return; }