change switch to c (as command)

This commit is contained in:
Ondřej Novák 2025-05-26 20:09:42 +02:00
parent 14984064d1
commit 6ee879dbe5
3 changed files with 7 additions and 7 deletions

View file

@ -1036,7 +1036,7 @@ void init_skeldal(const INI_CONFIG *cfg)
exit(1); exit(1);
} }
showview = game_display_update_rect; showview = game_display_update_rect;
game_display_set_icon(getWindowIcon(), getWindowIconSize()); // game_display_set_icon(getWindowIcon(), getWindowIconSize());
init_joystick(ini_section_open(cfg, "controller")); init_joystick(ini_section_open(cfg, "controller"));
general_engine_init(); general_engine_init();
@ -1188,7 +1188,7 @@ extern char running_battle;
} else if (strncmp(m, "MESSAGE ", 8) == 0) { } else if (strncmp(m, "MESSAGE ", 8) == 0) {
bott_disp_text(m+8); bott_disp_text(m+8);
} }
} }
return 0; return 0;
} }

View file

@ -20,7 +20,7 @@ void show_help(const char *arg0) {
"-a <adv> path for adventure file (.adv)\n" "-a <adv> path for adventure file (.adv)\n"
"-l <lang> set language (cz|en)\n" "-l <lang> set language (cz|en)\n"
"-s <directory> generate string-tables (for localization) and exit\n" "-s <directory> generate string-tables (for localization) and exit\n"
"-L <host:port> connect to host:port to listen commands (mapedit)\n" "-c <host:port> connect to host:port for remote control (mapedit)\n"
"-h this help\n"); "-h this help\n");
exit(1); exit(1);
} }
@ -36,14 +36,14 @@ int main(int argc, char **argv) {
std::string gen_stringtable_path; std::string gen_stringtable_path;
std::string lang; std::string lang;
std::string sse_hostport; std::string sse_hostport;
for (int optchr = -1; (optchr = getopt(argc, argv, "hf:a:s:l:L:")) != -1; ) { for (int optchr = -1; (optchr = getopt(argc, argv, "hf:a:s:l:c:")) != -1; ) {
switch (optchr) { switch (optchr) {
case 'f': config_name = optarg;break; case 'f': config_name = optarg;break;
case 'a': adv_config_file = optarg;break; case 'a': adv_config_file = optarg;break;
case 'h': show_help(argv[0]);break; case 'h': show_help(argv[0]);break;
case 'l': lang = optarg;break; case 'l': lang = optarg;break;
case 's': gen_stringtable_path = optarg;break; case 's': gen_stringtable_path = optarg;break;
case 'L': sse_hostport = optarg;break; case 'c': sse_hostport = optarg;break;
default: show_help_short(); default: show_help_short();
return 1; return 1;
} }

View file

@ -23,7 +23,7 @@ void show_help(std::ostream &out, const char *arg0) {
"-a <adv> path for adventure file (.adv)\n" "-a <adv> path for adventure file (.adv)\n"
"-l <lang> set language (cz|en)\n" "-l <lang> set language (cz|en)\n"
"-s <directory> generate string-tables (for localization) and exit\n" "-s <directory> generate string-tables (for localization) and exit\n"
"-L <host:port> connect to host:port to listen commands (mapedit)\n" "-c <host:port> connect to host:port for remote control (mapedit)\n"
"-h this help\n"; "-h this help\n";
} }
@ -39,7 +39,7 @@ int main(int argc, char **argv) {
std::string lang; std::string lang;
std::string sse_hostport; std::string sse_hostport;
std::ostringstream console; std::ostringstream console;
for (int optchr = -1; (optchr = getopt(argc, argv, "hf:a:s:l:L:")) != -1; ) { for (int optchr = -1; (optchr = getopt(argc, argv, "hf:a:s:l:c:")) != -1; ) {
switch (optchr) { switch (optchr) {
case 'f': config_name = optarg;break; case 'f': config_name = optarg;break;
case 'a': adv_config_file = optarg;break; case 'a': adv_config_file = optarg;break;