summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2c514f6)
raw | patch | inline | side by side (parent: 2c514f6)
author | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Fri, 8 Apr 2016 02:54:19 +0000 (05:54 +0300) | ||
committer | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Fri, 8 Apr 2016 03:22:04 +0000 (06:22 +0300) |
src/game/g_gui.pas | patch | blob | history | |
src/game/g_menu.pas | patch | blob | history | |
src/shared/WADEDITOR.pas | patch | blob | history |
diff --git a/src/game/g_gui.pas b/src/game/g_gui.pas
index 2f9bc08380d79cf1ba7447ce1800a727463e3ec4..899b35445dd9271ff7f88748e12a9184cb04aa4e 100644 (file)
--- a/src/game/g_gui.pas
+++ b/src/game/g_gui.pas
var
SR: TSearchRec;
i: Integer;
+ sm, sc: string;
begin
Clear();
path := IncludeTrailingPathDelimiter(path);
path := ExpandFileName(path);
-// Êàòàëîãè:
+ // Êàòàëîãè:
if FDirs then
begin
if FindFirst(path+'*', faDirectory, SR) = 0 then
FindClose(SR);
end;
-// Ôàéëû:
- if FindFirst(path+FFileMask, faAnyFile, SR) = 0 then
- repeat
- AddItem(SR.Name);
- until FindNext(SR) <> 0;
- FindClose(SR);
-
- //FIXME: HACK!
- if FFileMask = '*.wad' then
+ // Ôàéëû:
+ sm := FFileMask;
+ while sm <> '' do
begin
- if FindFirst(path+'*.pk3', faAnyFile, SR) = 0 then
- repeat
- AddItem(SR.Name);
- until FindNext(SR) <> 0;
+ i := Pos('|', sm);
+ if i = 0 then i := length(sm);
+ sc := Copy(sm, 1, i-1);
+ Delete(sm, 1, i);;
+ if FindFirst(path+sc, faAnyFile, SR) = 0 then repeat AddItem(SR.Name); until FindNext(SR) <> 0;
FindClose(SR);
end;
diff --git a/src/game/g_menu.pas b/src/game/g_menu.pas
index 89d264f99ebba21b2629ae0f3a137165c7a6d71a..f2abfb72daf04ca688986d1f544f18fbbae5e076 100644 (file)
--- a/src/game/g_menu.pas
+++ b/src/game/g_menu.pas
Sort := True;
Dirs := True;
- FileMask := '*.wad';
+ FileMask := '*.wad|*.pk3|*.zip';
SetBase(MapsDir+'megawads/');
end;
Sort := True;
Dirs := True;
- FileMask := '*.wad';
+ FileMask := '*.wad|*.pk3|*.zip';
SetBase(MapsDir);
end;
with AddList(_lc[I_MENU_MAP_RESOURCE], 12, 4) do
index 54706cfd2df180486d587038f6976070945d732c..c9af0bd7fd68617801c85d2caaf6310ed83bf2bb 100644 (file)
--- a/src/shared/WADEDITOR.pas
+++ b/src/shared/WADEDITOR.pas
begin
rfn := Copy(rfn, 1, length(rfn)-4);
if FileExists(rfn+'.pk3') then rfn := rfn+'.pk3'
- //else if FileExists(rfn+'.zip') then rfn := rfn+'.zip'
+ else if FileExists(rfn+'.zip') then rfn := rfn+'.zip'
else rfn := FileName;
{.$IFDEF SFS_DWFAD_DEBUG}
if gSFSDebug then