mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-25 09:30:35 +00:00
dual:: selectable from the menu
This commit is contained in:
parent
b7daf93f2e
commit
69e76b550c
@ -90,6 +90,7 @@ bool wrongMode(char flags) {
|
|||||||
|
|
||||||
if(shmup::on != (flags == rg::shmup || flags == rg::racing)) return true;
|
if(shmup::on != (flags == rg::shmup || flags == rg::racing)) return true;
|
||||||
if(racing::on != (flags == rg::racing)) return true;
|
if(racing::on != (flags == rg::racing)) return true;
|
||||||
|
if((!!dual::state) != (flags == rg::dualmode)) return true;
|
||||||
#if CAP_DAILY
|
#if CAP_DAILY
|
||||||
if(daily::on != (flags == rg::daily)) return true;
|
if(daily::on != (flags == rg::daily)) return true;
|
||||||
#endif
|
#endif
|
||||||
@ -526,6 +527,7 @@ void achievement_score(int cat, int number) {
|
|||||||
else if(geometry) return;
|
else if(geometry) return;
|
||||||
if(CHANGED_VARIATION) return;
|
if(CHANGED_VARIATION) return;
|
||||||
if(randomPatternsMode) return;
|
if(randomPatternsMode) return;
|
||||||
|
if(dual::state) return;
|
||||||
if(shmup::on && cat != LB_PURE_TACTICS_SHMUP && cat != LB_PURE_TACTICS_COOP && cat != LB_RACING) return;
|
if(shmup::on && cat != LB_PURE_TACTICS_SHMUP && cat != LB_PURE_TACTICS_COOP && cat != LB_RACING) return;
|
||||||
if(yendor::on && cat != LB_YENDOR_CHALLENGE) return;
|
if(yendor::on && cat != LB_YENDOR_CHALLENGE) return;
|
||||||
if(tactic::on && cat != LB_PURE_TACTICS && cat != LB_PURE_TACTICS_SHMUP && cat != LB_PURE_TACTICS_COOP)
|
if(tactic::on && cat != LB_PURE_TACTICS && cat != LB_PURE_TACTICS_SHMUP && cat != LB_PURE_TACTICS_COOP)
|
||||||
@ -615,6 +617,7 @@ void achievement_final(bool really_final) {
|
|||||||
if(randomPatternsMode) return;
|
if(randomPatternsMode) return;
|
||||||
if(peace::on) return;
|
if(peace::on) return;
|
||||||
if(yendor::on) return;
|
if(yendor::on) return;
|
||||||
|
if(dual::state) return;
|
||||||
|
|
||||||
if(tactic::on) {
|
if(tactic::on) {
|
||||||
tactic::record();
|
tactic::record();
|
||||||
|
4
hyper.h
4
hyper.h
@ -752,6 +752,7 @@ namespace rg {
|
|||||||
static const char daily = 'd';
|
static const char daily = 'd';
|
||||||
static const char daily_off = 'D';
|
static const char daily_off = 'D';
|
||||||
static const char racing = 'R';
|
static const char racing = 'R';
|
||||||
|
static const char dualmode = 'U';
|
||||||
|
|
||||||
// wrongmode only -- marks 'global' achievements not related to the current mode
|
// wrongmode only -- marks 'global' achievements not related to the current mode
|
||||||
static const char global = 'x';
|
static const char global = 'x';
|
||||||
@ -5462,6 +5463,9 @@ namespace dual {
|
|||||||
|
|
||||||
bool check_side(eLand l);
|
bool check_side(eLand l);
|
||||||
void assign_landsides();
|
void assign_landsides();
|
||||||
|
|
||||||
|
void disable();
|
||||||
|
void enable();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -515,6 +515,10 @@ void showChangeMode() {
|
|||||||
#if CAP_RACING
|
#if CAP_RACING
|
||||||
dialog::addBoolItem(XLAT("racing mode"), racing::on, 'R');
|
dialog::addBoolItem(XLAT("racing mode"), racing::on, 'R');
|
||||||
#endif
|
#endif
|
||||||
|
#if CAP_ARCM
|
||||||
|
dialog::addBoolItem(XLAT("dual geometry mode"), dual::state, 'D');
|
||||||
|
dialog::add_action([] { dialog::do_if_confirmed([] { restart_game(rg::dualmode); }); });
|
||||||
|
#endif
|
||||||
#if CAP_DAILY
|
#if CAP_DAILY
|
||||||
dialog::addBoolItem(XLAT("Strange Challenge"), daily::on, 'z');
|
dialog::addBoolItem(XLAT("Strange Challenge"), daily::on, 'z');
|
||||||
#endif
|
#endif
|
||||||
|
25
system.cpp
25
system.cpp
@ -1167,6 +1167,13 @@ void set_variation(eVariation target) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void stop_tour() {
|
||||||
|
while(gamestack::pushed()) {
|
||||||
|
gamestack::pop();
|
||||||
|
stop_game();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void switch_game_mode(char switchWhat) {
|
void switch_game_mode(char switchWhat) {
|
||||||
DEBBI(DF_INIT, ("switch_game_mode ", switchWhat));
|
DEBBI(DF_INIT, ("switch_game_mode ", switchWhat));
|
||||||
switch(switchWhat) {
|
switch(switchWhat) {
|
||||||
@ -1177,6 +1184,14 @@ void switch_game_mode(char switchWhat) {
|
|||||||
racing::on = false;
|
racing::on = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case rg::dualmode:
|
||||||
|
stop_tour(); tour::on = false;
|
||||||
|
racing::on = false;
|
||||||
|
yendor::on = tactic::on = princess::challenge = false;
|
||||||
|
if(!dual::state) dual::enable();
|
||||||
|
else dual::disable();
|
||||||
|
break;
|
||||||
|
|
||||||
case rg::inv:
|
case rg::inv:
|
||||||
inv::on = !inv::on;
|
inv::on = !inv::on;
|
||||||
if(tactic::on) firstland = laIce;
|
if(tactic::on) firstland = laIce;
|
||||||
@ -1195,12 +1210,10 @@ void switch_game_mode(char switchWhat) {
|
|||||||
|
|
||||||
#if CAP_TOUR
|
#if CAP_TOUR
|
||||||
case rg::tour:
|
case rg::tour:
|
||||||
while(gamestack::pushed()) {
|
if(tour::on) stop_tour();
|
||||||
gamestack::pop();
|
|
||||||
stop_game();
|
|
||||||
}
|
|
||||||
geometry = gNormal;
|
geometry = gNormal;
|
||||||
yendor::on = tactic::on = princess::challenge = peace::on = inv::on = false;
|
yendor::on = tactic::on = princess::challenge = peace::on = inv::on = false;
|
||||||
|
dual::disable();
|
||||||
chaosmode = randomPatternsMode = false;
|
chaosmode = randomPatternsMode = false;
|
||||||
variation = eVariation::bitruncated;
|
variation = eVariation::bitruncated;
|
||||||
#if CAP_GP
|
#if CAP_GP
|
||||||
@ -1222,6 +1235,7 @@ void switch_game_mode(char switchWhat) {
|
|||||||
chaosmode = false;
|
chaosmode = false;
|
||||||
racing::on = false;
|
racing::on = false;
|
||||||
if(!yendor::on) firstland = laIce;
|
if(!yendor::on) firstland = laIce;
|
||||||
|
dual::disable();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#if CAP_RACING
|
#if CAP_RACING
|
||||||
@ -1234,6 +1248,7 @@ void switch_game_mode(char switchWhat) {
|
|||||||
chaosmode = false;
|
chaosmode = false;
|
||||||
princess::challenge = false;
|
princess::challenge = false;
|
||||||
if(bounded) set_geometry(gNormal);
|
if(bounded) set_geometry(gNormal);
|
||||||
|
dual::disable();
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1247,6 +1262,7 @@ void switch_game_mode(char switchWhat) {
|
|||||||
racing::on = false;
|
racing::on = false;
|
||||||
chaosmode = false;
|
chaosmode = false;
|
||||||
if(!tactic::on) firstland = laIce;
|
if(!tactic::on) firstland = laIce;
|
||||||
|
dual::disable();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case rg::shmup:
|
case rg::shmup:
|
||||||
@ -1273,6 +1289,7 @@ void switch_game_mode(char switchWhat) {
|
|||||||
chaosmode = false;
|
chaosmode = false;
|
||||||
inv::on = false;
|
inv::on = false;
|
||||||
racing::on = false;
|
racing::on = false;
|
||||||
|
dual::disable();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#if CAP_DAILY
|
#if CAP_DAILY
|
||||||
|
Loading…
Reference in New Issue
Block a user