From 5c59f785a10d2dc57263b55de777b205c1ed54ed Mon Sep 17 00:00:00 2001 From: terminx Date: Wed, 12 Dec 2012 02:53:10 +0000 Subject: [PATCH] Recognize the .pk4 file extension when loading grps and zips for shits and giggles (.pk3 was already recognized). git-svn-id: https://svn.eduke32.com/eduke32@3269 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/common.c | 6 +++--- polymer/eduke32/source/game.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/polymer/eduke32/source/common.c b/polymer/eduke32/source/common.c index 7e4bca62d..4ac4b7e71 100644 --- a/polymer/eduke32/source/common.c +++ b/polymer/eduke32/source/common.c @@ -326,17 +326,17 @@ int32_t fnlist_getnames(fnlist_t *fnl, const char *dirname, const char *pattern, } -// loads all group (grp, zip, pk3) files in the given directory +// loads all group (grp, zip, pk3/4) files in the given directory void G_LoadGroupsInDir(const char *dirname) { - static const char *extensions[3] = { "*.grp", "*.zip", "*.pk3" }; + static const char *extensions[4] = { "*.grp", "*.zip", "*.pk3", "*.pk4" }; char buf[BMAX_PATH]; int32_t i; fnlist_t fnlist = FNLIST_INITIALIZER; - for (i=0; i<3; i++) + for (i=0; i<4; i++) { CACHE1D_FIND_REC *rec; diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index f431e716d..46b1fb71a 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -9195,7 +9195,7 @@ static void G_CheckCommandLine(int32_t argc, const char **argv) CommandMap = argv[i++]; continue; } - if (!Bstrcasecmp(k,".grp") || !Bstrcasecmp(k,".zip") || !Bstrcasecmp(k,".pk3")) + if (!Bstrcasecmp(k,".grp") || !Bstrcasecmp(k,".zip") || !Bstrcasecmp(k,".pk3") || !Bstrcasecmp(k,".pk4")) { G_AddGroup(argv[i++]); continue;