All BGAnimations are "generic", except for those loaded directly from
Background. This should be more consistent (we were creating BGAnimations as non-generic in some places where it probably should have been generic). This means all themes need to explicitly set the position of all BGAnimation graphics, which is good practice anyway.
This commit is contained in:
@@ -12,7 +12,7 @@ struct XNode;
|
|||||||
class BGAnimation : public ActorScroller
|
class BGAnimation : public ActorScroller
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
BGAnimation( bool Generic=false );
|
BGAnimation( bool Generic=true );
|
||||||
virtual ~BGAnimation();
|
virtual ~BGAnimation();
|
||||||
|
|
||||||
void Unload();
|
void Unload();
|
||||||
|
|||||||
@@ -74,7 +74,6 @@ void BGAnimationLayer::LoadFromAniLayerFile( const CString& sPath )
|
|||||||
{
|
{
|
||||||
/* Generic BGAs are new. Animation directories with no INI are old and obsolete.
|
/* Generic BGAs are new. Animation directories with no INI are old and obsolete.
|
||||||
* Don't combine them. */
|
* Don't combine them. */
|
||||||
ASSERT( !m_bGeneric );
|
|
||||||
Init();
|
Init();
|
||||||
CString lcPath = sPath;
|
CString lcPath = sPath;
|
||||||
lcPath.MakeLower();
|
lcPath.MakeLower();
|
||||||
@@ -472,11 +471,6 @@ void BGAnimationLayer::LoadFromNode( const CString& sAniDir_, const XNode& layer
|
|||||||
layer.GetAttrValue( "TileVelocityY", m_fTileVelocityY );
|
layer.GetAttrValue( "TileVelocityY", m_fTileVelocityY );
|
||||||
|
|
||||||
|
|
||||||
bool NeedTextureStretch = false;
|
|
||||||
if( m_fTexCoordVelocityX != 0 ||
|
|
||||||
m_fTexCoordVelocityY != 0 )
|
|
||||||
NeedTextureStretch = true;
|
|
||||||
|
|
||||||
switch( m_Type )
|
switch( m_Type )
|
||||||
{
|
{
|
||||||
case TYPE_SPRITE:
|
case TYPE_SPRITE:
|
||||||
@@ -504,7 +498,6 @@ void BGAnimationLayer::LoadFromNode( const CString& sAniDir_, const XNode& layer
|
|||||||
CollapsePath( sPath );
|
CollapsePath( sPath );
|
||||||
|
|
||||||
|
|
||||||
ASSERT( !m_bGeneric );
|
|
||||||
for( int i=0; i<iNumParticles; i++ )
|
for( int i=0; i<iNumParticles; i++ )
|
||||||
{
|
{
|
||||||
Actor* pActor = MakeActor( sPath );
|
Actor* pActor = MakeActor( sPath );
|
||||||
@@ -533,7 +526,6 @@ void BGAnimationLayer::LoadFromNode( const CString& sAniDir_, const XNode& layer
|
|||||||
CString sPath = sAniDir+sFile;
|
CString sPath = sAniDir+sFile;
|
||||||
CollapsePath( sPath );
|
CollapsePath( sPath );
|
||||||
|
|
||||||
ASSERT( !m_bGeneric );
|
|
||||||
Sprite s;
|
Sprite s;
|
||||||
RageTextureID ID(sPath);
|
RageTextureID ID(sPath);
|
||||||
ID.bStretch = true;
|
ID.bStretch = true;
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ Actor *Background::CreateSongBGA( CString sBGName ) const
|
|||||||
GetDirListing( m_pSong->GetSongDir()+sBGName, asFiles, true, true );
|
GetDirListing( m_pSong->GetSongDir()+sBGName, asFiles, true, true );
|
||||||
if( !asFiles.empty() )
|
if( !asFiles.empty() )
|
||||||
{
|
{
|
||||||
pTempBGA = new BGAnimation;
|
pTempBGA = new BGAnimation( false );
|
||||||
pTempBGA->LoadFromAniDir( asFiles[0] );
|
pTempBGA->LoadFromAniDir( asFiles[0] );
|
||||||
return pTempBGA;
|
return pTempBGA;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user