mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-25 09:30:35 +00:00
conformal:: args:: moved some arguments from config.cpp to conformal.cpp
This commit is contained in:
parent
a3446e8a7b
commit
3f8d17aa0d
35
config.cpp
35
config.cpp
@ -1533,35 +1533,6 @@ int read_config_args() {
|
||||
dont_face_pc = true;
|
||||
}
|
||||
|
||||
else if(argis("-PM")) {
|
||||
PHASEFROM(2); shift(); pmodel = eModel(argi());
|
||||
}
|
||||
else if(argis("-ballangle")) {
|
||||
PHASEFROM(2);
|
||||
shift(); vid.ballangle = argf();
|
||||
}
|
||||
else if(argis("-topz")) {
|
||||
PHASEFROM(2);
|
||||
shift(); conformal::top_z = argf();
|
||||
}
|
||||
else if(argis("-hp")) {
|
||||
PHASEFROM(2);
|
||||
shift(); conformal::halfplane_scale = argf();
|
||||
}
|
||||
else if(argis("-mori")) {
|
||||
PHASEFROM(2);
|
||||
shift(); conformal::model_orientation = argf();
|
||||
}
|
||||
else if(argis("-mtrans")) {
|
||||
PHASEFROM(2);
|
||||
shift(); conformal::model_transition = argf();
|
||||
}
|
||||
else if(argis("-zoom")) {
|
||||
PHASEFROM(2); shift(); vid.scale = argf();
|
||||
}
|
||||
else if(argis("-alpha")) {
|
||||
PHASEFROM(2); shift(); vid.alpha = argf();
|
||||
}
|
||||
#if CAP_TRANS
|
||||
else if(argis("-lang")) {
|
||||
PHASEFROM(2); shift(); vid.language = argi();
|
||||
@ -1579,12 +1550,6 @@ int read_config_args() {
|
||||
if(clHeight) vid.yres = clHeight;
|
||||
if(clFont) vid.fsize = clFont;
|
||||
}
|
||||
else if(argis("-els")) {
|
||||
shift(); conformal::extra_line_steps = argf();
|
||||
}
|
||||
else if(argis("-stretch")) {
|
||||
PHASEFROM(2); shift(); vid.stretch = argf();
|
||||
}
|
||||
else if(argis("-msm")) {
|
||||
PHASEFROM(2); memory_saving_mode = true;
|
||||
}
|
||||
|
@ -979,6 +979,54 @@ namespace conformal {
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
int readArgs() {
|
||||
using namespace arg;
|
||||
|
||||
if(0) ;
|
||||
else if(argis("-els")) {
|
||||
shift(); conformal::extra_line_steps = argf();
|
||||
}
|
||||
else if(argis("-stretch")) {
|
||||
PHASEFROM(2); shift(); vid.stretch = argf();
|
||||
}
|
||||
else if(argis("-PM")) {
|
||||
PHASEFROM(2); shift(); pmodel = eModel(argi());
|
||||
if(pmodel == mdFormula) {
|
||||
shift(); basic_model = eModel(argi());
|
||||
shift(); formula = args();
|
||||
}
|
||||
}
|
||||
else if(argis("-ballangle")) {
|
||||
PHASEFROM(2);
|
||||
shift(); vid.ballangle = argf();
|
||||
}
|
||||
else if(argis("-topz")) {
|
||||
PHASEFROM(2);
|
||||
shift(); conformal::top_z = argf();
|
||||
}
|
||||
else if(argis("-hp")) {
|
||||
PHASEFROM(2);
|
||||
shift(); conformal::halfplane_scale = argf();
|
||||
}
|
||||
else if(argis("-mori")) {
|
||||
PHASEFROM(2);
|
||||
shift(); conformal::model_orientation = argf();
|
||||
}
|
||||
else if(argis("-mtrans")) {
|
||||
PHASEFROM(2);
|
||||
shift(); conformal::model_transition = argf();
|
||||
}
|
||||
else if(argis("-zoom")) {
|
||||
PHASEFROM(2); shift(); vid.scale = argf();
|
||||
}
|
||||
else if(argis("-alpha")) {
|
||||
PHASEFROM(2); shift(); vid.alpha = argf();
|
||||
}
|
||||
else return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
auto hooks = addHook(clearmemory, 0, [] () {
|
||||
conformal::renderAutoband();
|
||||
conformal::on = false;
|
||||
@ -986,7 +1034,7 @@ namespace conformal {
|
||||
conformal::findhistory.clear();
|
||||
conformal::movehistory.clear();
|
||||
conformal::includeHistory = false;
|
||||
});
|
||||
}) + addHook(hooks_args, 100, readArgs);
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user