1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-28 12:27:40 +00:00

fixed some issues with commandline arguments (svg shots made correctly from cli)

This commit is contained in:
Zeno Rogue
2019-01-24 14:48:53 +01:00
parent 40aea82374
commit 8ac1cf8731
5 changed files with 18 additions and 5 deletions

View File

@@ -181,7 +181,7 @@ namespace svg {
x.document.close();
}, f.s.c_str());
#else
fclose(f.f);
fclose(f.f); f.f = NULL;
#endif
}
@@ -203,7 +203,8 @@ int read_args() {
else if(argis("-svgshot")) {
PHASE(3); shift(); start_game();
printf("saving SVG screenshot to %s\n", argcs());
svg::render(argcs());
shot::make_svg = true;
shot::take(argcs());
}
else return 1;
return 0;
@@ -321,6 +322,7 @@ void take(string fname, const function<void()>& what) {
vid.xres = shotx * multiplier;
vid.yres = shoty * multiplier;
calcparam();
conformal::configure();
if(make_svg) {
#if CAP_SVG
@@ -378,6 +380,9 @@ int png_read_args() {
else if(argis("-pngformat")) {
shift(); shotformat = argi();
}
else if(argis("-shotxy")) {
shift(); shotformat = -1; shotx = argi(); shift(); shoty = argi();
}
else if(argis("-shott")) {
shift(); shot::transparent = argi();
}