From a73a86f63e18d87806bfd1f58f0bf0ca352f67c5 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 8 Oct 2003 02:19:59 +0000 Subject: [PATCH] add iGrayscaleBits --- stepmania/src/RageTexture.cpp | 12 ++++++++++++ stepmania/src/RageTexture.h | 1 + 2 files changed, 13 insertions(+) diff --git a/stepmania/src/RageTexture.cpp b/stepmania/src/RageTexture.cpp index 7c815bf09e..62bd42e0dd 100644 --- a/stepmania/src/RageTexture.cpp +++ b/stepmania/src/RageTexture.cpp @@ -26,6 +26,16 @@ void RageTextureID::Init() * this gives more bits for color values. (0, 1 or 4) */ iAlphaBits = 4; + /* If this is greater than -1, then the image will be loaded as a luma/alpha + * map, eg. I4A4. At most 8 bits per pixel will be used This only actually happens + * when paletted textures are supported. + * + * If the sum of alpha and grayscale bits is <= 4, and the system supports 4-bit + * palettes, then the image will be loaded with 4bpp. + * + * This may be set to 0, resulting in an alpha map with all pixels white. */ + iGrayscaleBits = -1; + /* If true and color precision is being lost, dither. (slow) */ bDither = false; /* If true, resize the image to fill the internal texture. (slow) */ @@ -47,6 +57,7 @@ bool RageTextureID::operator<(const RageTextureID &rhs) const COMP(iMaxSize); COMP(iMipMaps); COMP(iAlphaBits); + COMP(iGrayscaleBits); COMP(iColorDepth); COMP(bDither); COMP(bStretch); @@ -63,6 +74,7 @@ bool RageTextureID::operator==(const RageTextureID &rhs) const EQUAL(iMaxSize) && EQUAL(iMipMaps) && EQUAL(iAlphaBits) && + EQUAL(iGrayscaleBits) && EQUAL(iColorDepth) && EQUAL(bDither) && EQUAL(bStretch) && diff --git a/stepmania/src/RageTexture.h b/stepmania/src/RageTexture.h index fc98bd4de1..0e9d2754ad 100644 --- a/stepmania/src/RageTexture.h +++ b/stepmania/src/RageTexture.h @@ -25,6 +25,7 @@ struct RageTextureID int iMaxSize; int iMipMaps; int iAlphaBits; + int iGrayscaleBits; int iColorDepth; bool bDither; bool bStretch;