pass prefs down to RageBitmapTexture

This commit is contained in:
Glenn Maynard
2002-11-20 01:24:36 +00:00
parent 0aff47c6d9
commit 29c726053c
4 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -38,7 +38,7 @@ Font::Font( const CString &sASCIITexturePath )
// load texture // load texture
m_sTexturePath = sASCIITexturePath; m_sTexturePath = sASCIITexturePath;
m_sTexturePath.MakeLower(); m_sTexturePath.MakeLower();
m_pTexture = TEXTUREMAN->LoadTexture( m_sTexturePath ); m_pTexture = TEXTUREMAN->LoadTexture( m_sTexturePath, RageTexturePrefs() );
ASSERT( m_pTexture != NULL ); ASSERT( m_pTexture != NULL );
if( m_pTexture->GetNumFrames() != 16*16 ) if( m_pTexture->GetNumFrames() != 16*16 )
throw RageException( "The font '%s' has only %d frames. All fonts must have 16*16 frames.", m_sTexturePath.GetString() ); throw RageException( "The font '%s' has only %d frames. All fonts must have 16*16 frames.", m_sTexturePath.GetString() );
@@ -115,7 +115,7 @@ Font::Font( const CString &sTexturePath, const CString& sCharacters )
m_sTexturePath.MakeLower(); m_sTexturePath.MakeLower();
m_pTexture = TEXTUREMAN->LoadTexture( m_sTexturePath ); m_pTexture = TEXTUREMAN->LoadTexture( m_sTexturePath, RageTexturePrefs() );
ASSERT( m_pTexture != NULL ); ASSERT( m_pTexture != NULL );
m_iLineSpacing = m_pTexture->GetSourceFrameHeight(); m_iLineSpacing = m_pTexture->GetSourceFrameHeight();
+2 -2
View File
@@ -47,7 +47,7 @@ RageTextureManager::~RageTextureManager()
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Load/Unload textures from disk // Load/Unload textures from disk
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
RageTexture* RageTextureManager::LoadTexture( CString sTexturePath ) RageTexture* RageTextureManager::LoadTexture( CString sTexturePath, RageTexturePrefs prefs )
{ {
sTexturePath.MakeLower(); sTexturePath.MakeLower();
@@ -77,7 +77,7 @@ RageTexture* RageTextureManager::LoadTexture( CString sTexturePath )
// if( sExt == "avi" || sExt == "mpg" || sExt == "mpeg" ) // if( sExt == "avi" || sExt == "mpg" || sExt == "mpeg" )
// pTexture = new RageMovieTexture( sTexturePath ); // pTexture = new RageMovieTexture( sTexturePath );
// else // else
pTexture = new RageBitmapTexture( sTexturePath, RageTexturePrefs() ); pTexture = new RageBitmapTexture( sTexturePath, prefs );
LOG->Trace( "RageTextureManager: Finished loading '%s'.", sTexturePath.GetString() ); LOG->Trace( "RageTextureManager: Finished loading '%s'.", sTexturePath.GetString() );
+1 -1
View File
@@ -24,7 +24,7 @@ public:
RageTextureManager( int iTextureColorDepth, int iSecsBeforeUnload ); RageTextureManager( int iTextureColorDepth, int iSecsBeforeUnload );
~RageTextureManager(); ~RageTextureManager();
RageTexture* LoadTexture( CString sTexturePath ); RageTexture* LoadTexture( CString sTexturePath, RageTexturePrefs prefs );
bool IsTextureLoaded( CString sTexturePath ); bool IsTextureLoaded( CString sTexturePath );
void UnloadTexture( CString sTexturePath ); void UnloadTexture( CString sTexturePath );
void ReloadAll(); void ReloadAll();
+1 -1
View File
@@ -137,7 +137,7 @@ bool Sprite::LoadFromTexture( CString sTexturePath, RageTexturePrefs prefs )
m_sTexturePath = sTexturePath; m_sTexturePath = sTexturePath;
m_pTexture = TEXTUREMAN->LoadTexture( m_sTexturePath ); m_pTexture = TEXTUREMAN->LoadTexture( m_sTexturePath, prefs );
assert( m_pTexture != NULL ); assert( m_pTexture != NULL );
// the size of the sprite is the size of the image before it was scaled // the size of the sprite is the size of the image before it was scaled