1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-18 15:37:40 +00:00

irregular grids

This commit is contained in:
Zeno Rogue
2018-07-16 20:05:23 +02:00
parent 4320119d02
commit c8c1e3a346
19 changed files with 829 additions and 84 deletions

View File

@@ -3313,7 +3313,12 @@ void destroyBoats(cell *c) {
}
transmatrix master_relative(cell *c, bool get_inverse) {
if(gp::on) {
if(irr::on) {
int id = irr::cellindex[c];
ld alpha = 2 * M_PI / S7 * irr::periodmap[c->master].base.spin;
return get_inverse ? irr::cells[id].rpusher * spin(-alpha-master_to_c7_angle()): spin(alpha + master_to_c7_angle()) * irr::cells[id].pusher;
}
else if(gp::on) {
if(c == c->master->c7) {
return spin((get_inverse?-1:1) * master_to_c7_angle());
}