1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-09-01 18:27:55 +00:00

added some guards for MAXMDIM >= 4 and CAP_SOLV

This commit is contained in:
Zeno Rogue
2021-03-30 11:27:48 +02:00
parent 1f939920d2
commit 5a73510c4f
22 changed files with 110 additions and 13 deletions

View File

@@ -1160,6 +1160,7 @@ EX void flip_z() {
}
#if CAP_RUG
#if MAXMDIM >= 4
hyperpoint coord_to_flat(ldcoord co, int dim = 3) {
auto& cs = crystal_map()->cs;
hyperpoint res = Hypc;
@@ -1169,6 +1170,7 @@ hyperpoint coord_to_flat(ldcoord co, int dim = 3) {
res[b] += crug_rotation[b][a] * co[a] * rug::modelscale;
return res;
}
#endif
EX void switch_z_coordinate() {
auto& cs = crystal_map()->cs;
@@ -1234,6 +1236,7 @@ void cut_triangle(const hyperpoint pa, const hyperpoint pb, const hyperpoint pc,
cut_triangle2(pb, pc, pa, hb, hc, ha);
}
#if MAXMDIM >= 4
EX void build_rugdata() {
using namespace rug;
rug::clear_model();
@@ -1293,6 +1296,7 @@ EX void build_rugdata() {
println(hlog, "cut ", cut_level, "r ", crug_rotation);
}
#endif
#endif
EX void set_land(cell *c) {
setland(c, specialland);