From c5a7b15e98730ab43cb0d25a82d8acefbddcfed3 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Fri, 1 May 2020 12:27:49 +0200 Subject: [PATCH] an option to start in draw editor, and to clear shapes --- mapeditor.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mapeditor.cpp b/mapeditor.cpp index 1a9fb714..5cf21b2e 100644 --- a/mapeditor.cpp +++ b/mapeditor.cpp @@ -153,6 +153,8 @@ EX namespace mapeditor { vector> 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