1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-05-08 08:11:21 +00:00

arcm:: patTree is now able to display underlying trees for arcm

This commit is contained in:
Zeno Rogue
2026-04-18 23:49:45 +02:00
parent e1983f0e5b
commit 4e33b2f333

View File

@@ -2722,7 +2722,7 @@ EX namespace linepatterns {
EX ld tree_starter = 0.25;
EX linepattern patTree = linepattern("underlying tree", 0x00d0d000, [] { return bt::in() || (trees_known() && mod_allowed()); },
EX linepattern patTree = linepattern("underlying tree", 0x00d0d000, [] { return arcm::in() || bt::in() || (trees_known() && mod_allowed()); },
ALLCELLS(
if(is_master(c)) {
int dir = updir(c->master);
@@ -2731,6 +2731,20 @@ EX namespace linepatterns {
hyperpoint start = normalize(C0 + tree_starter * (end - C0));
gridlinef(V, start, V, end, col, 2 + vid.linequality);
}
if(arcm::in() && PURE) for(int i=0; i<c->master->type; i++) {
auto h2 = c->master->move(i);
bool used = false;
for(int j=0; j<h2->type; j++) if(h2->move(j) && arcm::id_of(h2->move(j)) < 2*arcm::current.N && h2->move(j) < c->master) {
used = true;
}
if(used) continue;
int dir = updir(h2);
if(dir == -1) continue;
transmatrix T = currentmap->master_relative(c, true) * currentmap->adj(c->master, i);
hyperpoint end = T * currentmap->adj(h2, dir) * C0;
hyperpoint start = normalize(T * C0 + tree_starter * (end - T * C0));
gridlinef(V, start, V, end, col, 2 + vid.linequality);
}
)
);
linepattern patAltTree("circle/horocycle tree", 0xd000d000, horo_only,