Switch to miniz from zlib

This commit is contained in:
Cacodemon345 2023-09-17 13:48:39 +02:00 committed by Christoph Oelckers
commit ba9ce0e83f
54 changed files with 9285 additions and 24321 deletions

View file

@ -25,6 +25,7 @@
** General model handling code
**
**/
#include <stddef.h> // offsetof() macro.
#include "filesystem.h"
#include "cmdlib.h"
@ -132,17 +133,7 @@ FTextureID LoadSkin(const char * path, const char * fn)
int ModelFrameHash(FSpriteModelFrame * smf)
{
const uint32_t *table = GetCRCTable ();
uint32_t hash = 0xffffffff;
const char * s = (const char *)(&smf->type); // this uses type, sprite and frame for hashing
const char * se= (const char *)(&smf->hashnext);
for (; s<se; s++)
{
hash = CRC1 (hash, *s, table);
}
return hash ^ 0xffffffff;
return crc32(0, (const unsigned char *)(&smf->type), offsetof(FSpriteModelFrame, hashnext) - offsetof(FSpriteModelFrame, type));
}
//===========================================================================