1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-26 19: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

@@ -857,16 +857,18 @@ namespace hr { namespace gp {
return dmain + length(centerloc-at) - length(centerloc);
}
array<cell*, 3> get_masters(cell *c) {
array<heptagon*, 3> get_masters(cell *c) {
if(gp::on) {
auto li = get_local_info(c);
be_in_triangle(li);
auto cm = c->master;
int i = li.last_dir;
return make_array(cm->c7, createStep(cm, i)->c7, createStep(cm, fix7(i+1))->c7);
return make_array(cm, createStep(cm, i), createStep(cm, fix7(i+1)));
}
else
return make_array(c->mov[0], c->mov[2], c->mov[4]);
else if(irr::on)
return irr::get_masters(c);
else
return make_array(c->mov[0]->master, c->mov[2]->master, c->mov[4]->master);
}
int compute_dist(cell *c, int master_function(cell*)) {