engine: imagelib: add LUMP_TEXGAMMA palette kind to only pass HL textures through texgamma, not Quake

This commit is contained in:
Alibek Omarov
2024-07-19 06:34:48 +03:00
parent 42a915b04a
commit 85dfaaa2c2
3 changed files with 30 additions and 10 deletions

View File

@@ -427,8 +427,18 @@ qboolean Image_LoadMIP( const char *name, const byte *buffer, fs_offset_t filesi
}
if( pal_type == PAL_QUAKE1 )
{
SetBits( image.flags, IMAGE_QUAKEPAL );
rendermode = LUMP_NORMAL;
// if texture was converted from quake to half-life with no palette changes
// then applying texgamma might make it too dark or even outright broken
rendermode = LUMP_NORMAL;
}
else
{
// half-life mips need texgamma applied
rendermode = LUMP_TEXGAMMA;
}
}
Image_GetPaletteLMP( pal, rendermode );