use RageTexturePreloader
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
#include "ActorUtil.h"
|
||||
#include "Character.h"
|
||||
#include "RageLog.h"
|
||||
#include "RageTextureManager.h"
|
||||
#include <set>
|
||||
#include "PlayerState.h"
|
||||
|
||||
@@ -62,7 +61,7 @@ void AttackDisplay::Init( const PlayerState* pPlayerState )
|
||||
continue;
|
||||
}
|
||||
|
||||
TEXTUREMAN->CacheTexture( path );
|
||||
m_TexturePreload.Load( path );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "ActorFrame.h"
|
||||
#include "Sprite.h"
|
||||
#include "GameConstantsAndTypes.h" // for TapNoteScore
|
||||
#include "RageTexturePreloader.h"
|
||||
|
||||
struct PlayerState;
|
||||
|
||||
@@ -21,6 +22,8 @@ protected:
|
||||
const PlayerState* m_pPlayerState;
|
||||
|
||||
Sprite m_sprAttack;
|
||||
|
||||
RageTexturePreloader m_TexturePreload;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -16,18 +16,15 @@ Banner::Banner()
|
||||
{
|
||||
m_bScrolling = false;
|
||||
m_fPercentScrolling = 0;
|
||||
}
|
||||
|
||||
void Banner::CacheGlobalBanners()
|
||||
{
|
||||
if( PREFSMAN->m_BannerCache == PrefsManager::BNCACHE_OFF )
|
||||
return;
|
||||
|
||||
TEXTUREMAN->CacheTexture( SongBannerTexture(THEME->GetPathG("Banner","all music")) );
|
||||
TEXTUREMAN->CacheTexture( SongBannerTexture(THEME->GetPathG("Common","fallback banner")) );
|
||||
TEXTUREMAN->CacheTexture( SongBannerTexture(THEME->GetPathG("Banner","roulette")) );
|
||||
TEXTUREMAN->CacheTexture( SongBannerTexture(THEME->GetPathG("Banner","random")) );
|
||||
TEXTUREMAN->CacheTexture( SongBannerTexture(THEME->GetPathG("Banner","Mode")) );
|
||||
if( PREFSMAN->m_BannerCache != PrefsManager::BNCACHE_OFF )
|
||||
{
|
||||
m_TexturePreload.Load( SongBannerTexture(THEME->GetPathG("Banner","all music")) );
|
||||
m_TexturePreload.Load( SongBannerTexture(THEME->GetPathG("Common","fallback banner")) );
|
||||
m_TexturePreload.Load( SongBannerTexture(THEME->GetPathG("Banner","roulette")) );
|
||||
m_TexturePreload.Load( SongBannerTexture(THEME->GetPathG("Banner","random")) );
|
||||
m_TexturePreload.Load( SongBannerTexture(THEME->GetPathG("Banner","Mode")) );
|
||||
}
|
||||
}
|
||||
|
||||
bool Banner::Load( RageTextureID ID )
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
#include "Sprite.h"
|
||||
#include "RageTextureID.h"
|
||||
#include "RageTexturePreloader.h"
|
||||
class Song;
|
||||
class Course;
|
||||
class Character;
|
||||
@@ -31,16 +32,14 @@ public:
|
||||
void LoadRandom();
|
||||
void LoadFallback();
|
||||
|
||||
static void CacheGlobalBanners();
|
||||
|
||||
void SetScrolling( bool bScroll, float Percent = 0);
|
||||
bool IsScrolling() const { return m_bScrolling; }
|
||||
float ScrollingPercent() const { return m_fPercentScrolling; }
|
||||
|
||||
protected:
|
||||
|
||||
bool m_bScrolling;
|
||||
float m_fPercentScrolling;
|
||||
RageTexturePreloader m_TexturePreload;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -32,8 +32,6 @@ FadingBanner::FadingBanner()
|
||||
ActorUtil::OnCommand( m_Banner[i], "FadingBanner" );
|
||||
this->AddChild( &m_Banner[i] );
|
||||
}
|
||||
|
||||
Banner::CacheGlobalBanners();
|
||||
}
|
||||
|
||||
void FadingBanner::ScaleToClipped( float fWidth, float fHeight )
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#include "RageLog.h"
|
||||
#include "GameState.h"
|
||||
#include "ThemeManager.h"
|
||||
#include "RageTextureManager.h"
|
||||
#include "PlayerState.h"
|
||||
#include "Command.h"
|
||||
|
||||
@@ -30,7 +29,7 @@ ScoreDisplayBattle::ScoreDisplayBattle()
|
||||
CStringArray asIconPaths;
|
||||
GetDirListing( THEME->GetCurThemeDir()+"Graphic/ScoreDisplayBattle icon*.*", asIconPaths );
|
||||
for( unsigned j=0; j<asIconPaths.size(); j++ )
|
||||
TEXTUREMAN->CacheTexture( asIconPaths[j] );
|
||||
m_TexturePreload.Load( asIconPaths[j] );
|
||||
}
|
||||
|
||||
void ScoreDisplayBattle::Init( const PlayerState* pPlayerState )
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "ScoreDisplay.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "Sprite.h"
|
||||
#include "RageTexturePreloader.h"
|
||||
|
||||
|
||||
class ScoreDisplayBattle : public ScoreDisplay
|
||||
@@ -21,6 +22,7 @@ protected:
|
||||
Sprite m_ItemIcon[NUM_INVENTORY_SLOTS];
|
||||
|
||||
CString m_iLastSeenInventory[NUM_INVENTORY_SLOTS];
|
||||
RageTexturePreloader m_TexturePreload;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
#include "Steps.h"
|
||||
#include "RageTimer.h"
|
||||
#include "ActorUtil.h"
|
||||
#include "RageTextureManager.h"
|
||||
#include "AnnouncerManager.h"
|
||||
#include "MenuTimer.h"
|
||||
#include "StepsUtil.h"
|
||||
@@ -216,8 +215,8 @@ void ScreenEz2SelectMusic::Init()
|
||||
}
|
||||
|
||||
m_sprBalloon.SetName( "Balloon" );
|
||||
TEXTUREMAN->CacheTexture( THEME->GetPathG("ScreenSelectMusic","balloon long") );
|
||||
TEXTUREMAN->CacheTexture( THEME->GetPathG("ScreenSelectMusic","balloon marathon") );
|
||||
m_TexturePreload.Load( THEME->GetPathG("ScreenSelectMusic","balloon long") );
|
||||
m_TexturePreload.Load( THEME->GetPathG("ScreenSelectMusic","balloon marathon") );
|
||||
this->AddChild( &m_sprBalloon );
|
||||
|
||||
m_soundOptionsChange.Load( THEME->GetPathS("ScreenEz2SelectMusic","options") );
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "MusicBannerWheel.h"
|
||||
#include "DifficultyRating.h"
|
||||
#include "ModeSwitcher.h"
|
||||
#include "RageTexturePreloader.h"
|
||||
|
||||
class ScreenEz2SelectMusic : public ScreenWithMenuElements
|
||||
{
|
||||
@@ -83,6 +84,8 @@ protected:
|
||||
int i_ErrorDetected;
|
||||
|
||||
int iConfirmSelection;
|
||||
|
||||
RageTexturePreloader m_TexturePreload;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -110,7 +110,7 @@ void ScreenSelectMusic::Init()
|
||||
m_sFallbackCDTitlePath = THEME->GetPathG(m_sName,"fallback cdtitle");
|
||||
|
||||
|
||||
TEXTUREMAN->CacheTexture( m_sFallbackCDTitlePath );
|
||||
m_TexturePreload.Load( m_sFallbackCDTitlePath );
|
||||
|
||||
if( GAMESTATE->m_pCurStyle == NULL )
|
||||
RageException::Throw( "The Style has not been set. A theme must set the Style before loading ScreenSelectMusic." );
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "RageUtil_BackgroundLoader.h"
|
||||
#include "ThemeMetric.h"
|
||||
#include "ActorCommands.h"
|
||||
#include "RageTexturePreloader.h"
|
||||
|
||||
class ScreenSelectMusic : public ScreenWithMenuElements
|
||||
{
|
||||
@@ -146,6 +147,7 @@ protected:
|
||||
RageSound m_soundSelectPressed;
|
||||
|
||||
BackgroundLoader m_BackgroundLoader;
|
||||
RageTexturePreloader m_TexturePreload;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user