an option to start in draw editor, and to clear shapes

This commit is contained in:
Zeno Rogue 2020-05-01 12:27:49 +02:00
parent 595511d66e
commit c5a7b15e98
1 changed files with 10 additions and 0 deletions

View File

@ -153,6 +153,8 @@ EX namespace mapeditor {
vector<unique_ptr<dtshape>> dtshapes;
EX void clear_dtshapes() { dtshapes.clear(); }
EX void draw_dtshapes() {
for(auto& shp: dtshapes) {
if(shp == nullptr) continue;
@ -2784,6 +2786,14 @@ int read_editor_args() {
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("-d:draw")) { PHASE(3);
#if CAP_EDIT
start_game();
mapeditor::drawing_tool = true;
mapeditor::initdraw(cwt.at);
launch_dialog(mapeditor::showDrawEditor);
#endif
}
#if CAP_POLY
else if(argis("-picload")) { PHASE(3); shift(); mapeditor::loadPicFile(args()); }
#endif