fix and simplify

This commit is contained in:
Glenn Maynard
2003-02-12 22:32:04 +00:00
parent 68f4bf1f31
commit f5fed3e23d
3 changed files with 22 additions and 23 deletions
+18 -10
View File
@@ -25,17 +25,25 @@ void RageTextureID::Init()
bHotPinkColorKey = false;
}
bool RageTextureID::equal(const RageTextureID &rhs) const
bool RageTextureID::operator<(const RageTextureID &rhs) const
{
if(filename != rhs.filename) return false;
if(iMaxSize != rhs.iMaxSize) return false;
if(iMipMaps != rhs.iMipMaps) return false;
if(iAlphaBits != rhs.iAlphaBits) return false;
if(iColorDepth != rhs.iColorDepth) return false;
if(bDither != rhs.bDither) return false;
if(bStretch != rhs.bStretch) return false;
if(bHotPinkColorKey != rhs.bHotPinkColorKey) return false;
return true;
if(filename < rhs.filename) return true;
if(filename > rhs.filename) return false;
if(iMaxSize < rhs.iMaxSize) return true;
if(iMaxSize > rhs.iMaxSize) return false;
if(iMipMaps < rhs.iMipMaps) return true;
if(iMipMaps > rhs.iMipMaps) return false;
if(iAlphaBits < rhs.iAlphaBits) return true;
if(iAlphaBits > rhs.iAlphaBits) return false;
if(iColorDepth < rhs.iColorDepth) return true;
if(iColorDepth > rhs.iColorDepth) return false;
if(bDither < rhs.bDither) return true;
if(bDither > rhs.bDither) return false;
if(bStretch < rhs.bStretch) return true;
if(bStretch > rhs.bStretch) return false;
if(bHotPinkColorKey < rhs.bHotPinkColorKey) return true;
if(bHotPinkColorKey > rhs.bHotPinkColorKey) return false;
return false;
}