// this cfg defines the shapes of heightfield prefabs, i.e. arches and such // arch of 2xN cubes, i.e. 3 vertices [0..2] // archvertex // vertices not defined have a 0 delta const av [ push vn (+ $arg1 1) if (= (listlen $arg2) $arg1) [ loop i $arg1 [ archvertex $vn (+ $i 1) (at $arg2 $i) ] ][ loop i (div $vn 2) [ archvertex $vn (+ $i 1) (at $arg2 $i) archvertex $vn (- $vn (+ $i 1)) (at $arg2 $i) ] ] pop vn ] av 1 "2" av 2 "4 4" av 3 "5 6 5" av 4 "5 6 6 5" av 5 "5 7 8 7 5" av 6 "5 7 8 8 7 5" av 7 "7 11 13 14 13 11 7" av 8 "7 11 13 14 14 13 11 7" av 9 "7 11 13 14 14 14 13 11 7" av 10 "7 11 13 14 14 14 14 13 11 7" av 11 "8 13 16 18 19 19 19 18 16 13 8" av 12 "8 13 16 18 19 19 19 19 18 16 13 8" av 13 "8 13 16 18 19 19 19 19 19 18 16 13 8" // these last few can be improved av 14 "8 13 16 18 19 19 19 19 19 19 18 16 13 8" av 15 "8 13 16 18 19 19 19 19 19 19 19 18 16 13 8" // add wider arches here! :) const av_measure [ push ii "" selectionwalk [ ii = (concat $ii $sw_vdelta) ] [ if (&& (!= (at $sw_cursel 2) 1) (!= (at $sw_cursel 3) 1)) [ echo "using wide selections may lead to weird measurements..."] ] push offs (at $ii 0) push res "" loop i (listlen $ii) [ if $i [ res = (concat $res (- (at $ii $i) $offs)) ] ] result (pop res offs ii) ]