remove Generic stuff. It broke a while back, and it's too painful to keep around.
This commit is contained in:
@@ -29,7 +29,7 @@ static bool CompareLayerNames( const CString& s1, const CString& s2 )
|
|||||||
return i1 < i2;
|
return i1 < i2;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BGAnimation::AddLayersFromAniDir( const CString &_sAniDir, const IniFile& ini, bool bGeneric )
|
void BGAnimation::AddLayersFromAniDir( const CString &_sAniDir, const IniFile& ini )
|
||||||
{
|
{
|
||||||
const CString& sAniDir = _sAniDir;
|
const CString& sAniDir = _sAniDir;
|
||||||
|
|
||||||
@@ -83,12 +83,12 @@ void BGAnimation::AddLayersFromAniDir( const CString &_sAniDir, const IniFile& i
|
|||||||
IniFile ini2;
|
IniFile ini2;
|
||||||
ini2.ReadFile( sPathToIni );
|
ini2.ReadFile( sPathToIni );
|
||||||
|
|
||||||
AddLayersFromAniDir( sImportDir, ini2, bGeneric );
|
AddLayersFromAniDir( sImportDir, ini2 );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// import as a single layer
|
// import as a single layer
|
||||||
BGAnimationLayer* pLayer = new BGAnimationLayer( bGeneric );
|
BGAnimationLayer* pLayer = new BGAnimationLayer;
|
||||||
pLayer->LoadFromNode( sAniDir, pKey );
|
pLayer->LoadFromNode( sAniDir, pKey );
|
||||||
this->AddChild( pLayer );
|
this->AddChild( pLayer );
|
||||||
}
|
}
|
||||||
@@ -96,7 +96,7 @@ void BGAnimation::AddLayersFromAniDir( const CString &_sAniDir, const IniFile& i
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BGAnimation::LoadFromAniDir( const CString &_sAniDir, bool bGeneric )
|
void BGAnimation::LoadFromAniDir( const CString &_sAniDir )
|
||||||
{
|
{
|
||||||
DeleteAllChildren();
|
DeleteAllChildren();
|
||||||
|
|
||||||
@@ -117,7 +117,7 @@ void BGAnimation::LoadFromAniDir( const CString &_sAniDir, bool bGeneric )
|
|||||||
IniFile ini;
|
IniFile ini;
|
||||||
ini.ReadFile( sPathToIni );
|
ini.ReadFile( sPathToIni );
|
||||||
|
|
||||||
AddLayersFromAniDir( sAniDir, ini, bGeneric ); // TODO: Check for circular load
|
AddLayersFromAniDir( sAniDir, ini ); // TODO: Check for circular load
|
||||||
|
|
||||||
XNode* pBGAnimation = ini.GetChild( "BGAnimation" );
|
XNode* pBGAnimation = ini.GetChild( "BGAnimation" );
|
||||||
XNode dummy;
|
XNode dummy;
|
||||||
@@ -162,7 +162,7 @@ void BGAnimation::LoadFromAniDir( const CString &_sAniDir, bool bGeneric )
|
|||||||
const CString sPath = asImagePaths[i];
|
const CString sPath = asImagePaths[i];
|
||||||
if( Basename(sPath).Left(1) == "_" )
|
if( Basename(sPath).Left(1) == "_" )
|
||||||
continue; // don't directly load files starting with an underscore
|
continue; // don't directly load files starting with an underscore
|
||||||
BGAnimationLayer* pLayer = new BGAnimationLayer( bGeneric );
|
BGAnimationLayer* pLayer = new BGAnimationLayer;
|
||||||
pLayer->LoadFromAniLayerFile( asImagePaths[i] );
|
pLayer->LoadFromAniLayerFile( asImagePaths[i] );
|
||||||
AddChild( pLayer );
|
AddChild( pLayer );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,11 +16,11 @@ public:
|
|||||||
BGAnimation();
|
BGAnimation();
|
||||||
virtual ~BGAnimation();
|
virtual ~BGAnimation();
|
||||||
|
|
||||||
void LoadFromAniDir( const CString &sAniDir, bool bGeneric=true );
|
void LoadFromAniDir( const CString &sAniDir );
|
||||||
void LoadFromNode( const CString& sDir, const XNode* pNode );
|
void LoadFromNode( const CString& sDir, const XNode* pNode );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void AddLayersFromAniDir( const CString &_sAniDir, const IniFile& ini, bool bGeneric );
|
void AddLayersFromAniDir( const CString &_sAniDir, const IniFile& ini );
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -24,15 +24,8 @@ const float SPIRAL_MIN_ZOOM = 0.3f;
|
|||||||
#define MAX_SPRITES (MAX_TILES_WIDE*MAX_TILES_HIGH)
|
#define MAX_SPRITES (MAX_TILES_WIDE*MAX_TILES_HIGH)
|
||||||
|
|
||||||
|
|
||||||
BGAnimationLayer::BGAnimationLayer( bool bGeneric )
|
BGAnimationLayer::BGAnimationLayer()
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
* If Generic is false, this is a layer in a real BGA--one that was loaded
|
|
||||||
* by simply constructing a BGAnimation. In this mode, loaded images are given
|
|
||||||
* a default position of SCREEN_CENTER_X, SCREEN_CENTER_Y.
|
|
||||||
*/
|
|
||||||
m_bGeneric = bGeneric;
|
|
||||||
|
|
||||||
Init();
|
Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -370,8 +363,7 @@ void BGAnimationLayer::LoadFromNode( const CString& sDir, const XNode* pNode )
|
|||||||
|
|
||||||
DEBUG_ASSERT( IsADirectory(sAniDir) );
|
DEBUG_ASSERT( IsADirectory(sAniDir) );
|
||||||
|
|
||||||
CHECKPOINT_M( ssprintf( "BGAnimationLayer::LoadFromIni \"%s\" %s",
|
CHECKPOINT_M( ssprintf( "BGAnimationLayer::LoadFromIni \"%s\"", sAniDir.c_str() ) );
|
||||||
sAniDir.c_str(), m_bGeneric? "(generic) ":"" ) );
|
|
||||||
|
|
||||||
{
|
{
|
||||||
CString expr;
|
CString expr;
|
||||||
@@ -474,13 +466,6 @@ void BGAnimationLayer::LoadFromNode( const CString& sDir, const XNode* pNode )
|
|||||||
this->AddChild( pActor );
|
this->AddChild( pActor );
|
||||||
if( bStretch )
|
if( bStretch )
|
||||||
pActor->StretchTo( FullScreenRectF );
|
pActor->StretchTo( FullScreenRectF );
|
||||||
|
|
||||||
/* Annoying: old BGAnimations (those in theme BGAnimations/ and, more importantly,
|
|
||||||
* those included with songs) expect a 640x480 coordinate system with a default
|
|
||||||
* of 320x240. We can't just move the whole layer to the center (that'll move the
|
|
||||||
* whole coordinate system, not just the default), we have to move the actor. */
|
|
||||||
if( !m_bGeneric )
|
|
||||||
pActor->SetXY( SCREEN_CENTER_X, SCREEN_CENTER_Y );
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TYPE_PARTICLES:
|
case TYPE_PARTICLES:
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ struct XNode;
|
|||||||
class BGAnimationLayer : public ActorFrame
|
class BGAnimationLayer : public ActorFrame
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
BGAnimationLayer( bool Generic );
|
BGAnimationLayer();
|
||||||
~BGAnimationLayer();
|
~BGAnimationLayer();
|
||||||
void Init();
|
void Init();
|
||||||
void Unload();
|
void Unload();
|
||||||
@@ -43,8 +43,6 @@ protected:
|
|||||||
//
|
//
|
||||||
|
|
||||||
// common stuff
|
// common stuff
|
||||||
bool m_bGeneric;
|
|
||||||
|
|
||||||
CString m_sDrawCond;
|
CString m_sDrawCond;
|
||||||
|
|
||||||
// stretch stuff
|
// stretch stuff
|
||||||
|
|||||||
Reference in New Issue
Block a user