simplify a little, comment
This commit is contained in:
@@ -211,11 +211,14 @@ void RageBitmapTexture::Create()
|
|||||||
default:
|
default:
|
||||||
RageException::Throw( "Invalid color depth: %d bits", actualID.iColorDepth );
|
RageException::Throw( "Invalid color depth: %d bits", actualID.iColorDepth );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* It's either not a paletted image, or we can't handle paletted textures.
|
/* Dither if appropriate. XXX: This is a special case: don't bother dithering to
|
||||||
* Convert to the desired RGBA format, dithering if appropriate. */
|
* RGBA8888. We actually want to dither only if the destination has greater color
|
||||||
|
* depth on at least one color channel than the source. For example, it doesn't
|
||||||
|
* make sense to do this when pixfmt is RGBA5551 if the image is only RGBA555. */
|
||||||
if( actualID.bDither &&
|
if( actualID.bDither &&
|
||||||
(pixfmt==RageDisplay::FMT_RGBA4 || pixfmt==RageDisplay::FMT_RGB5A1) ) /* Don't dither if format is 32bpp; there's no point. */
|
(pixfmt==RageDisplay::FMT_RGBA4 || pixfmt==RageDisplay::FMT_RGB5A1) )
|
||||||
{
|
{
|
||||||
/* Dither down to the destination format. */
|
/* Dither down to the destination format. */
|
||||||
const RageDisplay::PixelFormatDesc *pfd = DISPLAY->GetPixelFormatDesc(pixfmt);
|
const RageDisplay::PixelFormatDesc *pfd = DISPLAY->GetPixelFormatDesc(pixfmt);
|
||||||
@@ -226,7 +229,6 @@ void RageBitmapTexture::Create()
|
|||||||
delete img;
|
delete img;
|
||||||
img = dst;
|
img = dst;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* This needs to be done *after* the final resize, since that resize
|
/* This needs to be done *after* the final resize, since that resize
|
||||||
* may introduce new alpha bits that need to be set. It needs to be
|
* may introduce new alpha bits that need to be set. It needs to be
|
||||||
|
|||||||
Reference in New Issue
Block a user