1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-24 17:10:36 +00:00

fixed some compiler errors

This commit is contained in:
Zeno Rogue 2017-11-07 16:16:04 +01:00
parent 4255abaaa8
commit a3d4bfdd7d
2 changed files with 15 additions and 16 deletions

View File

@ -1605,18 +1605,18 @@ vector<eLand> randlands = {
};
geometryinfo ginf[gGUARD] = {
{"standard", "HR", 7, 3, 0, 0, {7, 5}},
{"Euclidean", "euclid", 6, 3, 0, 1, {7, FORBIDDEN}},
{"spherical", "sphere", 5, 3, 0, 2, {SEE_ALL, SEE_ALL}},
{"elliptic", "elliptic", 5, 3, qELLIP, 2, {SEE_ALL, SEE_ALL}},
{"Zebra quotient", "Zebra", 7, 3, qZEBRA, 0, {7, 5}},
{"field quotient", "field", 7, 3, qFIELD, 0, {7, 5}},
{"torus", "torus", 6, 3, qTORUS, 1, {7, FORBIDDEN}},
{"octagons", "oct", 8, 3, 0, 0, {6, 4}},
{"four pentagons", "4x5", 5, 4, 0, 0, {6, 4}},
{"four hexagons", "4x6", 6, 4, 0, 0, {5, 3}},
{"four heptagons", "4x7", 7, 4, 0, 0, {4, 3}},
{"cube", "3x4", 4, 3, 0, 2, {SEE_ALL, SEE_ALL}},
{"tetrahedron (buggy)", "3x3", 3, 3, 0, 2, {SEE_ALL, SEE_ALL}},
{"standard", "HR", 7, 3, 0, 0, {{7, 5}}},
{"Euclidean", "euclid", 6, 3, 0, 1, {{7, FORBIDDEN}}},
{"spherical", "sphere", 5, 3, 0, 2, {{SEE_ALL, SEE_ALL}}},
{"elliptic", "elliptic", 5, 3, qELLIP, 2, {{SEE_ALL, SEE_ALL}}},
{"Zebra quotient", "Zebra", 7, 3, qZEBRA, 0, {{7, 5}}},
{"field quotient", "field", 7, 3, qFIELD, 0, {{7, 5}}},
{"torus", "torus", 6, 3, qTORUS, 1, {{7, FORBIDDEN}}},
{"octagons", "oct", 8, 3, 0, 0, {{6, 4}}},
{"four pentagons", "4x5", 5, 4, 0, 0, {{6, 4}}},
{"four hexagons", "4x6", 6, 4, 0, 0, {{5, 3}}},
{"four heptagons", "4x7", 7, 4, 0, 0, {{4, 3}}},
{"cube", "3x4", 4, 3, 0, 2, {{SEE_ALL, SEE_ALL}}},
{"tetrahedron (buggy)", "3x3", 3, 3, 0, 2, {{SEE_ALL, SEE_ALL}}},
};

View File

@ -203,7 +203,6 @@ void buildTorusRug() {
// transmatrix z1 = {{{22,7,0}, {1,-17,0}, {0,0,1}}};
transmatrix z1 = {{{(ld)solution.first.x,(ld)solution.second.x,0}, {(ld)solution.first.y,(ld)solution.second.y,0}, {0,0,1}}};
transmatrix z2 = inverse(z1);
printf("h1 = %s\n", display(z2 * hyperpoint {22,1,0}));
auto addToruspoint = [&] (ld x, ld y) {
auto r = addRugpoint(C0, 0);
@ -223,7 +222,7 @@ void buildTorusRug() {
double beta = -h2[1] * 2 * M_PI;
// r->flat = {alpha, beta, 0};
double sc = (factor+1)/4;
r->flat = {(factor+cos(alpha)) * cos(beta) * sc, (factor+cos(alpha)) * sin(beta) * sc, -sin(alpha) * sc};
r->flat = hpxyz((factor+cos(alpha)) * cos(beta) * sc, (factor+cos(alpha)) * sin(beta) * sc, -sin(alpha) * sc);
r->valid = true;
return r;
};
@ -771,7 +770,7 @@ hyperpoint gethyper(ld x, ld y) {
double my = (1-(y*2 / vid.yres)) * yview;
double bdist = 1e12;
double rx1, ry1;
double rx1=0, ry1=0;
bool found = false;