#include "global.h" #include "RageTextureID.h" #include "RageTextureManager.h" #include "RageUtil.h" void RageTextureID::Init() { iMaxSize = 2048; bMipMaps = false; // Most sprites (especially text) look worse with mip maps iAlphaBits = 4; iGrayscaleBits = -1; bDither = false; bStretch = false; iColorDepth = -1; /* default */ bHotPinkColorKey = false; AdditionalTextureHints = ""; Policy = TEXTUREMAN->GetDefaultTexturePolicy(); } bool RageTextureID::operator<(const RageTextureID &rhs) const { #define COMP(a) if(arhs.a) return false; COMP(filename); COMP(iMaxSize); COMP(bMipMaps); COMP(iAlphaBits); COMP(iGrayscaleBits); COMP(iColorDepth); COMP(bDither); COMP(bStretch); COMP(bHotPinkColorKey); COMP(AdditionalTextureHints); // COMP(Policy); // don't do this #undef COMP return false; } bool RageTextureID::operator==(const RageTextureID &rhs) const { #define EQUAL(a) (a==rhs.a) return EQUAL(filename) && EQUAL(iMaxSize) && EQUAL(bMipMaps) && EQUAL(iAlphaBits) && EQUAL(iGrayscaleBits) && EQUAL(iColorDepth) && EQUAL(bDither) && EQUAL(bStretch) && EQUAL(bHotPinkColorKey) && EQUAL(AdditionalTextureHints); // EQUAL(Policy); // don't do this } void RageTextureID::SetFilename( const CString &fn ) { filename = fn; CollapsePath( filename ); }