Sprite::SongBGTexture, Sprite::SongBannerTexture (replacing Banner::BannerTex)

This commit is contained in:
Glenn Maynard
2004-03-26 07:50:33 +00:00
parent a2eb502312
commit f353bd3206
2 changed files with 27 additions and 2 deletions
+21 -2
View File
@@ -47,12 +47,31 @@ Sprite::~Sprite()
UnloadTexture();
}
bool Sprite::LoadBG( RageTextureID ID )
RageTextureID Sprite::SongBGTexture( RageTextureID ID )
{
ID.bMipMaps = true;
/* Song backgrounds are, by definition, in the background, so there's no need to keep alpha. */
ID.iAlphaBits = 0;
// Don't we want to dither 16 bit textures at least?
// ID.bDither = true;
return Load(ID);
return ID;
}
RageTextureID Sprite::SongBannerTexture( RageTextureID ID )
{
/* Song banners often have HOT PINK color keys. */
ID.bHotPinkColorKey = true;
ID.bDither = true;
return ID;
}
/* deprecated */
bool Sprite::LoadBG( RageTextureID ID )
{
return Load( SongBGTexture(ID) );
}
bool Sprite::Load( RageTextureID ID )
+6
View File
@@ -29,6 +29,12 @@ public:
virtual void Update( float fDeltaTime );
void UpdateAnimationState(); // take m_fSecondsIntoState, and move to a new state
/* Adjust texture properties for song backgrounds. */
static RageTextureID SongBGTexture( RageTextureID ID );
/* Adjust texture properties for song banners. */
static RageTextureID SongBannerTexture( RageTextureID ID );
/* Just a convenience function; load an image that'll be used in the
* background. */
virtual bool LoadBG( RageTextureID ID );