removed unused functions
[rocksndiamonds.git] / src / libgame / setup.c
index fa696c581e2d1a69c966a0d4fe54d3c153aaf010..6b10a51ec9d4d7248eb6ad54eee66a65433c9c6f 100644 (file)
@@ -47,8 +47,6 @@ static char *levelclass_desc[NUM_LEVELCLASS_DESC] =
 #define TOKEN_VALUE_POSITION_DEFAULT           40
 #define TOKEN_COMMENT_POSITION_DEFAULT         60
 
-#define MAX_COOKIE_LEN                         256
-
 #define TREE_NODE_TYPE_DEFAULT                 0
 #define TREE_NODE_TYPE_PARENT                  1
 #define TREE_NODE_TYPE_GROUP                   2
@@ -2003,21 +2001,6 @@ void SetFilePermissions(char *filename, int permission_class)
   chmod(filename, perms);
 }
 
-char *getCookie(char *file_type)
-{
-  static char cookie[MAX_COOKIE_LEN + 1];
-
-  if (strlen(program.cookie_prefix) + 1 +
-      strlen(file_type) + strlen("_FILE_VERSION_x.x") > MAX_COOKIE_LEN)
-    return "[COOKIE ERROR]";   // should never happen
-
-  sprintf(cookie, "%s_%s_FILE_VERSION_%d.%d",
-         program.cookie_prefix, file_type,
-         program.version_super, program.version_major);
-
-  return cookie;
-}
-
 void fprintFileHeader(FILE *file, char *basename)
 {
   char *prefix = "# ";
@@ -2730,10 +2713,11 @@ SetupFileHash *loadSetupFileHash(char *filename)
 #define LEVELINFO_TOKEN_EMPTY_LEVEL_NAME       27
 #define LEVELINFO_TOKEN_FORCE_LEVEL_NAME       28
 #define LEVELINFO_TOKEN_HANDICAP               29
-#define LEVELINFO_TOKEN_SKIP_LEVELS            30
-#define LEVELINFO_TOKEN_USE_EMC_TILES          31
+#define LEVELINFO_TOKEN_TIME_LIMIT             30
+#define LEVELINFO_TOKEN_SKIP_LEVELS            31
+#define LEVELINFO_TOKEN_USE_EMC_TILES          32
 
-#define NUM_LEVELINFO_TOKENS                   32
+#define NUM_LEVELINFO_TOKENS                   33
 
 static LevelDirTree ldi;
 
@@ -2770,6 +2754,7 @@ static struct TokenInfo levelinfo_tokens[] =
   { TYPE_STRING,       &ldi.empty_level_name,  "empty_level_name"      },
   { TYPE_BOOLEAN,      &ldi.force_level_name,  "force_level_name"      },
   { TYPE_BOOLEAN,      &ldi.handicap,          "handicap"              },
+  { TYPE_BOOLEAN,      &ldi.time_limit,        "time_limit"            },
   { TYPE_BOOLEAN,      &ldi.skip_levels,       "skip_levels"           },
   { TYPE_BOOLEAN,      &ldi.use_emc_tiles,     "use_emc_tiles"         }
 };
@@ -2876,6 +2861,7 @@ static void setTreeInfoToDefaults(TreeInfo *ti, int type)
     ti->handicap_level = 0;
     ti->readonly = TRUE;
     ti->handicap = TRUE;
+    ti->time_limit = TRUE;
     ti->skip_levels = FALSE;
 
     ti->use_emc_tiles = FALSE;
@@ -2961,6 +2947,7 @@ static void setTreeInfoToDefaultsFromParent(TreeInfo *ti, TreeInfo *parent)
     ti->handicap_level = parent->handicap_level;
     ti->readonly = parent->readonly;
     ti->handicap = parent->handicap;
+    ti->time_limit = parent->time_limit;
     ti->skip_levels = parent->skip_levels;
 
     ti->use_emc_tiles = parent->use_emc_tiles;
@@ -3033,6 +3020,7 @@ static TreeInfo *getTreeInfoCopy(TreeInfo *ti)
   ti_copy->user_defined                = ti->user_defined;
   ti_copy->readonly            = ti->readonly;
   ti_copy->handicap            = ti->handicap;
+  ti_copy->time_limit          = ti->time_limit;
   ti_copy->skip_levels         = ti->skip_levels;
 
   ti_copy->use_emc_tiles       = ti->use_emc_tiles;