mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 22:51:57 +00:00
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:
parent
fa471eb239
commit
d71040af7a
1 changed files with 2 additions and 2 deletions
|
@ -3013,7 +3013,7 @@ qboolean GLMod_LoadSpriteModel (model_t *mod, void *buffer)
|
||||||
|
|
||||||
sptype = LittleLong (pin->type);
|
sptype = LittleLong (pin->type);
|
||||||
|
|
||||||
if (pin->version == SPRITEHL_VERSION)
|
if (LittleLong(pin->version) == SPRITEHL_VERSION)
|
||||||
{
|
{
|
||||||
pin = (dsprite_t*)((char*)pin + 4);
|
pin = (dsprite_t*)((char*)pin + 4);
|
||||||
rendertype = LittleLong (pin->type);
|
rendertype = LittleLong (pin->type);
|
||||||
|
@ -3044,7 +3044,7 @@ qboolean GLMod_LoadSpriteModel (model_t *mod, void *buffer)
|
||||||
int i;
|
int i;
|
||||||
short *numi = (short*)(pin+1);
|
short *numi = (short*)(pin+1);
|
||||||
unsigned char *src = (unsigned char *)(numi+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);
|
Con_Printf(S_ERROR "%s has wrong number of palette indexes (we only support 256)\n", mod->name);
|
||||||
Hunk_FreeToLowMark(hunkstart);
|
Hunk_FreeToLowMark(hunkstart);
|
||||||
|
|
Loading…
Reference in a new issue