1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-03-29 23:07:03 +00:00

dual:: better CLI arguments

This commit is contained in:
Zeno Rogue 2019-05-29 02:33:33 +02:00
parent 6467e38537
commit f16f5e0f7e

View File

@ -171,15 +171,9 @@ namespace dual {
return true;
}
int args() {
using namespace arg;
if(0) ;
else if(argis("-dual")) {
PHASEFROM(3);
void enable() {
if(dual::state) return;
stop_game();
subscreens::prepare();
for(int s=0; s<2; s++) {
// dynamicval<display_data*> pds(current_display, &subscreens::player_displays[s]);
variation = eVariation::pure;
@ -193,12 +187,28 @@ namespace dual {
dgd[0].restoregame();
state = 1;
}
else if(argis("-dual0:")) {
void disable() {
if(!dual::state) return;
stop_game();
state = 0;
}
int args() {
using namespace arg;
if(0) ;
else if(argis("-dual0")) {
enable();
switch_to(0);
}
else if(argis("-dual1:")) {
else if(argis("-dual1")) {
enable();
switch_to(1);
}
else if(argis("-dualoff")) {
disable();
}
else return 1;
return 0;
}