From: Holger Schemel Date: Tue, 15 Jan 2019 20:44:33 +0000 (+0100) Subject: re-added some removed (deactivated) code (to be evaluated again) X-Git-Tag: 4.1.2.0~49 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=76676f82b8ee50fd5704096d7102498878c755cf;p=rocksndiamonds.git re-added some removed (deactivated) code (to be evaluated again) --- diff --git a/src/libgame/setup.c b/src/libgame/setup.c index 69eecdb5..4d1a8fd0 100644 --- a/src/libgame/setup.c +++ b/src/libgame/setup.c @@ -4332,6 +4332,9 @@ static void checkSeriesInfo(void) { static char *level_directory = NULL; Directory *dir; +#if 0 + DirectoryEntry *dir_entry; +#endif // check for more levels besides the 'levels' field of 'levelinfo.conf' @@ -4347,6 +4350,35 @@ static void checkSeriesInfo(void) return; } +#if 0 + while ((dir_entry = readDirectory(dir)) != NULL) // loop all entries + { + if (strlen(dir_entry->basename) > 4 && + dir_entry->basename[3] == '.' && + strEqual(&dir_entry->basename[4], LEVELFILE_EXTENSION)) + { + char levelnum_str[4]; + int levelnum_value; + + strncpy(levelnum_str, dir_entry->basename, 3); + levelnum_str[3] = '\0'; + + levelnum_value = atoi(levelnum_str); + + if (levelnum_value < leveldir_current->first_level) + { + Error(ERR_WARN, "additional level %d found", levelnum_value); + leveldir_current->first_level = levelnum_value; + } + else if (levelnum_value > leveldir_current->last_level) + { + Error(ERR_WARN, "additional level %d found", levelnum_value); + leveldir_current->last_level = levelnum_value; + } + } + } +#endif + closeDirectory(dir); }