mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-24 17:10:36 +00:00
crystal:: automatically bitruncate with crystal's implementation
This commit is contained in:
parent
fd3b030119
commit
851e217a73
@ -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")) {
|
||||
|
1
hyper.h
1
hyper.h
@ -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();
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user