1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-13 05:37:38 +00:00

arb:: converted and rulegen status is now saved in save_geometry

This commit is contained in:
Zeno Rogue
2021-07-30 12:25:17 +02:00
parent 253c5ee531
commit 0dfa361453
4 changed files with 51 additions and 8 deletions

View File

@@ -1026,6 +1026,9 @@ EX void set_sliders() {
/** convert a tessellation (e.g. Archimedean, regular, etc.) to the arb::current internal representation */
EX namespace convert {
EX eGeometry base_geometry;
EX eVariation base_variation;
struct id_record {
int target; /* master of this id type */
int shift; /* sample direction 0 == our direction shift */
@@ -1219,6 +1222,21 @@ EX void convert() {
arb::compute_vertex_valence();
}
EX bool in() {
return arb::in() && base_geometry != gArbitrary;
}
/** activate the converted tessellation */
EX void activate() {
if(geometry != gArbitrary) {
base_geometry = geometry;
base_variation = variation;
stop_game();
geometry = gArbitrary;
variation = eVariation::pure;
}
}
EX }
#if CAP_COMMANDLINE