From: DeaDDooMER Date: Wed, 16 Jan 2019 14:41:40 +0000 (+0300) Subject: Added .dfz extension X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=740d7afa7f55039dd9da808af96e18e0490c3307;p=d2df-sdl.git Added .dfz extension --- diff --git a/src/game/g_menu.pas b/src/game/g_menu.pas index 6265eeb..1b33864 100644 --- a/src/game/g_menu.pas +++ b/src/game/g_menu.pas @@ -2369,7 +2369,7 @@ begin Sort := True; Dirs := True; - FileMask := '*.wad|*.pk3|*.zip'; + FileMask := '*.wad|*.pk3|*.zip|*.dfz'; SetBase(MapsDir+'megawads/'); end; @@ -2424,7 +2424,7 @@ begin Sort := True; Dirs := True; - FileMask := '*.wad|*.pk3|*.zip'; + FileMask := '*.wad|*.pk3|*.zip|*.dfz'; SetBase(MapsDir); end; with AddList(_lc[I_MENU_MAP_RESOURCE], 12, 4) do diff --git a/src/sfs/sfsZipFS.pas b/src/sfs/sfsZipFS.pas index 2cc9eff..e5e9968 100644 --- a/src/sfs/sfsZipFS.pas +++ b/src/sfs/sfsZipFS.pas @@ -417,6 +417,7 @@ begin result := StrEquCI1251(prefix, 'zip') or StrEquCI1251(prefix, 'pk3') or + StrEquCI1251(prefix, 'dfz') or StrEquCI1251(prefix, 'dfwad') or StrEquCI1251(prefix, 'dfzip'); end; diff --git a/src/shared/utils.pas b/src/shared/utils.pas index 09c0354..1600605 100644 --- a/src/shared/utils.pas +++ b/src/shared/utils.pas @@ -813,7 +813,7 @@ var ext: AnsiString; begin ext := getFilenameExt(fn); - result := StrEquCI1251(ext, '.wad') or StrEquCI1251(ext, '.pk3') or StrEquCI1251(ext, '.zip'); + result := StrEquCI1251(ext, '.wad') or StrEquCI1251(ext, '.pk3') or StrEquCI1251(ext, '.zip') or StrEquCI1251(ext, '.dfz'); end; @@ -839,7 +839,7 @@ begin if (pos-4 > 1) and (fn[pos-4] = '.') and ((fn[pos+1] = '\') or (fn[pos+1] = '/')) then begin s := Copy(fn, pos-4, 4); - if StrEquCI1251(s, '.wad') or StrEquCI1251(s, '.pk3') or StrEquCI1251(s, '.zip') then + if StrEquCI1251(s, '.wad') or StrEquCI1251(s, '.pk3') or StrEquCI1251(s, '.zip') or StrEquCI1251(s, '.dfz') then begin result := true; exit; @@ -1129,7 +1129,7 @@ begin end; -const fileExtensions: array [0..5] of AnsiString = ('.wad', '.dfzip', '.dfwad', '.pk3', '.pak', '.zip'); +const fileExtensions: array [0..6] of AnsiString = ('.wad', '.dfzip', '.dfwad', '.pk3', '.pak', '.zip', '.dfz'); function findDiskWad (fname: AnsiString): AnsiString; var