Skip to content

Commit

Permalink
filesystem: implement .pk3dir convention
Browse files Browse the repository at this point in the history
  • Loading branch information
a1batross committed Jun 8, 2023
1 parent a6ecc77 commit 58df771
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions filesystem/filesystem.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@ static char fs_gamedir[MAX_SYSPATH]; // game current directory
// so raw WADs takes precedence over WADs included into PAKs and PK3s
const fs_archive_t g_archives[] =
{
{ "pak", SEARCHPATH_PAK, FS_AddPak_Fullpath, true },
{ "pk3", SEARCHPATH_ZIP, FS_AddZip_Fullpath, true },
{ "wad", SEARCHPATH_WAD, FS_AddWad_Fullpath, false },
{ "pak", SEARCHPATH_PAK, FS_AddPak_Fullpath, true },
{ "pk3", SEARCHPATH_ZIP, FS_AddZip_Fullpath, true },
{ "pk3dir", SEARCHPATH_PK3DIR, FS_AddDir_Fullpath, true },
{ "wad", SEARCHPATH_WAD, FS_AddWad_Fullpath, false },
{ NULL }, // end marker
};

Expand Down
3 changes: 2 additions & 1 deletion filesystem/filesystem_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ enum
SEARCHPATH_PLAIN = 0,
SEARCHPATH_PAK,
SEARCHPATH_WAD,
SEARCHPATH_ZIP
SEARCHPATH_ZIP,
SEARCHPATH_PK3DIR, // it's actually a plain directory but it must behave like a ZIP archive
};

typedef struct stringlist_s
Expand Down

0 comments on commit 58df771

Please sign in to comment.