#define SETUP_TOKEN_TOUCH_GRID_YSIZE_0 48
#define SETUP_TOKEN_TOUCH_GRID_XSIZE_1 49
#define SETUP_TOKEN_TOUCH_GRID_YSIZE_1 50
+#define SETUP_TOKEN_NETWORK_MODE 51
-#define NUM_GLOBAL_SETUP_TOKENS 51
+#define NUM_GLOBAL_SETUP_TOKENS 52
/* auto setup */
#define SETUP_TOKEN_AUTO_EDITOR_ZOOM_TILESIZE 0
{ TYPE_INTEGER,&si.touch.grid_ysize[0], "touch.virtual_buttons.0.ysize" },
{ TYPE_INTEGER,&si.touch.grid_xsize[1], "touch.virtual_buttons.1.xsize" },
{ TYPE_INTEGER,&si.touch.grid_ysize[1], "touch.virtual_buttons.1.ysize" },
+ { TYPE_SWITCH, &si.network_mode, "network_mode" },
};
static struct TokenInfo auto_setup_tokens[] =
si->touch.grid_initialized = video.initialized;
+ si->network_mode = FALSE;
+
si->editor.el_boulderdash = TRUE;
si->editor.el_emerald_mine = TRUE;
si->editor.el_emerald_mine_club = TRUE;
int nr_wanted;
#endif
+ if (setup.network_mode)
+ options.network = TRUE;
+
if (!options.network)
return;
int volume_loops;
int volume_music;
+ boolean network_mode;
+
struct SetupAutoSetupInfo auto_setup;
struct SetupEditorInfo editor;
struct SetupEditorCascadeInfo editor_cascade;
static struct TokenInfo setup_info_game[] =
{
{ TYPE_SWITCH, &setup.team_mode, "Team-Mode (Multi-Player):" },
+ { TYPE_SWITCH, &setup.network_mode, "Network Multi-Player Mode:" },
{ TYPE_YES_NO, &setup.input_on_focus, "Only Move Focussed Player:" },
{ TYPE_SWITCH, &setup.time_limit, "Time Limit:" },
{ TYPE_SWITCH, &setup.handicap, "Handicap:" },
// fullscreen state may have changed at this point
if (si->value == &setup.fullscreen)
ToggleFullscreenOrChangeWindowScalingIfNeeded();
+
+ if (si->value == &setup.network_mode &&
+ setup.network_mode &&
+ !options.network)
+ Request("Please restart game to enable network games!", REQ_CONFIRM);
}
static struct TokenInfo *getSetupInfoFinal(struct TokenInfo *setup_info_orig)