mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-11 18:00:34 +00:00
fixed some compiler errors
This commit is contained in:
parent
4255abaaa8
commit
a3d4bfdd7d
26
classes.cpp
26
classes.cpp
@ -1605,18 +1605,18 @@ vector<eLand> randlands = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
geometryinfo ginf[gGUARD] = {
|
geometryinfo ginf[gGUARD] = {
|
||||||
{"standard", "HR", 7, 3, 0, 0, {7, 5}},
|
{"standard", "HR", 7, 3, 0, 0, {{7, 5}}},
|
||||||
{"Euclidean", "euclid", 6, 3, 0, 1, {7, FORBIDDEN}},
|
{"Euclidean", "euclid", 6, 3, 0, 1, {{7, FORBIDDEN}}},
|
||||||
{"spherical", "sphere", 5, 3, 0, 2, {SEE_ALL, SEE_ALL}},
|
{"spherical", "sphere", 5, 3, 0, 2, {{SEE_ALL, SEE_ALL}}},
|
||||||
{"elliptic", "elliptic", 5, 3, qELLIP, 2, {SEE_ALL, SEE_ALL}},
|
{"elliptic", "elliptic", 5, 3, qELLIP, 2, {{SEE_ALL, SEE_ALL}}},
|
||||||
{"Zebra quotient", "Zebra", 7, 3, qZEBRA, 0, {7, 5}},
|
{"Zebra quotient", "Zebra", 7, 3, qZEBRA, 0, {{7, 5}}},
|
||||||
{"field quotient", "field", 7, 3, qFIELD, 0, {7, 5}},
|
{"field quotient", "field", 7, 3, qFIELD, 0, {{7, 5}}},
|
||||||
{"torus", "torus", 6, 3, qTORUS, 1, {7, FORBIDDEN}},
|
{"torus", "torus", 6, 3, qTORUS, 1, {{7, FORBIDDEN}}},
|
||||||
{"octagons", "oct", 8, 3, 0, 0, {6, 4}},
|
{"octagons", "oct", 8, 3, 0, 0, {{6, 4}}},
|
||||||
{"four pentagons", "4x5", 5, 4, 0, 0, {6, 4}},
|
{"four pentagons", "4x5", 5, 4, 0, 0, {{6, 4}}},
|
||||||
{"four hexagons", "4x6", 6, 4, 0, 0, {5, 3}},
|
{"four hexagons", "4x6", 6, 4, 0, 0, {{5, 3}}},
|
||||||
{"four heptagons", "4x7", 7, 4, 0, 0, {4, 3}},
|
{"four heptagons", "4x7", 7, 4, 0, 0, {{4, 3}}},
|
||||||
{"cube", "3x4", 4, 3, 0, 2, {SEE_ALL, SEE_ALL}},
|
{"cube", "3x4", 4, 3, 0, 2, {{SEE_ALL, SEE_ALL}}},
|
||||||
{"tetrahedron (buggy)", "3x3", 3, 3, 0, 2, {SEE_ALL, SEE_ALL}},
|
{"tetrahedron (buggy)", "3x3", 3, 3, 0, 2, {{SEE_ALL, SEE_ALL}}},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
5
rug.cpp
5
rug.cpp
@ -203,7 +203,6 @@ void buildTorusRug() {
|
|||||||
// transmatrix z1 = {{{22,7,0}, {1,-17,0}, {0,0,1}}};
|
// 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 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);
|
transmatrix z2 = inverse(z1);
|
||||||
printf("h1 = %s\n", display(z2 * hyperpoint {22,1,0}));
|
|
||||||
|
|
||||||
auto addToruspoint = [&] (ld x, ld y) {
|
auto addToruspoint = [&] (ld x, ld y) {
|
||||||
auto r = addRugpoint(C0, 0);
|
auto r = addRugpoint(C0, 0);
|
||||||
@ -223,7 +222,7 @@ void buildTorusRug() {
|
|||||||
double beta = -h2[1] * 2 * M_PI;
|
double beta = -h2[1] * 2 * M_PI;
|
||||||
// r->flat = {alpha, beta, 0};
|
// r->flat = {alpha, beta, 0};
|
||||||
double sc = (factor+1)/4;
|
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;
|
r->valid = true;
|
||||||
return r;
|
return r;
|
||||||
};
|
};
|
||||||
@ -771,7 +770,7 @@ hyperpoint gethyper(ld x, ld y) {
|
|||||||
double my = (1-(y*2 / vid.yres)) * yview;
|
double my = (1-(y*2 / vid.yres)) * yview;
|
||||||
double bdist = 1e12;
|
double bdist = 1e12;
|
||||||
|
|
||||||
double rx1, ry1;
|
double rx1=0, ry1=0;
|
||||||
|
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user