mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-04-24 02:32:18 +00:00
Fixed alpha decompression of Flash atlas .bimage files
This commit is contained in:
parent
1639c37ca5
commit
22cc10123c
1 changed files with 3 additions and 22 deletions
|
@ -248,35 +248,16 @@ idSWF::idSWF( const char* filename_, idSoundWorld* soundWorld_, bool exportJSON,
|
|||
{
|
||||
idDxtDecoder dxt;
|
||||
|
||||
if( imgHeader.colorFormat == CFM_NORMAL_DXT5 )
|
||||
{
|
||||
dxt.DecompressNormalMapDXT5( data, rgba.Ptr(), dxtWidth, dxtHeight );
|
||||
|
||||
for( int i = 0; i < ( dxtWidth * dxtHeight ); i++ )
|
||||
{
|
||||
rgba[i * 4 + 3] = 255;
|
||||
}
|
||||
}
|
||||
/*
|
||||
else if( imgHeader.colorFormat == CFM_YCOCG_DXT5 )
|
||||
{
|
||||
dxt.DecompressYCoCgDXT5( data, rgba.Ptr(), dxtWidth, dxtHeight );
|
||||
idColorSpace::ConvertCoCg_YToRGB( rgba.Ptr(), rgba.Ptr(), dxtWidth, dxtHeight );
|
||||
|
||||
for( int i = 0; i < ( dxtWidth * dxtHeight ); i++ )
|
||||
{
|
||||
rgba[i * 4 + 3] = 255;
|
||||
}
|
||||
}
|
||||
*/
|
||||
else
|
||||
if( imgHeader.colorFormat == CFM_DEFAULT )
|
||||
{
|
||||
dxt.DecompressImageDXT5( data, rgba.Ptr(), dxtWidth, dxtHeight );
|
||||
|
||||
/*
|
||||
for( int i = 0; i < ( dxtWidth * dxtHeight ); i++ )
|
||||
{
|
||||
rgba[i * 4 + 3] = 255;
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
else if( imgHeader.format == FMT_LUM8 || imgHeader.format == FMT_INT8 )
|
||||
|
|
Loading…
Reference in a new issue