separate movie color depth

This commit is contained in:
Glenn Maynard
2003-07-09 02:28:56 +00:00
parent 3ee5463de7
commit e1be95ad48
5 changed files with 14 additions and 2 deletions
+3
View File
@@ -40,6 +40,7 @@ PrefsManager::PrefsManager()
m_iDisplayHeight = 480;
m_iDisplayColorDepth = 16;
m_iTextureColorDepth = 16; // default to 16 for better preformance on slower cards
m_iMovieColorDepth = 16;
m_iMaxTextureResolution = 2048;
m_iRefreshRate = REFRESH_DEFAULT;
m_bIgnoreJoyAxes = true; // ON by default because all USB convertors that are compatible with pads map to buttons
@@ -156,6 +157,7 @@ void PrefsManager::ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame )
ini.GetValueI( "Options", "DisplayHeight", m_iDisplayHeight );
ini.GetValueI( "Options", "DisplayColorDepth", m_iDisplayColorDepth );
ini.GetValueI( "Options", "TextureColorDepth", m_iTextureColorDepth );
ini.GetValueI( "Options", "MovieColorDepth", m_iMovieColorDepth );
ini.GetValueI( "Options", "MaxTextureResolution", m_iMaxTextureResolution );
ini.GetValueI( "Options", "RefreshRate", m_iRefreshRate );
ini.GetValueB( "Options", "IgnoreJoyAxes", m_bIgnoreJoyAxes );
@@ -260,6 +262,7 @@ void PrefsManager::SaveGlobalPrefsToDisk()
ini.SetValueI( "Options", "DisplayHeight", m_iDisplayHeight );
ini.SetValueI( "Options", "DisplayColorDepth", m_iDisplayColorDepth );
ini.SetValueI( "Options", "TextureColorDepth", m_iTextureColorDepth );
ini.SetValueI( "Options", "MovieColorDepth", m_iMovieColorDepth );
ini.SetValueI( "Options", "MaxTextureResolution", m_iMaxTextureResolution );
ini.SetValueI( "Options", "RefreshRate", m_iRefreshRate );
ini.SetValueB( "Options", "IgnoreJoyAxes", m_bIgnoreJoyAxes );
+1
View File
@@ -24,6 +24,7 @@ public:
int m_iDisplayHeight;
int m_iDisplayColorDepth;
int m_iTextureColorDepth;
int m_iMovieColorDepth;
int m_iMaxTextureResolution;
int m_iRefreshRate;
bool m_bShowStats;
+4 -1
View File
@@ -319,10 +319,11 @@ void RageTextureManager::InvalidateTextures()
}
}
bool RageTextureManager::SetPrefs( int iTextureColorDepth, bool bDelayedDelete, int iMaxTextureResolution )
bool RageTextureManager::SetPrefs( int iTextureColorDepth, int iMovieColorDepth, bool bDelayedDelete, int iMaxTextureResolution )
{
bool need_reload = false;
if( m_bDelayedDelete != bDelayedDelete ||
m_iMovieColorDepth != iMovieColorDepth ||
m_iTextureColorDepth != iTextureColorDepth ||
m_iMaxTextureResolution != iMaxTextureResolution )
need_reload = true;
@@ -330,8 +331,10 @@ bool RageTextureManager::SetPrefs( int iTextureColorDepth, bool bDelayedDelete,
m_bDelayedDelete = bDelayedDelete;
m_iTextureColorDepth = iTextureColorDepth;
m_iMaxTextureResolution = iMaxTextureResolution;
m_iMovieColorDepth = iMovieColorDepth;
ASSERT( m_iTextureColorDepth==16 || m_iTextureColorDepth==32 );
ASSERT( m_iMovieColorDepth==16 || m_iMovieColorDepth==32 );
return need_reload;
}
+3 -1
View File
@@ -30,8 +30,9 @@ public:
void UnloadTexture( RageTexture *t );
void ReloadAll();
bool SetPrefs( int iTextureColorDepth, bool bDelayedDelete, int iMaxTextureResolution );
bool SetPrefs( int iTextureColorDepth, int iMovieColorDepth, bool bDelayedDelete, int iMaxTextureResolution );
int GetTextureColorDepth() { return m_iTextureColorDepth; };
int GetMovieColorDepth() { return m_iMovieColorDepth; };
bool GetDelayedDelete() { return m_bDelayedDelete; };
int GetMaxTextureResolution() { return m_iMaxTextureResolution; };
@@ -52,6 +53,7 @@ protected:
void GarbageCollect( GCType type );
int m_iTextureColorDepth;
int m_iMovieColorDepth;
bool m_bDelayedDelete;
int m_iMaxTextureResolution;
+3
View File
@@ -106,6 +106,7 @@ void ApplyGraphicOptions()
THEME->GetPathToG("Common window icon") ) );
bNeedReload |= TEXTUREMAN->SetPrefs(
PREFSMAN->m_iTextureColorDepth,
PREFSMAN->m_iMovieColorDepth,
PREFSMAN->m_bDelayedTextureDelete,
PREFSMAN->m_iMaxTextureResolution );
@@ -337,6 +338,7 @@ RageDisplay *CreateDisplay()
ini.GetValueI( sKey, "Height", PREFSMAN->m_iDisplayHeight );
ini.GetValueI( sKey, "DisplayColor", PREFSMAN->m_iDisplayColorDepth );
ini.GetValueI( sKey, "TextureColor", PREFSMAN->m_iTextureColorDepth );
ini.GetValueI( sKey, "MovieColor", PREFSMAN->m_iMovieColorDepth );
ini.GetValueB( sKey, "AntiAliasing", PREFSMAN->m_bAntiAliasing );
// Update last seen video card
@@ -501,6 +503,7 @@ int main(int argc, char* argv[])
TEXTUREMAN = new RageTextureManager();
TEXTUREMAN->SetPrefs(
PREFSMAN->m_iTextureColorDepth,
PREFSMAN->m_iMovieColorDepth,
PREFSMAN->m_bDelayedTextureDelete,
PREFSMAN->m_iMaxTextureResolution );