1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-11-07 01:03:00 +00:00

moved ray_iadj from hybrid to hrmap method

This commit is contained in:
Zeno Rogue
2021-07-09 19:33:01 +02:00
parent 7da49c9d2f
commit 0aa1d45287
4 changed files with 68 additions and 58 deletions

View File

@@ -68,6 +68,13 @@ struct hrmap {
virtual hyperpoint get_corner(cell *c, int cid, ld cf=3) { return C0; }
virtual transmatrix master_relative(cell *c, bool get_inverse = false) { return Id; }
virtual int wall_offset(cell *c);
virtual transmatrix ray_iadj(cell *c, int i) {
if(WDIM == 2) {
return to_other_side(get_corner(c, i), get_corner(c, (i+1)));
}
return currentmap->iadj(c, i);
}
};
/** hrmaps which are based on regular non-Euclidean 2D tilings, possibly quotient