Merge remote-tracking branch 'origin/sse' into mapedit_support

This commit is contained in:
Ondřej Novák 2025-07-03 12:03:40 +02:00
commit 9a41bc0f67
8 changed files with 294 additions and 38 deletions

View file

@ -21,6 +21,7 @@ void show_help(const char *arg0) {
"-p <file> patch data with custom DDL\n"
"-l <lang> set language (cz|en)\n"
"-s <directory> generate string-tables (for localization) and exit\n"
"-c <host:port> connect to host:port for remote control (mapedit)\n"
"-h this help\n");
exit(1);
}
@ -36,7 +37,8 @@ int main(int argc, char **argv) {
std::string gen_stringtable_path;
std::string patch;
std::string lang;
for (int optchr = -1; (optchr = getopt(argc, argv, "hf:a:s:l:p:")) != -1; ) {
std::string sse_hostport;
for (int optchr = -1; (optchr = getopt(argc, argv, "hf:a:s:l:p:c:")) != -1; ) {
switch (optchr) {
case 'f': config_name = optarg;break;
case 'a': adv_config_file = optarg;break;
@ -44,6 +46,7 @@ int main(int argc, char **argv) {
case 'p': patch = optarg; break;
case 'l': lang = optarg;break;
case 's': gen_stringtable_path = optarg;break;
case 'c': sse_hostport = optarg;break;
default: show_help_short();
return 1;
}
@ -58,6 +61,7 @@ int main(int argc, char **argv) {
cfg.config_path = config_name.c_str();
cfg.lang_path = lang.empty()?NULL:lang.c_str();
cfg.patch_file = patch.empty()?NULL:patch.c_str();
cfg.sse_hostport = sse_hostport.c_str();
try {
if (!gen_stringtable_path.empty()) {