1
0
Fork 0
forked from fte/fteqw

Fixes halflife sprites on big-endian machines.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2185 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2006-04-09 15:35:50 +00:00
parent fa471eb239
commit d71040af7a

View file

@ -3013,7 +3013,7 @@ qboolean GLMod_LoadSpriteModel (model_t *mod, void *buffer)
sptype = LittleLong (pin->type);
if (pin->version == SPRITEHL_VERSION)
if (LittleLong(pin->version) == SPRITEHL_VERSION)
{
pin = (dsprite_t*)((char*)pin + 4);
rendertype = LittleLong (pin->type);
@ -3044,7 +3044,7 @@ qboolean GLMod_LoadSpriteModel (model_t *mod, void *buffer)
int i;
short *numi = (short*)(pin+1);
unsigned char *src = (unsigned char *)(numi+1);
if (*numi != 256)
if (LittleShort(*numi) != 256)
{
Con_Printf(S_ERROR "%s has wrong number of palette indexes (we only support 256)\n", mod->name);
Hunk_FreeToLowMark(hunkstart);