From fab747c1ae8448f95d65bf8e3ecc1799427709fe Mon Sep 17 00:00:00 2001 From: sezero Date: Wed, 28 Mar 2012 17:50:47 +0000 Subject: [PATCH] Added file count and header crc macros for id1/pak0.pak v1.00 and v1.01 so that the corresponding shareware versions actually work properly and not error out. git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@654 af15c1b1-3010-417e-b628-4374ebc0bcbd --- quakespasm/Quake/common.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/quakespasm/Quake/common.c b/quakespasm/Quake/common.c index f486b770..4bf76937 100644 --- a/quakespasm/Quake/common.c +++ b/quakespasm/Quake/common.c @@ -40,8 +40,13 @@ qboolean fitzmode; static void COM_Path_f (void); // if a packfile directory differs from this, it is assumed to be hacked -#define PAK0_COUNT 339 -#define PAK0_CRC 32981 +#define PAK0_COUNT 339 /* id1/pak0.pak - v1.0x */ +#define PAK0_CRC_V100 13900 /* id1/pak0.pak - v1.00 */ +#define PAK0_CRC_V101 62751 /* id1/pak0.pak - v1.01 */ +#define PAK0_CRC_V106 32981 /* id1/pak0.pak - v1.06 */ +#define PAK0_CRC (PAK0_CRC_V106) +#define PAK0_COUNT_V091 308 /* id1/pak0.pak - v0.91/0.92, not supported */ +#define PAK0_CRC_V091 28804 /* id1/pak0.pak - v0.91/0.92, not supported */ char com_token[1024]; int com_argc; @@ -1818,7 +1823,7 @@ pack_t *COM_LoadPackFile (const char *packfile) CRC_Init (&crc); for (i = 0; i < header.dirlen; i++) CRC_ProcessByte (&crc, ((byte *)info)[i]); - if (crc != PAK0_CRC) + if (crc != PAK0_CRC_V106 && crc != PAK0_CRC_V101 && crc != PAK0_CRC_V100) com_modified = true; // parse the directory