1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-23 13:07:16 +00:00

nilrider:: gen_layer_list

This commit is contained in:
Zeno Rogue 2024-08-19 12:23:25 +02:00
parent bc2681fb1b
commit b0856d3d0f

View File

@ -207,6 +207,14 @@ struct level {
char mapchar(xy_int p);
char mapchar(xy_float p) { return mapchar(pfloor(p)); }
char mapchar(hyperpoint h) { return mapchar(pfloor(get_xy_f(h))); }
void gen_layer_list(vector<level*>& all) {
all.push_back(this); for(auto s: sublevels) s->gen_layer_list(all);
}
vector<level*> gen_layer_list() {
vector<level*> res; gen_layer_list(res); return res;
}
};
/** wheel radius */