1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-11-09 18:23:00 +00:00

rogueviz::embeddings:: mark_signposts_subg

This commit is contained in:
Zeno Rogue
2021-07-21 10:51:06 +02:00
parent 8b3ea9031a
commit cc18251160
2 changed files with 26 additions and 0 deletions

View File

@@ -113,6 +113,25 @@ void mark_signposts(bool full, const vector<cell*>& ac) {
signposts.push_back(c);
}
/** special signposts */
void mark_signposts_subg(int a, int b, const vector<cell*>& ac) {
etype = eSignpost;
println(hlog, "marking bitrunc signposts");
signposts.clear();
int maxd = 0;
if(!bounded)
for(cell *c: ac) maxd = max(celldist(c), maxd);
for(cell *c: ac) {
auto li = gp::get_local_info(c);
auto rel = li.relative * gp::loc(a, b);
auto rel2 = rel * gp::param.conj();
rel2 = rel2 / (gp::param * gp::param.conj()).first;
if(rel2 * gp::param == rel)
signposts.push_back(c);
}
}
/** rug embedding */
map<cell*, hyperpoint> rug_coordinates;