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

crystal:: automatically bitruncate with crystal's implementation

This commit is contained in:
Zeno Rogue 2018-11-30 16:59:42 +01:00
parent fd3b030119
commit 851e217a73
3 changed files with 9 additions and 0 deletions

View File

@ -375,6 +375,7 @@ int readArgs() {
geometry = gCrystal; variation = eVariation::pure;
shift(); int N = argi();
ginf[gCrystal].sides = N;
ginf[gCrystal].vertex = 4;
if(N < MAX_EDGE)
ginf[gCrystal].distlimit = distlimit_table[N];
add_bitruncation = false;
@ -383,6 +384,8 @@ int readArgs() {
stop_game();
geometry = gCrystal; variation = eVariation::bitruncated;
ginf[gCrystal].sides = 8;
ginf[gCrystal].vertex = 3;
ginf[gCrystal].distlimit = {7, 5};
add_bitruncation = true;
}
else if(argis("-cview")) {

View File

@ -4136,6 +4136,7 @@ namespace arcm {
}
namespace crystal {
extern bool add_bitruncation;
color_t colorize(cell *c);
int distance(cell *c1, cell *c2);
hrmap *new_map();

View File

@ -1158,6 +1158,11 @@ void set_variation(eVariation target) {
if(variation != target) {
stop_game();
if(euclid6 || binarytiling) geometry = gNormal;
if(target == eVariation::bitruncated && geometry == gCrystal && ginf[gCrystal].sides == 8 && !crystal::add_bitruncation) {
crystal::add_bitruncation = true;
ginf[gCrystal].vertex = 3;
target = eVariation::pure;
}
variation = target;
need_reset_geometry = true;
}