mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-10-26 19:37:40 +00:00
irregular grids
This commit is contained in:
10
goldberg.cpp
10
goldberg.cpp
@@ -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*)) {
|
||||
|
||||
Reference in New Issue
Block a user