#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
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 = "# ";
#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;
{ 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" }
};
ti->handicap_level = 0;
ti->readonly = TRUE;
ti->handicap = TRUE;
+ ti->time_limit = TRUE;
ti->skip_levels = FALSE;
ti->use_emc_tiles = FALSE;
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;
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;
level_directory, ".");
}
- if (!valid_entry_found)
+ boolean valid_entry_expected =
+ (strEqual(level_directory, options.level_directory) ||
+ setup.internal.create_user_levelset);
+
+ if (valid_entry_expected && !valid_entry_found)
Warn("cannot find any valid level series in directory '%s'",
- level_directory);
+ level_directory);
}
boolean AdjustGraphicsForEMC(void)