1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-06-26 15:13:19 +00:00

pushed unimplemented Product

This commit is contained in:
Zeno Rogue 2019-07-28 11:17:25 +02:00
parent 0054dbc118
commit c97ab10700
10 changed files with 21 additions and 5 deletions

View File

@ -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

View File

@ -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

View File

@ -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 };

View File

@ -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"

View File

@ -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();

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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));

View File

@ -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