added separate network info structure for network options and setup values
[rocksndiamonds.git] / src / files.c
index 3c1faa3342070d8dc9fc22435deeb3bd833a3b74..ad84fbc2fee262839f52b25420b1e3af90b7497a 100644 (file)
@@ -8302,15 +8302,20 @@ void SaveScore(int nr)
 #define SETUP_TOKEN_VOLUME_SIMPLE              38
 #define SETUP_TOKEN_VOLUME_LOOPS               39
 #define SETUP_TOKEN_VOLUME_MUSIC               40
-#define SETUP_TOKEN_TOUCH_CONTROL_TYPE         41
-#define SETUP_TOKEN_TOUCH_MOVE_DISTANCE                42
-#define SETUP_TOKEN_TOUCH_DROP_DISTANCE                43
-#define SETUP_TOKEN_TOUCH_GRID_XSIZE_0         44
-#define SETUP_TOKEN_TOUCH_GRID_YSIZE_0         45
-#define SETUP_TOKEN_TOUCH_GRID_XSIZE_1         46
-#define SETUP_TOKEN_TOUCH_GRID_YSIZE_1         47
-
-#define NUM_GLOBAL_SETUP_TOKENS                        48
+#define SETUP_TOKEN_NETWORK_MODE               41
+#define SETUP_TOKEN_NETWORK_PLAYER_NR          42
+#define SETUP_TOKEN_TOUCH_CONTROL_TYPE         43
+#define SETUP_TOKEN_TOUCH_MOVE_DISTANCE                44
+#define SETUP_TOKEN_TOUCH_DROP_DISTANCE                45
+#define SETUP_TOKEN_TOUCH_TRANSPARENCY         46
+#define SETUP_TOKEN_TOUCH_DRAW_OUTLINED                47
+#define SETUP_TOKEN_TOUCH_DRAW_PRESSED         48
+#define SETUP_TOKEN_TOUCH_GRID_XSIZE_0         49
+#define SETUP_TOKEN_TOUCH_GRID_YSIZE_0         50
+#define SETUP_TOKEN_TOUCH_GRID_XSIZE_1         51
+#define SETUP_TOKEN_TOUCH_GRID_YSIZE_1         52
+
+#define NUM_GLOBAL_SETUP_TOKENS                        53
 
 /* auto setup */
 #define SETUP_TOKEN_AUTO_EDITOR_ZOOM_TILESIZE  0
@@ -8508,9 +8513,14 @@ static struct TokenInfo global_setup_tokens[] =
   { TYPE_INTEGER,&si.volume_simple,           "volume_simple"          },
   { TYPE_INTEGER,&si.volume_loops,            "volume_loops"           },
   { TYPE_INTEGER,&si.volume_music,            "volume_music"           },
+  { TYPE_SWITCH, &si.network_mode,            "network_mode"           },
+  { TYPE_PLAYER, &si.network_player_nr,       "network_player"         },
   { TYPE_STRING, &si.touch.control_type,      "touch.control_type"     },
   { TYPE_INTEGER,&si.touch.move_distance,     "touch.move_distance"    },
   { TYPE_INTEGER,&si.touch.drop_distance,     "touch.drop_distance"    },
+  { TYPE_INTEGER,&si.touch.transparency,      "touch.transparency"     },
+  { TYPE_INTEGER,&si.touch.draw_outlined,     "touch.draw_outlined"    },
+  { TYPE_INTEGER,&si.touch.draw_pressed,      "touch.draw_pressed"     },
   { TYPE_INTEGER,&si.touch.grid_xsize[0],     "touch.virtual_buttons.0.xsize" },
   { TYPE_INTEGER,&si.touch.grid_ysize[0],     "touch.virtual_buttons.0.ysize" },
   { TYPE_INTEGER,&si.touch.grid_xsize[1],     "touch.virtual_buttons.1.xsize" },
@@ -8725,9 +8735,15 @@ static void setSetupInfoToDefaults(struct SetupInfo *si)
   si->volume_loops = 100;              /* percent */
   si->volume_music = 100;              /* percent */
 
+  si->network_mode = FALSE;
+  si->network_player_nr = 0;           /* first player */
+
   si->touch.control_type = getStringCopy(TOUCH_CONTROL_DEFAULT);
   si->touch.move_distance = TOUCH_MOVE_DISTANCE_DEFAULT;       /* percent */
   si->touch.drop_distance = TOUCH_DROP_DISTANCE_DEFAULT;       /* percent */
+  si->touch.transparency = TOUCH_TRANSPARENCY_DEFAULT;         /* percent */
+  si->touch.draw_outlined = TRUE;
+  si->touch.draw_pressed = TRUE;
 
   for (i = 0; i < 2; i++)
   {
@@ -9317,6 +9333,7 @@ void SaveSetup()
     if (i == SETUP_TOKEN_PLAYER_NAME + 1 ||
        i == SETUP_TOKEN_GRAPHICS_SET ||
        i == SETUP_TOKEN_VOLUME_SIMPLE ||
+       i == SETUP_TOKEN_NETWORK_MODE ||
        i == SETUP_TOKEN_TOUCH_CONTROL_TYPE ||
        i == SETUP_TOKEN_TOUCH_GRID_XSIZE_0 ||
        i == SETUP_TOKEN_TOUCH_GRID_XSIZE_1)