From 9d680953e28fdf99b8a6f837f9ad2c1617108f49 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sun, 18 Aug 2024 21:17:50 +0200 Subject: [PATCH] fixed spiral/hilbert tracks --- rogueviz/nilrider/levels.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rogueviz/nilrider/levels.cpp b/rogueviz/nilrider/levels.cpp index 991cac00..7c38b82a 100644 --- a/rogueviz/nilrider/levels.cpp +++ b/rogueviz/nilrider/levels.cpp @@ -613,7 +613,7 @@ struct complex_surface { hyperpoint cur; map, surface_fun> blocks; - static transmatrix flatpush(hyperpoint h) { return rgpushxto0(point31(h[0], h[1], rot_plane(h))); } + static transmatrix flatpush(hyperpoint h) { return rgpushxto0(point31(h[0], h[1], 0)); } static transmatrix hpush(hyperpoint h) { h[1] = 0; h[2] = 0; return flatpush(h); } static transmatrix vpush(hyperpoint h) { h[0] = 0; h[2] = 0; return flatpush(h); } @@ -751,7 +751,7 @@ struct complex_surface { ld get(hyperpoint h) { int ax = int(floor(h[0] / 4)); int ay = int(floor(h[1] / 4)); - if(blocks.count({ax, ay})) return blocks[{ax, ay}] (h); + if(blocks.count({ax, ay})) return blocks[{ax, ay}] (h) + h[0] * h[1] / 2; return 0; }