Browse Source

filesystem: implement .pk3dir convention

pull/2/head
Alibek Omarov 2 years ago
parent
commit
58df771c9e
  1. 7
      filesystem/filesystem.c
  2. 3
      filesystem/filesystem_internal.h

7
filesystem/filesystem.c

@ -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 // so raw WADs takes precedence over WADs included into PAKs and PK3s
const fs_archive_t g_archives[] = const fs_archive_t g_archives[] =
{ {
{ "pak", SEARCHPATH_PAK, FS_AddPak_Fullpath, true }, { "pak", SEARCHPATH_PAK, FS_AddPak_Fullpath, true },
{ "pk3", SEARCHPATH_ZIP, FS_AddZip_Fullpath, true }, { "pk3", SEARCHPATH_ZIP, FS_AddZip_Fullpath, true },
{ "wad", SEARCHPATH_WAD, FS_AddWad_Fullpath, false }, { "pk3dir", SEARCHPATH_PK3DIR, FS_AddDir_Fullpath, true },
{ "wad", SEARCHPATH_WAD, FS_AddWad_Fullpath, false },
{ NULL }, // end marker { NULL }, // end marker
}; };

3
filesystem/filesystem_internal.h

@ -57,7 +57,8 @@ enum
SEARCHPATH_PLAIN = 0, SEARCHPATH_PLAIN = 0,
SEARCHPATH_PAK, SEARCHPATH_PAK,
SEARCHPATH_WAD, 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 typedef struct stringlist_s

Loading…
Cancel
Save