From: Holger Schemel Date: Sat, 17 Oct 2020 23:12:38 +0000 (+0200) Subject: added setup option for upcoming new name selection screen X-Git-Tag: 4.2.1.0~50 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=5d60005061cc4800bdb15008663986f80041b12c;p=rocksndiamonds.git added setup option for upcoming new name selection screen --- diff --git a/src/files.c b/src/files.c index 66109470..ed885a43 100644 --- a/src/files.c +++ b/src/files.c @@ -8409,6 +8409,10 @@ static struct TokenInfo global_setup_tokens[] = TYPE_STRING, &setup.player_name, "player_name" }, + { + TYPE_SWITCH, + &setup.multiple_users, "multiple_users" + }, { TYPE_SWITCH, &setup.sound, "sound" @@ -9192,6 +9196,8 @@ static void setSetupInfoToDefaults(struct SetupInfo *si) si->player_name = get_corrected_login_name(getLoginName()); + si->multiple_users = TRUE; + si->sound = TRUE; si->sound_loops = TRUE; si->sound_music = TRUE; @@ -9818,7 +9824,8 @@ void SaveSetup(void) for (i = 0; i < ARRAY_SIZE(global_setup_tokens); i++) { // just to make things nicer :) - if (global_setup_tokens[i].value == &setup.sound || + if (global_setup_tokens[i].value == &setup.multiple_users || + global_setup_tokens[i].value == &setup.sound || global_setup_tokens[i].value == &setup.graphics_set || global_setup_tokens[i].value == &setup.volume_simple || global_setup_tokens[i].value == &setup.network_mode || diff --git a/src/libgame/system.h b/src/libgame/system.h index 68a94cec..ab7faa22 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -1390,6 +1390,8 @@ struct SetupInfo { char *player_name; + boolean multiple_users; + boolean sound; boolean sound_loops; boolean sound_music; diff --git a/src/screens.c b/src/screens.c index f0fca35b..040a45c5 100644 --- a/src/screens.c +++ b/src/screens.c @@ -6309,6 +6309,7 @@ static struct TokenInfo setup_info_game[] = { TYPE_PLAYER, &setup.network_player_nr,"Preferred Network Player:" }, { TYPE_TEXT_INPUT, execGadgetNetworkServer, "Network Server Hostname:" }, { TYPE_STRING, &network_server_text, "" }, + { TYPE_SWITCH, &setup.multiple_users, "Multiple Users/Teams:" }, { TYPE_YES_NO, &setup.input_on_focus, "Only Move Focussed Player:" }, { TYPE_SWITCH, &setup.time_limit, "Time Limit:" }, { TYPE_SWITCH, &setup.handicap, "Handicap:" },