mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-06-08 09:24:06 +00:00
dual:: better CLI arguments
This commit is contained in:
parent
6467e38537
commit
f16f5e0f7e
@ -171,15 +171,9 @@ namespace dual {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int args() {
|
void enable() {
|
||||||
using namespace arg;
|
if(dual::state) return;
|
||||||
|
|
||||||
if(0) ;
|
|
||||||
else if(argis("-dual")) {
|
|
||||||
PHASEFROM(3);
|
|
||||||
stop_game();
|
stop_game();
|
||||||
subscreens::prepare();
|
|
||||||
|
|
||||||
for(int s=0; s<2; s++) {
|
for(int s=0; s<2; s++) {
|
||||||
// dynamicval<display_data*> pds(current_display, &subscreens::player_displays[s]);
|
// dynamicval<display_data*> pds(current_display, &subscreens::player_displays[s]);
|
||||||
variation = eVariation::pure;
|
variation = eVariation::pure;
|
||||||
@ -193,12 +187,28 @@ namespace dual {
|
|||||||
dgd[0].restoregame();
|
dgd[0].restoregame();
|
||||||
state = 1;
|
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);
|
switch_to(0);
|
||||||
}
|
}
|
||||||
else if(argis("-dual1:")) {
|
else if(argis("-dual1")) {
|
||||||
|
enable();
|
||||||
switch_to(1);
|
switch_to(1);
|
||||||
}
|
}
|
||||||
|
else if(argis("-dualoff")) {
|
||||||
|
disable();
|
||||||
|
}
|
||||||
else return 1;
|
else return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user