From 93098cd610ff12f4314acec8eced36adb658d0fe Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 28 Aug 2004 09:29:55 +0000 Subject: [PATCH] cleanup PREFSMAN->m_bForceMipMaps --- stepmania/src/RageBitmapTexture.cpp | 5 ----- stepmania/src/RageTextureManager.cpp | 2 ++ stepmania/src/RageTextureManager.h | 11 ++++++++--- stepmania/src/StepMania.cpp | 6 ++++-- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/stepmania/src/RageBitmapTexture.cpp b/stepmania/src/RageBitmapTexture.cpp index 1b3f5320f5..9c1e11c293 100644 --- a/stepmania/src/RageBitmapTexture.cpp +++ b/stepmania/src/RageBitmapTexture.cpp @@ -7,7 +7,6 @@ #include "RageDisplay.h" #include "RageTypes.h" #include "arch/Dialog/Dialog.h" -#include "PrefsManager.h" #include "RageSurface.h" #include "RageSurfaceUtils.h" @@ -91,10 +90,6 @@ void RageBitmapTexture::Create() actualID.iAlphaBits = 1; } - // let texture hints override the global setting - if( PREFSMAN->m_bForceMipMaps ) - actualID.bMipMaps = true; - // look in the file name for a format hints CString HintString = GetID().filename + actualID.AdditionalTextureHints; HintString.MakeLower(); diff --git a/stepmania/src/RageTextureManager.cpp b/stepmania/src/RageTextureManager.cpp index 1cba285b31..1b0f19ca53 100644 --- a/stepmania/src/RageTextureManager.cpp +++ b/stepmania/src/RageTextureManager.cpp @@ -75,6 +75,8 @@ void RageTextureManager::AdjustTextureID(RageTextureID &ID) const if( ID.iColorDepth == -1 ) ID.iColorDepth = m_Prefs.m_iTextureColorDepth; ID.iMaxSize = min( ID.iMaxSize, m_Prefs.m_iMaxTextureResolution ); + if( m_Prefs.m_bMipMaps ) + ID.bMipMaps = true; } /* If you've set up a texture yourself, register it here so it can be referenced diff --git a/stepmania/src/RageTextureManager.h b/stepmania/src/RageTextureManager.h index bb007bc016..4e4779d4bb 100644 --- a/stepmania/src/RageTextureManager.h +++ b/stepmania/src/RageTextureManager.h @@ -15,6 +15,7 @@ struct RageTextureManagerPrefs int m_iMovieColorDepth; bool m_bDelayedDelete; int m_iMaxTextureResolution; + bool m_bMipMaps; RageTextureManagerPrefs() { @@ -22,17 +23,20 @@ struct RageTextureManagerPrefs m_iMovieColorDepth = 16; m_iTextureColorDepth = 16; m_iMaxTextureResolution = 1024; + m_bMipMaps = false; } RageTextureManagerPrefs( int iTextureColorDepth, int iMovieColorDepth, bool bDelayedDelete, - int iMaxTextureResolution ) + int iMaxTextureResolution, + bool bMipMaps ) { - m_bDelayedDelete = bDelayedDelete ; + m_bDelayedDelete = bDelayedDelete; m_iMovieColorDepth = iMovieColorDepth; m_iTextureColorDepth = iTextureColorDepth; m_iMaxTextureResolution = iMaxTextureResolution; + m_bMipMaps = bMipMaps; } bool operator!=( const RageTextureManagerPrefs& rhs ) @@ -41,7 +45,8 @@ struct RageTextureManagerPrefs m_iTextureColorDepth != rhs.m_iTextureColorDepth || m_iMovieColorDepth != rhs.m_iMovieColorDepth || m_bDelayedDelete != rhs.m_bDelayedDelete || - m_iMaxTextureResolution != rhs.m_iMaxTextureResolution; + m_iMaxTextureResolution != rhs.m_iMaxTextureResolution || + m_bMipMaps != rhs.m_bMipMaps; } }; diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index 6bf405fcd2..a4dd22ccca 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -150,7 +150,8 @@ void ApplyGraphicOptions() PREFSMAN->m_iTextureColorDepth, PREFSMAN->m_iMovieColorDepth, PREFSMAN->m_bDelayedTextureDelete, - PREFSMAN->m_iMaxTextureResolution + PREFSMAN->m_iMaxTextureResolution, + PREFSMAN->m_bForceMipMaps ) ); @@ -1074,7 +1075,8 @@ int main(int argc, char* argv[]) PREFSMAN->m_iTextureColorDepth, PREFSMAN->m_iMovieColorDepth, PREFSMAN->m_bDelayedTextureDelete, - PREFSMAN->m_iMaxTextureResolution + PREFSMAN->m_iMaxTextureResolution, + PREFSMAN->m_bForceMipMaps ) );