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

refactored shvid_full and wall_offset as virtual functions

This commit is contained in:
Zeno Rogue
2021-07-09 10:09:31 +02:00
parent 09850d2f76
commit 9a319e2d2a
12 changed files with 98 additions and 109 deletions

View File

@@ -659,22 +659,23 @@ EX namespace reg3 {
}
void make_subconnections();
int wall_offset(cell *c) override;
int shvid(cell *c) { return local_id[c].second; }
};
struct hrmap_quotient3 : hrmap_closed3 { };
#endif
EX int get_wall_offset(cell *c) {
auto m = (hrmap_closed3*) currentmap;
auto& wo = cgi.walloffsets[ m->local_id[c].second ];
int hrmap_closed3::wall_offset(cell *c) {
auto& wo = cgi.walloffsets[ local_id[c].second ];
if(wo.second == nullptr)
wo.second = c;
return wo.first;
}
EX const vector<hyperpoint>& get_face_vertices(cell *c, int d) {
auto m = (hrmap_closed3*) currentmap;
return cgi.subshapes[m->local_id[c].second].faces_local[d];
return cgi.subshapes[currentmap->shvid(c)].faces_local[d];
}
EX int get_face_vertex_count(cell *c, int d) {