From: Holger Schemel Date: Fri, 17 Feb 2017 22:09:09 +0000 (+0100) Subject: added support for Mirror Magic levels if filetype is explicitly specified X-Git-Tag: 4.1.0.0~222 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=5fc33cfa31a8fa018257286518b8f341fcd749ec;p=rocksndiamonds.git added support for Mirror Magic levels if filetype is explicitly specified --- diff --git a/src/files.c b/src/files.c index ebb61203..4cc80656 100644 --- a/src/files.c +++ b/src/files.c @@ -1319,6 +1319,8 @@ filetype_id_list[] = { LEVEL_FILE_TYPE_DX, "DX" }, { LEVEL_FILE_TYPE_SB, "SB" }, { LEVEL_FILE_TYPE_DC, "DC" }, + { LEVEL_FILE_TYPE_MM, "MM" }, + { LEVEL_FILE_TYPE_MM, "DF" }, { -1, NULL }, }; @@ -2120,6 +2122,16 @@ static void determineLevelFileInfo_Filename(struct LevelFileInfo *lfi) if (fileExists(lfi->filename)) return; } + else if (leveldir_current->level_filetype != NULL) + { + int filetype = getFiletypeFromID(leveldir_current->level_filetype); + + /* check for specified native level file with standard file name */ + setLevelFileInfo_FormatLevelFilename(lfi, filetype, + "%03d.%s", nr, LEVELFILE_EXTENSION); + if (fileExists(lfi->filename)) + return; + } /* check for native Rocks'n'Diamonds level file */ setLevelFileInfo_FormatLevelFilename(lfi, LEVEL_FILE_TYPE_RND,