mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-03 06:20:57 +00:00
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://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@654 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
f6eb41b50c
commit
2e78f9c684
1 changed files with 8 additions and 3 deletions
|
@ -40,8 +40,13 @@ qboolean fitzmode;
|
||||||
static void COM_Path_f (void);
|
static void COM_Path_f (void);
|
||||||
|
|
||||||
// if a packfile directory differs from this, it is assumed to be hacked
|
// if a packfile directory differs from this, it is assumed to be hacked
|
||||||
#define PAK0_COUNT 339
|
#define PAK0_COUNT 339 /* id1/pak0.pak - v1.0x */
|
||||||
#define PAK0_CRC 32981
|
#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];
|
char com_token[1024];
|
||||||
int com_argc;
|
int com_argc;
|
||||||
|
@ -1818,7 +1823,7 @@ pack_t *COM_LoadPackFile (const char *packfile)
|
||||||
CRC_Init (&crc);
|
CRC_Init (&crc);
|
||||||
for (i = 0; i < header.dirlen; i++)
|
for (i = 0; i < header.dirlen; i++)
|
||||||
CRC_ProcessByte (&crc, ((byte *)info)[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;
|
com_modified = true;
|
||||||
|
|
||||||
// parse the directory
|
// parse the directory
|
||||||
|
|
Loading…
Reference in a new issue