Browse Source

engine: imagelib: img_wad: dirty hack to fix black holes in console background images

pull/2/head
Alibek Omarov 2 years ago
parent
commit
ea3bfd969c
  1. 14
      engine/common/imagelib/img_wad.c

14
engine/common/imagelib/img_wad.c

@ -311,13 +311,17 @@ qboolean Image_LoadLMP( const char *name, const byte *buffer, fs_offset_t filesi @@ -311,13 +311,17 @@ qboolean Image_LoadLMP( const char *name, const byte *buffer, fs_offset_t filesi
{
int numcolors;
for( i = 0; i < pixels; i++ )
// HACKHACK: console background image shouldn't be transparent
if( !Q_stristr( name, "conback" ))
{
if( fin[i] == 255 )
for( i = 0; i < pixels; i++ )
{
image.flags |= IMAGE_HAS_ALPHA;
rendermode = LUMP_MASKED;
break;
if( fin[i] == 255 )
{
image.flags |= IMAGE_HAS_ALPHA;
rendermode = LUMP_MASKED;
break;
}
}
}
pal = fin + pixels;

Loading…
Cancel
Save