X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;ds=sidebyside;f=Source%2Fmain.cpp;h=7fb429108fba3fcf71ce3a5790ce750c3b9e0234;hb=8a32dc9e4e1011b10f009e999d7d008aa2711d8a;hp=c50e893b67ef572a4457bd61fcc4dcd3d36167b6;hpb=e4d3d3f1df59e142d358503b8c41dfb1db4f4231;p=lugaru.git diff --git a/Source/main.cpp b/Source/main.cpp index c50e893..7fb4291 100644 --- a/Source/main.cpp +++ b/Source/main.cpp @@ -581,6 +581,7 @@ const option::Descriptor usage[] = {SOUND, OPENAL_OUTPUT_OSS, "", "force-oss", option::Arg::None, " --force-oss Force use of OSS back-end." }, {OPENALINFO, 0, "", "openal-info", option::Arg::None, " --openal-info Print info about OpenAL at launch." }, {SHOWRESOLUTIONS, 0, "", "showresolutions", option::Arg::None, " --showresolutions List the resolutions found by SDL at launch." }, + {DEVTOOLS, 0, "d", "devtools", option::Arg::None, " -d, --devtools Enable dev tools: console, level editor and debug info." }, {0,0,0,0,0,0} }; @@ -623,7 +624,9 @@ int main(int argc, char **argv) LOGFUNC; +#ifdef NDEBUG try { +#endif { newGame(); @@ -632,6 +635,10 @@ int main(int argc, char **argv) return 42; } + if (commandLineOptions[DEVTOOLS]) { + devtools = true; + } + bool gameDone = false; bool gameFocused = true; @@ -674,6 +681,7 @@ int main(int argc, char **argv) CleanUp (); return 0; +#ifdef NDEBUG } catch (const std::exception& error) { CleanUp(); @@ -686,4 +694,5 @@ int main(int argc, char **argv) return -1; } +#endif }