1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-16 22:57:38 +00:00

moved svg and PNG screenshot to a new file screenshots.cpp; moved some commandline arguments from commandline.cpp to their respective modules

This commit is contained in:
Zeno Rogue
2018-07-19 23:46:58 +02:00
parent 8c5a88c513
commit 30cb9158cb
11 changed files with 507 additions and 440 deletions

View File

@@ -1794,4 +1794,23 @@ namespace mapeditor {
}
#if CAP_EDIT
#if CAP_COMMANDLINE
string levelfile = "hyperrogue.lev";
const char *loadlevel = NULL;
string picfile = "hyperrogue.pic";
int read_editor_args() {
using namespace arg;
if(argis("-lev")) { shift(); levelfile = args(); }
else if(argis("-pic")) { shift(); picfile = args(); }
else if(argis("-load")) { PHASE(3); shift(); mapstream::loadMap(args()); }
else if(argis("-picload")) { PHASE(3); shift(); mapeditor::loadPicFile(args()); }
else return 1;
return 0;
}
auto ah_editor = addHook(hooks_args, 0, read_editor_args);
#endif
#endif
}