Add an option to preload all banners. This adds to the screen load

time, but makes the actual screen much cleaner.

Add an option to disable banner preloading completely, to remove all
long waits completely.  Don't ChangeBannersWhenFast if we're set
to this.
This commit is contained in:
Glenn Maynard
2003-04-20 00:53:15 +00:00
parent bd1baddf7f
commit f7b856f3c2
4 changed files with 23 additions and 19 deletions
+11 -1
View File
@@ -475,6 +475,16 @@ void MusicWheel::BuildWheelItemDatas( vector<WheelItemData> &arrayWheelItemDatas
ASSERT(0); // invalid PlayMode ASSERT(0); // invalid PlayMode
} }
if(PREFSMAN->m_BannerCacheType == PREFSMAN->preload_all)
{
for( i=0; i<arrayWheelItemDatas.size(); i++ )
{
WheelItemData& WID = arrayWheelItemDatas[i];
if(WID.HasBanner())
TEXTUREMAN->CacheTexture( Banner::BannerTex(WID.GetBanner()) );
}
}
// init music status icons // init music status icons
for( i=0; i<arrayWheelItemDatas.size(); i++ ) for( i=0; i<arrayWheelItemDatas.size(); i++ )
{ {
@@ -1048,7 +1058,7 @@ void MusicWheel::SetOpenGroup(CString group, SongSortOrder so)
// //
// cache banners // cache banners
// //
if(from[i].HasBanner()) if(from[i].HasBanner() && PREFSMAN->m_BannerCacheType == PREFSMAN->preload_group)
TEXTUREMAN->CacheTexture( Banner::BannerTex(from[i].GetBanner()) ); TEXTUREMAN->CacheTexture( Banner::BannerTex(from[i].GetBanner()) );
} }
+3 -3
View File
@@ -76,7 +76,6 @@ PrefsManager::PrefsManager()
m_bDelayedTextureDelete = true; m_bDelayedTextureDelete = true;
m_MusicWheelUsesSections = ALWAYS; m_MusicWheelUsesSections = ALWAYS;
m_iMusicWheelSwitchSpeed = 10; m_iMusicWheelSwitchSpeed = 10;
m_bChangeBannersWhenFast = false;
m_bEasterEggs = true; m_bEasterEggs = true;
m_bMarvelousTiming = true; m_bMarvelousTiming = true;
m_iCoinMode = COIN_HOME; m_iCoinMode = COIN_HOME;
@@ -91,6 +90,7 @@ PrefsManager::PrefsManager()
m_bAutogenMissingTypes = true; m_bAutogenMissingTypes = true;
m_bAutogenGroupCourses = true; m_bAutogenGroupCourses = true;
m_bBreakComboToGetItem = false; m_bBreakComboToGetItem = false;
m_BannerCacheType = preload_group;
/* DDR Extreme-style extra stage support. /* DDR Extreme-style extra stage support.
* Default off so people used to the current behavior (or those with extra * Default off so people used to the current behavior (or those with extra
@@ -168,7 +168,6 @@ void PrefsManager::ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame )
ini.GetValueB( "Options", "DelayedTextureDelete", m_bDelayedTextureDelete ); ini.GetValueB( "Options", "DelayedTextureDelete", m_bDelayedTextureDelete );
ini.GetValueI( "Options", "MusicWheelUsesSections", (int&)m_MusicWheelUsesSections ); ini.GetValueI( "Options", "MusicWheelUsesSections", (int&)m_MusicWheelUsesSections );
ini.GetValueI( "Options", "MusicWheelSwitchSpeed", m_iMusicWheelSwitchSpeed ); ini.GetValueI( "Options", "MusicWheelSwitchSpeed", m_iMusicWheelSwitchSpeed );
ini.GetValueB( "Options", "ChangeBannersWhenFast", m_bChangeBannersWhenFast );
ini.GetValue ( "Options", "SoundDrivers", m_sSoundDrivers ); ini.GetValue ( "Options", "SoundDrivers", m_sSoundDrivers );
ini.GetValueB( "Options", "EasterEggs", m_bEasterEggs ); ini.GetValueB( "Options", "EasterEggs", m_bEasterEggs );
ini.GetValueB( "Options", "MarvelousTiming", m_bMarvelousTiming ); ini.GetValueB( "Options", "MarvelousTiming", m_bMarvelousTiming );
@@ -192,6 +191,7 @@ void PrefsManager::ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame )
ini.GetValueB( "Options", "Timestamping", m_bTimestamping ); ini.GetValueB( "Options", "Timestamping", m_bTimestamping );
ini.GetValue ( "Options", "DefaultModifiers", m_sDefaultModifiers ); ini.GetValue ( "Options", "DefaultModifiers", m_sDefaultModifiers );
ini.GetValueB( "Options", "BreakComboToGetItem", m_bBreakComboToGetItem ); ini.GetValueB( "Options", "BreakComboToGetItem", m_bBreakComboToGetItem );
ini.GetValueI( "Options", "BannerCacheType", (int&)m_BannerCacheType );
m_asAdditionalSongFolders.clear(); m_asAdditionalSongFolders.clear();
CString sAdditionalSongFolders; CString sAdditionalSongFolders;
@@ -251,7 +251,6 @@ void PrefsManager::SaveGlobalPrefsToDisk()
ini.SetValueB( "Options", "DelayedTextureDelete", m_bDelayedTextureDelete ); ini.SetValueB( "Options", "DelayedTextureDelete", m_bDelayedTextureDelete );
ini.SetValueI( "Options", "MusicWheelUsesSections", m_MusicWheelUsesSections ); ini.SetValueI( "Options", "MusicWheelUsesSections", m_MusicWheelUsesSections );
ini.SetValueI( "Options", "MusicWheelSwitchSpeed", m_iMusicWheelSwitchSpeed ); ini.SetValueI( "Options", "MusicWheelSwitchSpeed", m_iMusicWheelSwitchSpeed );
ini.SetValueB( "Options", "ChangeBannersWhenFast", m_bChangeBannersWhenFast );
ini.SetValueB( "Options", "EasterEggs", m_bEasterEggs ); ini.SetValueB( "Options", "EasterEggs", m_bEasterEggs );
ini.SetValueB( "Options", "MarvelousTiming", m_bMarvelousTiming ); ini.SetValueB( "Options", "MarvelousTiming", m_bMarvelousTiming );
ini.SetValueB( "Options", "SoundPreloadAll", m_bSoundPreloadAll ); ini.SetValueB( "Options", "SoundPreloadAll", m_bSoundPreloadAll );
@@ -273,6 +272,7 @@ void PrefsManager::SaveGlobalPrefsToDisk()
ini.SetValueB( "Options", "Timestamping", m_bTimestamping ); ini.SetValueB( "Options", "Timestamping", m_bTimestamping );
ini.SetValue ( "Options", "DefaultModifiers", m_sDefaultModifiers ); ini.SetValue ( "Options", "DefaultModifiers", m_sDefaultModifiers );
ini.SetValueB( "Options", "BreakComboToGetItem", m_bBreakComboToGetItem ); ini.SetValueB( "Options", "BreakComboToGetItem", m_bBreakComboToGetItem );
ini.SetValueI( "Options", "BannerCacheType", m_BannerCacheType );
/* Only write these if they aren't the default. This ensures that we can change /* Only write these if they aren't the default. This ensures that we can change
+3 -1
View File
@@ -56,7 +56,6 @@ public:
bool m_bArcadeOptionsNavigation; bool m_bArcadeOptionsNavigation;
enum { NEVER, ALWAYS, ABC_ONLY } m_MusicWheelUsesSections; enum { NEVER, ALWAYS, ABC_ONLY } m_MusicWheelUsesSections;
int m_iMusicWheelSwitchSpeed; int m_iMusicWheelSwitchSpeed;
bool m_bChangeBannersWhenFast;
bool m_bEasterEggs; bool m_bEasterEggs;
bool m_bMarvelousTiming; bool m_bMarvelousTiming;
int m_iCoinMode; int m_iCoinMode;
@@ -89,6 +88,9 @@ public:
bool m_bSoundPreloadAll; bool m_bSoundPreloadAll;
bool m_bAllowSoftwareRenderer; bool m_bAllowSoftwareRenderer;
enum BannerCacheType { preload_none, preload_all, preload_group };
BannerCacheType m_BannerCacheType;
/* Game-specific prefs: */ /* Game-specific prefs: */
CString m_sDefaultNoteSkin; CString m_sDefaultNoteSkin;
+5 -13
View File
@@ -732,20 +732,12 @@ void ScreenSelectMusic::AfterMusicChange()
for( pn = 0; pn < NUM_PLAYERS; ++pn) for( pn = 0; pn < NUM_PLAYERS; ++pn)
m_arrayNotes[pn].clear(); m_arrayNotes[pn].clear();
/* If we're rouletting, and we're moving fast, don't touch the banner. */
bool no_banner_change = false; bool no_banner_change = false;
// if(m_MusicWheel.IsMoving()) if(PREFSMAN->m_BannerCacheType == PREFSMAN->preload_none && m_MusicWheel.IsMoving())
// { {
// /* We're moving fast. Don't change banners if we're rouletting, or if /* If we're moving fast and we didn't preload banners, don't touch it. */
// * we've been told to never change banners when moving fast. no_banner_change = true;
// * }
// * XXX: When we're not changing banners and not rouletting, show some
// * kind of "moving fast" fallback banner. (When rouletting, just keep
// * showing the roulette banner.) */
// if(m_MusicWheel.IsRouletting() ||
// (m_MusicWheel.IsMoving() && !PREFSMAN->m_bChangeBannersWhenFast))
// no_banner_change = true;
// }
m_sprMarathonBalloon.StopTweening(); m_sprMarathonBalloon.StopTweening();
OFF_COMMAND( m_sprMarathonBalloon ); OFF_COMMAND( m_sprMarathonBalloon );