1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-12-29 16:39:04 +00:00

created cellshapes for other 3D geometries

This commit is contained in:
Zeno Rogue
2021-07-12 12:23:34 +02:00
parent 8215ac74ee
commit 2215e07fca
9 changed files with 259 additions and 273 deletions

View File

@@ -75,7 +75,10 @@ struct hrmap {
return currentmap->iadj(c, i);
}
virtual subcellshape& get_cellshape(cell *c) { throw hr_exception("get_cellshape called unexpectedly"); }
virtual subcellshape& get_cellshape(cell *c) {
if(cgi.heptshape) return *cgi.heptshape;
throw hr_exception("get_cellshape called unexpectedly");
}
/** \brief in 3D honeycombs, returns a cellwalker res at cw->move(j) such that the face pointed at by cw and res share an edge */
virtual cellwalker strafe(cellwalker cw, int j) { throw hr_exception("strafe called unexpectedly"); }