mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-24 17:10:36 +00:00
nicer handling of WDIM, GDIM, MDIM, sig
This commit is contained in:
parent
89413ae42a
commit
2f954d0538
122
classes.cpp
122
classes.cpp
@ -515,63 +515,75 @@ static const flagtype qsSMALLBF = qsSMALLB | qsFIELD;
|
||||
static const flagtype qsSMALLBE = qsSMALLB | qELLIPTIC;
|
||||
static const flagtype qsBP = qBINARY | qPENROSE;
|
||||
|
||||
geometryinfo1 giEuclid2 = { gcEuclid, 2, 2, 3, {1,1, 0,0 } };
|
||||
geometryinfo1 giHyperb2 = { gcHyperbolic, 2, 2, 3, {1,1,-1,0 } };
|
||||
geometryinfo1 giSphere2 = { gcSphere, 2, 2, 3, {1,1,+1,0 } };
|
||||
|
||||
geometryinfo1 giEuclid3 = { gcEuclid, 3, 3, 4, {1,1, 1,0 } };
|
||||
geometryinfo1 giHyperb3 = { gcHyperbolic, 3, 3, 4, {1,1, 1,-1} };
|
||||
geometryinfo1 giSphere3 = { gcSphere, 3, 3, 4, {1,1, 1,+1} };
|
||||
|
||||
geometryinfo1 giSol = { gcSol, 3, 3, 4, {1,1, 1,0 } };
|
||||
geometryinfo1 giNil = { gcNil, 3, 3, 4, {1,1, 1,0 } };
|
||||
geometryinfo1 giProduct = { /* will be filled in product::configure() */ };
|
||||
|
||||
/** list of available geometries */
|
||||
vector<geometryinfo> ginf = {
|
||||
{"{7,3}", "none", "{7,3} (standard HyperRogue map)", "HR", 7, 3, 0, gcHyperbolic, 0, {{7, 5}}, eVariation::bitruncated},
|
||||
{"{6,3}", "none", "{6,3} (euclidean Hex grid)", "euclid", 6, 3, 0, gcEuclid, 0, {{7, FORBIDDEN}}, eVariation::bitruncated},
|
||||
{"{5,3}", "none", "{5,3} (dodecahedron)", "sphere", 5, 3, qsSMALLB, gcSphere, 0, {{SEE_ALL, SEE_ALL}}, eVariation::bitruncated},
|
||||
{"{5,3}", "elliptic", "elliptic geometry in {5,3}", "elliptic", 5, 3, qsNONORE, gcSphere, 0, {{SEE_ALL, SEE_ALL}}, eVariation::bitruncated},
|
||||
{"{7,3}", "Zebra", "Zebra quotient", "Zebra", 7, 3, qsZEBRA, gcHyperbolic, 0x00400, {{7, 5}}, eVariation::bitruncated},
|
||||
{"{7,3}", "field", "field quotient", "field", 7, 3, qsFIELD, gcHyperbolic, 0x00200, {{7, 5}}, eVariation::bitruncated},
|
||||
{"{6,3}", "torus", "torus/Klein bottle/...", "torus", 6, 3, qsBQ, gcEuclid, 0x00600, {{7, 7}}, eVariation::bitruncated},
|
||||
{"{8,3}", "none", "{8,3} (like standard but with octagons)", "oct", 8, 3, 0, gcHyperbolic, 0x08000, {{6, 4}}, eVariation::bitruncated},
|
||||
{"{5,4}", "none", "{5,4} (four pentagons)", "4x5", 5, 4, 0, gcHyperbolic, 0x08200, {{6, 4}}, eVariation::bitruncated},
|
||||
{"{6,4}", "none", "{6,4} (four hexagons)", "4x6", 6, 4, 0, gcHyperbolic, 0x08400, {{5, 3}}, eVariation::bitruncated},
|
||||
{"{7,4}", "none", "{7,4} (four heptagons)", "4x7", 7, 4, 0, gcHyperbolic, 0x08600, {{4, 3}}, eVariation::bitruncated},
|
||||
{"{4,3}", "none", "{4,3} (cube)", "3x4", 4, 3, qsSMALLB, gcSphere, 0x10000, {{SEE_ALL, SEE_ALL}}, eVariation::bitruncated},
|
||||
{"{3,3}", "none", "{3,3} (tetrahedron)", "3x3", 3, 3, qsSMALLB, gcSphere, 0x10200, {{SEE_ALL, SEE_ALL}}, eVariation::bitruncated},
|
||||
{"{4,4}", "none", "{4,4} (Euclidean square grid)", "4x4", 4, 4, 0, gcEuclid, 0x10400, {{7, 7}}, eVariation::bitruncated},
|
||||
{"{4,3}", "elliptic", "elliptic geometry in {4,3}", "e3x4", 4, 3, qsNONORE, gcSphere, 0x10600, {{SEE_ALL, SEE_ALL}}, eVariation::bitruncated},
|
||||
{"{7,3}", "Klein", "Klein Quartic", "Klein", 7, 3, qsSMALL, gcHyperbolic, 0x18000, {{7, 5}}, eVariation::bitruncated},
|
||||
{"{8,3}", "Bolza", "Bolza Surface", "Bolza", 8, 3, qsDOCKS, gcHyperbolic, 0x18200, {{6, 4}}, eVariation::bitruncated},
|
||||
{"{8,3}", "Bolza2", "Bolza Surface x2", "Bolza2", 8, 3, qsDOCKS, gcHyperbolic, 0x18400, {{6, 4}}, eVariation::bitruncated},
|
||||
{"{7,3}", "minimal", "minimal quotient", "minimal", 7, 3, qsSMALLN, gcHyperbolic, 0x18600, {{7, 5}}, eVariation::bitruncated},
|
||||
{"binary","none", "variant of the binary tiling", "binary", 7, 3, qBINARY, gcHyperbolic, 0x48400, {{7, 5}}, eVariation::pure},
|
||||
{"Arch", "none", "Archimedean", "A", 7, 3, 0, gcHyperbolic, 0, {{7, 5}}, eVariation::pure},
|
||||
{"{7,3}", "Macbeath", "Macbeath Surface", "Macbeath", 7, 3, qsSMALL, gcHyperbolic, 0x20000, {{7, 5}}, eVariation::bitruncated},
|
||||
{"{5,4}", "Bring", "Bring's Surface", "Bring", 5, 4, qsSMALL, gcHyperbolic, 0x20200, {{6, 4}}, eVariation::bitruncated},
|
||||
{"{12,3}","M3", "Schmutz's M(3)", "M3", 12, 3, qsSMALL, gcHyperbolic, 0x20400, {{4, 2}}, eVariation::bitruncated},
|
||||
{"{12,3}","M4", "Schmutz's M(4)", "M4", 12, 3, qsSMALL, gcHyperbolic, 0x20600, {{4, 2}}, eVariation::bitruncated},
|
||||
{"{6,4}", "Crystal", "dimensional crystal", "Crystal", 6, 4, qANYQ, gcHyperbolic, 0x28000, {{5, 3}}, eVariation::pure},
|
||||
{"{3,4}", "none", "{3,4} (octahedron)", "4x3", 3, 4, qsSMALLB, gcSphere, 0x28200, {{SEE_ALL, SEE_ALL}}, eVariation::bitruncated},
|
||||
{"bin{4,4}", "none", "{4,4} on horospheres", "bin44", 9, 3, qBINARY, gcHyperbolic, 0x30000, {{7, 3}}, eVariation::pure},
|
||||
{"{4,3,4}","none", "{4,3,4} cube tiling", "434", 6, 4, 0, gcEuclid, 0x30200, {{7, 5}}, eVariation::pure},
|
||||
{"{5,3,3}","none", "{5,3,3} 120-cell", "533", 12, 3, qsSMALLB, gcSphere, 0x30400, {{SEE_ALL, SEE_ALL}}, eVariation::pure},
|
||||
{"{5,3,3}", "elliptic","{5,3,3} 120-cell (elliptic space)", "e533", 12, 3, qsSMALLBE, gcSphere, 0x30600, {{SEE_ALL, SEE_ALL}}, eVariation::pure},
|
||||
{"rh{4,3,4}","none", "rhombic dodecahedral honeycomb", "rh434", 12, 3, 0, gcEuclid, 0x31000, {{7, 5}}, eVariation::pure},
|
||||
{"2t{4,3,4}","none", "bitruncated cubic honeycomb", "2t434", 14, 3, 0, gcEuclid, 0x31200, {{7, 5}}, eVariation::pure},
|
||||
{"{5,3,4}","none", "{5,3,4} hyperbolic honeycomb", "534", 12, 4, 0, gcHyperbolic, 0x31400, {{7, 2}}, eVariation::pure},
|
||||
{"{4,3,5}","none", "{4,3,5} hyperbolic honeycomb", "435", 6, 5, 0, gcHyperbolic, 0x31600, {{7, 2}}, eVariation::pure},
|
||||
{"{3,3,3}","none", "{3,3,3} 5-cell", "333", 4, 3, qsSMALLB, gcSphere, 0x38000, {{SEE_ALL, SEE_ALL}}, eVariation::pure},
|
||||
{"{3,3,4}","none", "{3,3,4} 16-cell", "334", 4, 4, qsSMALLB, gcSphere, 0x38200, {{SEE_ALL, SEE_ALL}}, eVariation::pure},
|
||||
{"{3,3,4}","elliptic","{3,3,4} 16-cell (elliptic)", "e334", 4, 4, qsSMALLBE, gcSphere, 0x39200, {{SEE_ALL, SEE_ALL}}, eVariation::pure},
|
||||
{"{4,3,3}","none", "{4,3,3} 8-cell", "433", 6, 4, qsSMALLB, gcSphere, 0x38400, {{SEE_ALL, SEE_ALL}}, eVariation::pure},
|
||||
{"{4,3,3}","elliptic","{4,3,3} 8-cell (elliptic)", "e433", 6, 4, qsSMALLBE, gcSphere, 0x39400, {{SEE_ALL, SEE_ALL}}, eVariation::pure},
|
||||
{"{3,4,3}","none", "{3,4,3} 24-cell", "343", 8, 3, qsSMALLB, gcSphere, 0x38600, {{SEE_ALL, SEE_ALL}}, eVariation::pure},
|
||||
{"{3,4,3}","elliptic","{3,4,3} 24-cell (elliptic)", "e343", 8, 3, qsSMALLBE, gcSphere, 0x39600, {{SEE_ALL, SEE_ALL}}, eVariation::pure},
|
||||
{"{3,3,5}","none", "{3,3,5} 600-cell", "335", 4, 3, qsSMALLB, gcSphere, 0x41000, {{SEE_ALL, SEE_ALL}}, eVariation::pure},
|
||||
{"{3,3,5}","elliptic","{3,3,5} 600-cell (elliptic)", "e335", 4, 3, qsSMALLBE, gcSphere, 0x41200, {{SEE_ALL, SEE_ALL}}, eVariation::pure},
|
||||
{"bin{3,6}", "none", "{3,6} on horospheres", "bin36", 8, 3, qBINARY, gcHyperbolic, 0x40000, {{7, 3}}, eVariation::pure},
|
||||
{"bin-rect", "none", "rectangles on horospheres", "bin44/2", 7, 3, qBINARY, gcHyperbolic, 0x40200, {{7, 3}}, eVariation::pure},
|
||||
{"bin{6,3}", "none", "{6,3} on horospheres", "bin63", 14, 3, qBINARY, gcHyperbolic, 0x40400, {{7, 3}}, eVariation::pure},
|
||||
{"{4,3,5}","field", "{4,3,5} field quotient space", "f435", 6, 5, qsSMALLBF, gcHyperbolic, 0x40600, {{SEE_ALL, SEE_ALL}}, eVariation::pure},
|
||||
{"{5,3,4}","field", "{5,3,4} field quotient space", "f435", 12, 4, qsSMALLBF, gcHyperbolic, 0x40800, {{SEE_ALL, SEE_ALL}}, eVariation::pure},
|
||||
{"binary4","none", "standard binary tiling", "binary4", 5, 3, qBINARY, gcHyperbolic, 0x41400, {{7, 5}}, eVariation::pure},
|
||||
{"sol", "none", "Solv geometry", "sol", 8, 3, qBINARY, gcSol, 0x41600, {{7, 5}}, eVariation::pure},
|
||||
{"kd2", "none", "kite-and-dart", "kd2", 4, 3, qPENROSE, gcEuclid, 0x48000, {{7, 7}}, eVariation::pure},
|
||||
{"kd3", "none", "kite-and-dart on horospheres", "kd3", 12, 3, qsBP, gcHyperbolic, 0x48200, {{7, 3}}, eVariation::pure},
|
||||
{"nil", "none", "Nil geometry", "nil", 8, 3, 0, gcNil, 0x48600, {{7, 5}}, eVariation::pure},
|
||||
{"product","none", "product space", "product", 7, 3, 0, gcProduct, 0x48400, {{7, 3}}, eVariation::pure},
|
||||
{"{7,3}", "none", "{7,3} (standard HyperRogue map)", "HR", 7, 3, 0, giHyperb2, 0, {{7, 5}}, eVariation::bitruncated},
|
||||
{"{6,3}", "none", "{6,3} (euclidean Hex grid)", "euclid", 6, 3, 0, giEuclid2, 0, {{7, FORBIDDEN}}, eVariation::bitruncated},
|
||||
{"{5,3}", "none", "{5,3} (dodecahedron)", "sphere", 5, 3, qsSMALLB, giSphere2, 0, {{SEE_ALL, SEE_ALL}}, eVariation::bitruncated},
|
||||
{"{5,3}", "elliptic", "elliptic geometry in {5,3}", "elliptic", 5, 3, qsNONORE, giSphere2, 0, {{SEE_ALL, SEE_ALL}}, eVariation::bitruncated},
|
||||
{"{7,3}", "Zebra", "Zebra quotient", "Zebra", 7, 3, qsZEBRA, giHyperb2, 0x00400, {{7, 5}}, eVariation::bitruncated},
|
||||
{"{7,3}", "field", "field quotient", "field", 7, 3, qsFIELD, giHyperb2, 0x00200, {{7, 5}}, eVariation::bitruncated},
|
||||
{"{6,3}", "torus", "torus/Klein bottle/...", "torus", 6, 3, qsBQ, giEuclid2, 0x00600, {{7, 7}}, eVariation::bitruncated},
|
||||
{"{8,3}", "none", "{8,3} (like standard but with octagons)", "oct", 8, 3, 0, giHyperb2, 0x08000, {{6, 4}}, eVariation::bitruncated},
|
||||
{"{5,4}", "none", "{5,4} (four pentagons)", "4x5", 5, 4, 0, giHyperb2, 0x08200, {{6, 4}}, eVariation::bitruncated},
|
||||
{"{6,4}", "none", "{6,4} (four hexagons)", "4x6", 6, 4, 0, giHyperb2, 0x08400, {{5, 3}}, eVariation::bitruncated},
|
||||
{"{7,4}", "none", "{7,4} (four heptagons)", "4x7", 7, 4, 0, giHyperb2, 0x08600, {{4, 3}}, eVariation::bitruncated},
|
||||
{"{4,3}", "none", "{4,3} (cube)", "3x4", 4, 3, qsSMALLB, giSphere2, 0x10000, {{SEE_ALL, SEE_ALL}}, eVariation::bitruncated},
|
||||
{"{3,3}", "none", "{3,3} (tetrahedron)", "3x3", 3, 3, qsSMALLB, giSphere2, 0x10200, {{SEE_ALL, SEE_ALL}}, eVariation::bitruncated},
|
||||
{"{4,4}", "none", "{4,4} (Euclidean square grid)", "4x4", 4, 4, 0, giEuclid2, 0x10400, {{7, 7}}, eVariation::bitruncated},
|
||||
{"{4,3}", "elliptic", "elliptic geometry in {4,3}", "e3x4", 4, 3, qsNONORE, giSphere2, 0x10600, {{SEE_ALL, SEE_ALL}}, eVariation::bitruncated},
|
||||
{"{7,3}", "Klein", "Klein Quartic", "Klein", 7, 3, qsSMALL, giHyperb2, 0x18000, {{7, 5}}, eVariation::bitruncated},
|
||||
{"{8,3}", "Bolza", "Bolza Surface", "Bolza", 8, 3, qsDOCKS, giHyperb2, 0x18200, {{6, 4}}, eVariation::bitruncated},
|
||||
{"{8,3}", "Bolza2", "Bolza Surface x2", "Bolza2", 8, 3, qsDOCKS, giHyperb2, 0x18400, {{6, 4}}, eVariation::bitruncated},
|
||||
{"{7,3}", "minimal", "minimal quotient", "minimal", 7, 3, qsSMALLN, giHyperb2, 0x18600, {{7, 5}}, eVariation::bitruncated},
|
||||
{"binary","none", "variant of the binary tiling", "binary", 7, 3, qBINARY, giHyperb2, 0x48400, {{7, 5}}, eVariation::pure},
|
||||
{"Arch", "none", "Archimedean", "A", 7, 3, 0, giHyperb2, 0, {{7, 5}}, eVariation::pure},
|
||||
{"{7,3}", "Macbeath", "Macbeath Surface", "Macbeath", 7, 3, qsSMALL, giHyperb2, 0x20000, {{7, 5}}, eVariation::bitruncated},
|
||||
{"{5,4}", "Bring", "Bring's Surface", "Bring", 5, 4, qsSMALL, giHyperb2, 0x20200, {{6, 4}}, eVariation::bitruncated},
|
||||
{"{12,3}","M3", "Schmutz's M(3)", "M3", 12, 3, qsSMALL, giHyperb2, 0x20400, {{4, 2}}, eVariation::bitruncated},
|
||||
{"{12,3}","M4", "Schmutz's M(4)", "M4", 12, 3, qsSMALL, giHyperb2, 0x20600, {{4, 2}}, eVariation::bitruncated},
|
||||
{"{6,4}", "Crystal", "dimensional crystal", "Crystal", 6, 4, qANYQ, giHyperb2, 0x28000, {{5, 3}}, eVariation::pure},
|
||||
{"{3,4}", "none", "{3,4} (octahedron)", "4x3", 3, 4, qsSMALLB, giSphere2, 0x28200, {{SEE_ALL, SEE_ALL}}, eVariation::bitruncated},
|
||||
{"bin{4,4}", "none", "{4,4} on horospheres", "bin44", 9, 3, qBINARY, giHyperb3, 0x30000, {{7, 3}}, eVariation::pure},
|
||||
{"{4,3,4}","none", "{4,3,4} cube tiling", "434", 6, 4, 0, giEuclid3, 0x30200, {{7, 5}}, eVariation::pure},
|
||||
{"{5,3,3}","none", "{5,3,3} 120-cell", "533", 12, 3, qsSMALLB, giSphere3, 0x30400, {{SEE_ALL, SEE_ALL}}, eVariation::pure},
|
||||
{"{5,3,3}", "elliptic","{5,3,3} 120-cell (elliptic space)", "e533", 12, 3, qsSMALLBE, giSphere3, 0x30600, {{SEE_ALL, SEE_ALL}}, eVariation::pure},
|
||||
{"rh{4,3,4}","none", "rhombic dodecahedral honeycomb", "rh434", 12, 3, 0, giEuclid3, 0x31000, {{7, 5}}, eVariation::pure},
|
||||
{"2t{4,3,4}","none", "bitruncated cubic honeycomb", "2t434", 14, 3, 0, giEuclid3, 0x31200, {{7, 5}}, eVariation::pure},
|
||||
{"{5,3,4}","none", "{5,3,4} hyperbolic honeycomb", "534", 12, 4, 0, giHyperb3, 0x31400, {{7, 2}}, eVariation::pure},
|
||||
{"{4,3,5}","none", "{4,3,5} hyperbolic honeycomb", "435", 6, 5, 0, giHyperb3, 0x31600, {{7, 2}}, eVariation::pure},
|
||||
{"{3,3,3}","none", "{3,3,3} 5-cell", "333", 4, 3, qsSMALLB, giSphere3, 0x38000, {{SEE_ALL, SEE_ALL}}, eVariation::pure},
|
||||
{"{3,3,4}","none", "{3,3,4} 16-cell", "334", 4, 4, qsSMALLB, giSphere3, 0x38200, {{SEE_ALL, SEE_ALL}}, eVariation::pure},
|
||||
{"{3,3,4}","elliptic","{3,3,4} 16-cell (elliptic)", "e334", 4, 4, qsSMALLBE, giSphere3, 0x39200, {{SEE_ALL, SEE_ALL}}, eVariation::pure},
|
||||
{"{4,3,3}","none", "{4,3,3} 8-cell", "433", 6, 4, qsSMALLB, giSphere3, 0x38400, {{SEE_ALL, SEE_ALL}}, eVariation::pure},
|
||||
{"{4,3,3}","elliptic","{4,3,3} 8-cell (elliptic)", "e433", 6, 4, qsSMALLBE, giSphere3, 0x39400, {{SEE_ALL, SEE_ALL}}, eVariation::pure},
|
||||
{"{3,4,3}","none", "{3,4,3} 24-cell", "343", 8, 3, qsSMALLB, giSphere3, 0x38600, {{SEE_ALL, SEE_ALL}}, eVariation::pure},
|
||||
{"{3,4,3}","elliptic","{3,4,3} 24-cell (elliptic)", "e343", 8, 3, qsSMALLBE, giSphere3, 0x39600, {{SEE_ALL, SEE_ALL}}, eVariation::pure},
|
||||
{"{3,3,5}","none", "{3,3,5} 600-cell", "335", 4, 3, qsSMALLB, giSphere3, 0x41000, {{SEE_ALL, SEE_ALL}}, eVariation::pure},
|
||||
{"{3,3,5}","elliptic","{3,3,5} 600-cell (elliptic)", "e335", 4, 3, qsSMALLBE, giSphere3, 0x41200, {{SEE_ALL, SEE_ALL}}, eVariation::pure},
|
||||
{"bin{3,6}", "none", "{3,6} on horospheres", "bin36", 8, 3, qBINARY, giHyperb3, 0x40000, {{7, 3}}, eVariation::pure},
|
||||
{"bin-rect", "none", "rectangles on horospheres", "bin44/2", 7, 3, qBINARY, giHyperb3, 0x40200, {{7, 3}}, eVariation::pure},
|
||||
{"bin{6,3}", "none", "{6,3} on horospheres", "bin63", 14, 3, qBINARY, giHyperb3, 0x40400, {{7, 3}}, eVariation::pure},
|
||||
{"{4,3,5}","field", "{4,3,5} field quotient space", "f435", 6, 5, qsSMALLBF, giHyperb3, 0x40600, {{SEE_ALL, SEE_ALL}}, eVariation::pure},
|
||||
{"{5,3,4}","field", "{5,3,4} field quotient space", "f435", 12, 4, qsSMALLBF, giHyperb3, 0x40800, {{SEE_ALL, SEE_ALL}}, eVariation::pure},
|
||||
{"binary4","none", "standard binary tiling", "binary4", 5, 3, qBINARY, giHyperb3, 0x41400, {{7, 5}}, eVariation::pure},
|
||||
{"sol", "none", "Solv geometry", "sol", 8, 3, qBINARY, giSol, 0x41600, {{7, 5}}, eVariation::pure},
|
||||
{"kd2", "none", "kite-and-dart", "kd2", 4, 3, qPENROSE, giEuclid2, 0x48000, {{7, 7}}, eVariation::pure},
|
||||
{"kd3", "none", "kite-and-dart on horospheres", "kd3", 12, 3, qsBP, giHyperb3, 0x48200, {{7, 3}}, eVariation::pure},
|
||||
{"nil", "none", "Nil geometry", "nil", 8, 3, 0, giNil, 0x48600, {{7, 5}}, eVariation::pure},
|
||||
{"product","none", "product space", "product", 7, 3, 0, giProduct, 0x48400, {{7, 3}}, eVariation::pure},
|
||||
};
|
||||
|
||||
// bits: 9, 10, 15, 16, (reserved for later) 17, 18
|
||||
|
16
classes.h
16
classes.h
@ -223,6 +223,20 @@ enum class eVariation { bitruncated, pure, goldberg, irregular, dual };
|
||||
|
||||
typedef flagtype modecode_t;
|
||||
|
||||
/** only the actual geometry */
|
||||
struct geometryinfo1 {
|
||||
/** geometry class */
|
||||
eGeometryClass kind;
|
||||
/** dimension of the gameplay (2 for crystal) */
|
||||
int gameplay_dimension;
|
||||
/** dimension of the graphics, may be greater than gameplay_dimension with vid.always3 on */
|
||||
int graphical_dimension;
|
||||
/** dimension of the homogeneous vector space used, usually graphical_dimension+1, but 3 in product */
|
||||
int homogeneous_dimension;
|
||||
/** signature of the scalar product used */
|
||||
int sig[4];
|
||||
};
|
||||
|
||||
struct geometryinfo {
|
||||
const char* tiling_name;
|
||||
const char* quotient_name;
|
||||
@ -231,7 +245,7 @@ struct geometryinfo {
|
||||
int sides;
|
||||
int vertex;
|
||||
flagtype flags;
|
||||
eGeometryClass cclass;
|
||||
geometryinfo1 g;
|
||||
modecode_t xcode;
|
||||
std::array<int,2> distlimit; // bitrunc, non-bitrunc
|
||||
eVariation default_variation;
|
||||
|
@ -779,6 +779,7 @@ EX void loadConfig() {
|
||||
DEBB(DF_INIT, ("Loaded configuration: %s\n", conffile));
|
||||
}
|
||||
|
||||
geom3::apply_always3();
|
||||
polygonal::solve();
|
||||
check_cgi();
|
||||
cgi.prepare_basics();
|
||||
|
@ -1035,6 +1035,8 @@ EX void make_floor_textures() {
|
||||
dynamicval<eGeometry> g(geometry, gEuclidSquare);
|
||||
dynamicval<eModel> gm(pmodel, mdDisk);
|
||||
dynamicval<eVariation> va(variation, eVariation::pure);
|
||||
dynamicval<geometryinfo1> gie(ginf[geometry].g, giEuclid2);
|
||||
dynamicval<geometryinfo1> gih(ginf[gNormal].g, giHyperb2);
|
||||
dynamicval<bool> a3(vid.always3, false);
|
||||
dynamicval<bool> hq(inHighQual, true);
|
||||
dynamicval<int> hd(darken, 0);
|
||||
|
22
geometry.cpp
22
geometry.cpp
@ -767,11 +767,31 @@ namespace geom3 {
|
||||
}
|
||||
|
||||
EX namespace geom3 {
|
||||
|
||||
EX void apply_always3() {
|
||||
for(geometryinfo& gi: ginf) {
|
||||
auto &g = gi.g;
|
||||
if(vid.always3 && g.gameplay_dimension == 2 && g.graphical_dimension == 2) {
|
||||
g.graphical_dimension++;
|
||||
g.homogeneous_dimension++;
|
||||
g.sig[3] = g.sig[2];
|
||||
g.sig[2] = g.sig[1];
|
||||
}
|
||||
if(!vid.always3 && g.gameplay_dimension == 2 && g.graphical_dimension == 3) {
|
||||
g.graphical_dimension--;
|
||||
g.homogeneous_dimension--;
|
||||
g.sig[1] = g.sig[2];
|
||||
g.sig[2] = g.sig[3];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if MAXMDIM >= 4
|
||||
EX void switch_always3() {
|
||||
if(dual::split(switch_always3)) return;
|
||||
if(rug::rugged) rug::close();
|
||||
vid.always3 = !vid.always3;
|
||||
apply_always3();
|
||||
swapmatrix(View);
|
||||
callhooks(hooks_swapdim);
|
||||
}
|
||||
@ -806,6 +826,7 @@ EX void switch_always3() {
|
||||
View = inverse(models::rotmatrix()) * View;
|
||||
if(!vid.always3) {
|
||||
vid.always3 = true;
|
||||
apply_always3();
|
||||
ld ms = min<ld>(cgi.scalefactor, 1);
|
||||
vid.wall_height = 1.5 * ms;
|
||||
if(sphere) {
|
||||
@ -827,6 +848,7 @@ EX void switch_always3() {
|
||||
}
|
||||
else {
|
||||
vid.always3 = false;
|
||||
apply_always3();
|
||||
vid.wall_height = .3;
|
||||
vid.human_wall_ratio = .7;
|
||||
vid.camera = 1;
|
||||
|
1
hud.cpp
1
hud.cpp
@ -390,6 +390,7 @@ EX void draw_radar(bool cornermode) {
|
||||
dynamicval<eGeometry> g(geometry, gEuclid);
|
||||
dynamicval<eModel> pm(pmodel, mdUnchanged);
|
||||
dynamicval<bool> ga(vid.always3, false);
|
||||
dynamicval<geometryinfo1> gi(ginf[gEuclid].g, giEuclid2);
|
||||
initquickqueue();
|
||||
int rad = vid.radarsize;
|
||||
if(dual::state) rad /= 2;
|
||||
|
11
hyper.h
11
hyper.h
@ -324,14 +324,11 @@ struct videopar {
|
||||
|
||||
extern videopar vid;
|
||||
|
||||
#if MAXMDIM == 3
|
||||
#define WDIM 2
|
||||
#else
|
||||
#define WDIM ((geometry >= gBinary3 && geometry != gBinary4 && geometry != gKiteDart2) ? 3 : 2)
|
||||
#endif
|
||||
#define GDIM (vid.always3 ? 3 : WDIM)
|
||||
#define MDIM (prod ? 3 : GDIM+1)
|
||||
#define WDIM ginf[geometry].g.gameplay_dimension
|
||||
#define GDIM ginf[geometry].g.graphical_dimension
|
||||
#define MDIM ginf[geometry].g.homogeneous_dimension
|
||||
#define LDIM (MDIM-1)
|
||||
#define cclass g.kind
|
||||
|
||||
#define self (*this)
|
||||
|
||||
|
@ -171,7 +171,7 @@ ld inverse_tanh(ld x) { return log((1+x)/(1-x)) / 2; } */
|
||||
|
||||
EX ld squar(ld x) { return x*x; }
|
||||
|
||||
EX int sig(int z) { return prod ? PIU(sig(z)) : (sphere || sol || z<GDIM)?1:-1; }
|
||||
EX int sig(int z) { return ginf[geometry].g.sig[z]; }
|
||||
|
||||
EX int curvature() {
|
||||
switch(cgclass) {
|
||||
|
@ -454,7 +454,7 @@ namespace mapstream {
|
||||
cheater = 1;
|
||||
|
||||
dynamicval<bool> a3(vid.always3, vid.always3);
|
||||
if(f.vernum >= 0xA616) f.read(vid.always3);
|
||||
if(f.vernum >= 0xA616) { f.read(vid.always3); geom3::apply_always3(); }
|
||||
|
||||
if(f.vernum < 0xA61A) load_usershapes(f);
|
||||
|
||||
|
@ -552,6 +552,7 @@ EX namespace product {
|
||||
EX geometry_information *underlying_cgip;
|
||||
|
||||
void configure() {
|
||||
if(vid.always3) { vid.always3 = false; geom3::apply_always3(); }
|
||||
check_cgi();
|
||||
cgi.prepare_basics();
|
||||
underlying = geometry;
|
||||
@ -559,6 +560,8 @@ EX namespace product {
|
||||
geometry = gProduct;
|
||||
ginf[gProduct] = ginf[underlying];
|
||||
ginf[gProduct].cclass = gcProduct;
|
||||
ginf[gProduct].g.gameplay_dimension++;
|
||||
ginf[gProduct].g.graphical_dimension++;
|
||||
}
|
||||
|
||||
EX int current_view_level;
|
||||
|
Loading…
Reference in New Issue
Block a user