diff --git a/game/skeldal.h b/game/skeldal.h index c2e12e7..b527b64 100644 --- a/game/skeldal.h +++ b/game/skeldal.h @@ -15,6 +15,7 @@ typedef struct { const char *patch_file; const char *sse_hostport; + char launcher; // set language (cz|en)\n" "-s generate string-tables (for localization) and exit\n" "-c connect to host:port for remote control (mapedit)\n" + "-L run launcher - select workshop adventure\n" "-h this help\n"); exit(1); } @@ -38,13 +39,15 @@ int main(int argc, char **argv) { std::string patch; std::string lang; std::string sse_hostport; - for (int optchr = -1; (optchr = getopt(argc, argv, "hf:a:s:l:p:c:")) != -1; ) { + bool launcher = false; + for (int optchr = -1; (optchr = getopt(argc, argv, "hLf:a:s:l:p:c:")) != -1; ) { switch (optchr) { case 'f': config_name = optarg;break; case 'a': adv_config_file = optarg;break; case 'h': show_help(argv[0]);break; case 'p': patch = optarg; break; case 'l': lang = optarg;break; + case 'L': launcher = true;break; case 's': gen_stringtable_path = optarg;break; case 'c': sse_hostport = optarg;break; default: show_help_short(); @@ -62,6 +65,7 @@ int main(int argc, char **argv) { cfg.lang_path = lang.empty()?NULL:lang.c_str(); cfg.patch_file = patch.empty()?NULL:patch.c_str(); cfg.sse_hostport = sse_hostport.empty()?NULL:sse_hostport.c_str(); + cfg.launcher = launcher?1:0; try { if (!gen_stringtable_path.empty()) { diff --git a/platform/windows/app_start.cpp b/platform/windows/app_start.cpp index 63795f3..1aa2462 100644 --- a/platform/windows/app_start.cpp +++ b/platform/windows/app_start.cpp @@ -25,6 +25,7 @@ void show_help(std::ostream &out, const char *arg0) { "-l set language (cz|en)\n" "-s generate string-tables (for localization) and exit\n" "-c connect to host:port for remote control (mapedit)\n" + "-L run launcher - select workshop adventure\n" "-h this help\n"; } @@ -40,14 +41,17 @@ int main(int argc, char **argv) { std::string lang; std::string patch; std::string sse_hostport; + bool launcher = false; std::ostringstream console; - for (int optchr = -1; (optchr = getopt(argc, argv, "hf:a:s:l:c:p:")) != -1; ) { + for (int optchr = -1; (optchr = getopt(argc, argv, "hLf:a:s:l:c:p:")) != -1; ) { switch (optchr) { case 'f': config_name = optarg;break; case 'a': adv_config_file = optarg;break; case 'h': show_help(console, argv[0]);break; case 'p': patch = optarg; break; case 'l': lang = optarg;break; + case 'L': launcher = true;break; + case 's': gen_stringtable_path = optarg;break; case 'c': sse_hostport = optarg;break; default: show_help_short(console);break; @@ -72,6 +76,7 @@ int main(int argc, char **argv) { cfg.lang_path = lang.empty()?NULL:lang.c_str(); cfg.patch_file = patch.empty()?NULL:patch.c_str(); cfg.sse_hostport = sse_hostport.empty()?NULL:sse_hostport.c_str(); + cfg.launcher = launcher?1:0; { std::string msg = console.str();