mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-20 15:40:26 +00:00
pushed unimplemented Product
This commit is contained in:
parent
0054dbc118
commit
c97ab10700
3
cell.cpp
3
cell.cpp
@ -93,6 +93,8 @@ cell *createMov(cell *c, int d) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(c->move(d)) return c->move(d);
|
if(c->move(d)) return c->move(d);
|
||||||
|
PROD( else if(geometry == gProduct)
|
||||||
|
product::find_cell_connection(c, d); )
|
||||||
#if CAP_BT
|
#if CAP_BT
|
||||||
else if(penrose)
|
else if(penrose)
|
||||||
kite::find_cell_connection(c, d);
|
kite::find_cell_connection(c, d);
|
||||||
@ -221,6 +223,7 @@ void initcells() {
|
|||||||
#if CAP_CRYSTAL
|
#if CAP_CRYSTAL
|
||||||
else if(geometry == gCrystal) currentmap = crystal::new_map();
|
else if(geometry == gCrystal) currentmap = crystal::new_map();
|
||||||
#endif
|
#endif
|
||||||
|
PROD( else if(geometry == gProduct) currentmap = product::new_map(); )
|
||||||
#if CAP_ARCM
|
#if CAP_ARCM
|
||||||
else if(archimedean) currentmap = arcm::new_map();
|
else if(archimedean) currentmap = arcm::new_map();
|
||||||
#endif
|
#endif
|
||||||
|
@ -563,6 +563,7 @@ vector<geometryinfo> ginf = {
|
|||||||
{"sol", "none", "Sol", "sol", 8, 3, qBINARY, gcSol, 0x41600, {{7, 5}}, eVariation::pure},
|
{"sol", "none", "Sol", "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},
|
{"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},
|
{"kd3", "none", "kite-and-dart on horospheres", "kd3", 12, 3, qsBP, gcHyperbolic, 0x48200, {{7, 3}}, eVariation::pure},
|
||||||
|
//{"product","none", "product space", "product", 7, 3, 0, gcProduct, 0x48400, {{7, 3}}, eVariation::pure},
|
||||||
};
|
};
|
||||||
|
|
||||||
// bits: 9, 10, 15, 16, (reserved for later) 17, 18
|
// bits: 9, 10, 15, 16, (reserved for later) 17, 18
|
||||||
|
@ -201,10 +201,10 @@ enum eGeometry {
|
|||||||
gHoroTris, gHoroRec, gHoroHex,
|
gHoroTris, gHoroRec, gHoroHex,
|
||||||
gField435, gField534,
|
gField435, gField534,
|
||||||
gBinary4, gSol,
|
gBinary4, gSol,
|
||||||
gKiteDart2, gKiteDart3,
|
gKiteDart2, gKiteDart3, PROD2(gProduct,)
|
||||||
gGUARD};
|
gGUARD};
|
||||||
|
|
||||||
enum eGeometryClass { gcHyperbolic, gcEuclid, gcSphere, gcSol };
|
enum eGeometryClass { gcHyperbolic, gcEuclid, gcSphere, gcSol, PROD(gcProduct) };
|
||||||
|
|
||||||
enum class eVariation { bitruncated, pure, goldberg, irregular, dual };
|
enum class eVariation { bitruncated, pure, goldberg, irregular, dual };
|
||||||
|
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
#include "sphere.cpp"
|
#include "sphere.cpp"
|
||||||
#include "quotient.cpp"
|
#include "quotient.cpp"
|
||||||
#include "crystal.cpp"
|
#include "crystal.cpp"
|
||||||
|
// #include "product.cpp"
|
||||||
#include "reg3.cpp"
|
#include "reg3.cpp"
|
||||||
#include "language.cpp"
|
#include "language.cpp"
|
||||||
#include "cell.cpp"
|
#include "cell.cpp"
|
||||||
|
@ -802,6 +802,10 @@ void showEuclideanMenu() {
|
|||||||
case 3:
|
case 3:
|
||||||
dialog::addSelItem(XLAT("Curvature"), XLAT("Sol"), 0);
|
dialog::addSelItem(XLAT("Curvature"), XLAT("Sol"), 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
PROD( case gcProduct:
|
||||||
|
dialog::addSelItem(XLAT("Curvature"), XLAT("Product"), 0);
|
||||||
|
break; )
|
||||||
}
|
}
|
||||||
|
|
||||||
dialog::display();
|
dialog::display();
|
||||||
|
@ -5006,6 +5006,8 @@ void drawcell_in_radar(cell *c, transmatrix V) {
|
|||||||
|
|
||||||
void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) {
|
void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) {
|
||||||
|
|
||||||
|
PROD( if(product::pmap) { product::drawcell_stack(c, V, spinv, mirrored); return; } )
|
||||||
|
|
||||||
cells_drawn++;
|
cells_drawn++;
|
||||||
|
|
||||||
#if CAP_TEXTURE
|
#if CAP_TEXTURE
|
||||||
|
2
hyper.h
2
hyper.h
@ -328,7 +328,7 @@ extern videopar vid;
|
|||||||
#if MAXMDIM == 3
|
#if MAXMDIM == 3
|
||||||
#define WDIM 2
|
#define WDIM 2
|
||||||
#else
|
#else
|
||||||
#define WDIM ((geometry >= gBinary3 && geometry != gBinary4 && geometry != gKiteDart2) ? 3 : 2)
|
#define WDIM ((geometry >= gBinary3 && geometry != gBinary4 && geometry != gKiteDart2 PROD(&& geometry != gProduct)) ? 3 : 2)
|
||||||
#endif
|
#endif
|
||||||
#define GDIM (vid.always3 ? 3 : WDIM)
|
#define GDIM (vid.always3 ? 3 : WDIM)
|
||||||
#define DIM GDIM
|
#define DIM GDIM
|
||||||
|
@ -1871,6 +1871,8 @@ bool limited_generation(cell *c) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool do_draw(cell *c, const transmatrix& T) {
|
bool do_draw(cell *c, const transmatrix& T) {
|
||||||
|
|
||||||
|
PROD( if(product::pmap) return product::in_actual([&] { return do_draw(product::get_at(c, product::plevel), T); }); )
|
||||||
if(WDIM == 3) {
|
if(WDIM == 3) {
|
||||||
if(cells_drawn > vid.cells_drawn_limit) return false;
|
if(cells_drawn > vid.cells_drawn_limit) return false;
|
||||||
if(sol)
|
if(sol)
|
||||||
|
2
rug.cpp
2
rug.cpp
@ -943,7 +943,7 @@ bincode acd_bin(ld x) {
|
|||||||
|
|
||||||
bincode get_bincode(hyperpoint h) {
|
bincode get_bincode(hyperpoint h) {
|
||||||
switch(ginf[gwhere].cclass) {
|
switch(ginf[gwhere].cclass) {
|
||||||
case gcEuclid: case gcSol:
|
case gcEuclid: case gcSol: PROD( case gcProduct: )
|
||||||
return acd_bin(h[0]) + acd_bin(h[1]) * sY + acd_bin(h[2]) * sZ;
|
return acd_bin(h[0]) + acd_bin(h[1]) * sY + acd_bin(h[2]) * sZ;
|
||||||
case gcHyperbolic:
|
case gcHyperbolic:
|
||||||
return acd_bin(hypot_d(3, h));
|
return acd_bin(hypot_d(3, h));
|
||||||
|
@ -504,4 +504,7 @@ union SDL_Event;
|
|||||||
#define CAP_MEMORY_RESERVE (!ISMOBILE && !ISWEB)
|
#define CAP_MEMORY_RESERVE (!ISMOBILE && !ISWEB)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define PROD(x) /* unimplemented */
|
||||||
|
#define PROD2(x,y) /* unimplemented */
|
||||||
|
|
||||||
#undef TRANSPARENT
|
#undef TRANSPARENT
|
||||||
|
Loading…
Reference in New Issue
Block a user