1
0
Fork 0
forked from fte/fteqw

Support for HL SPR's INDEXALPHA blend type.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5754 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Eukara 2020-09-05 18:58:12 +00:00
parent 64fb49e908
commit 42d810b320

View file

@ -5949,8 +5949,14 @@ qboolean QDECL Mod_LoadSpriteModel (model_t *mod, void *buffer, size_t fsize)
if (rendertype == SPRHL_INDEXALPHA)
{
Con_Printf(CON_ERROR "%s: SPRHL_INDEXALPHA sprites are not supported\n", mod->name);
return false;
/* alpha value is equivalent to palette index - eukara */
for (i = 0; i < 256; i++)
{
pal[i*4+0] = *src++;
pal[i*4+1] = *src++;
pal[i*4+2] = *src++;
pal[i*4+3] = i;
}
}
else
{