1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-12-15 02:28:05 +00:00

hybrid:: refactored the common parts of prod and sl2, also used them when applicable

This commit is contained in:
Zeno Rogue
2019-08-24 14:07:46 +02:00
parent ab80b28782
commit 1e6970ca28
20 changed files with 169 additions and 224 deletions

View File

@@ -872,7 +872,7 @@ EX void saveStats(bool emergency IS(false)) {
if(randomPatternsMode) return;
if(dual::state) return;
if(archimedean) return;
if(prod) return;
if(hybri) return;
if(daily::on) return;
if(peace::on) return;
if(!gold()) return;
@@ -1159,7 +1159,7 @@ EX void set_geometry(eGeometry target) {
int old_DIM = GDIM;
stop_game();
ors::reset();
if(target == gProduct) product::configure();
if(among(target, gProduct, gSL2)) hybrid::configure(target);
geometry = target;
if(chaosmode && bounded) chaosmode = false;
@@ -1288,7 +1288,7 @@ EX void switch_game_mode(char switchWhat) {
chaosmode = false;
princess::challenge = false;
if(sol || bounded) set_geometry(gNormal);
if(prod) set_geometry(product::underlying);
if(prod) set_geometry(hybrid::underlying);
dual::disable();
break;
#endif
@@ -1310,7 +1310,7 @@ EX void switch_game_mode(char switchWhat) {
shmup::on = !shmup::on;
princess::challenge = false;
if(!shmup::on) racing::on = false;
if(prod) set_geometry(product::underlying);
if(prod) set_geometry(hybrid::underlying);
break;
case rg::randpattern: