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;
|
||||
}
|
||||
|
||||
void BGAnimation::AddLayersFromAniDir( const CString &_sAniDir, const IniFile& ini, bool bGeneric )
|
||||
void BGAnimation::AddLayersFromAniDir( const CString &_sAniDir, const IniFile& ini )
|
||||
{
|
||||
const CString& sAniDir = _sAniDir;
|
||||
|
||||
@@ -83,12 +83,12 @@ void BGAnimation::AddLayersFromAniDir( const CString &_sAniDir, const IniFile& i
|
||||
IniFile ini2;
|
||||
ini2.ReadFile( sPathToIni );
|
||||
|
||||
AddLayersFromAniDir( sImportDir, ini2, bGeneric );
|
||||
AddLayersFromAniDir( sImportDir, ini2 );
|
||||
}
|
||||
else
|
||||
{
|
||||
// import as a single layer
|
||||
BGAnimationLayer* pLayer = new BGAnimationLayer( bGeneric );
|
||||
BGAnimationLayer* pLayer = new BGAnimationLayer;
|
||||
pLayer->LoadFromNode( sAniDir, pKey );
|
||||
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();
|
||||
|
||||
@@ -117,7 +117,7 @@ void BGAnimation::LoadFromAniDir( const CString &_sAniDir, bool bGeneric )
|
||||
IniFile ini;
|
||||
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 dummy;
|
||||
@@ -162,7 +162,7 @@ void BGAnimation::LoadFromAniDir( const CString &_sAniDir, bool bGeneric )
|
||||
const CString sPath = asImagePaths[i];
|
||||
if( Basename(sPath).Left(1) == "_" )
|
||||
continue; // don't directly load files starting with an underscore
|
||||
BGAnimationLayer* pLayer = new BGAnimationLayer( bGeneric );
|
||||
BGAnimationLayer* pLayer = new BGAnimationLayer;
|
||||
pLayer->LoadFromAniLayerFile( asImagePaths[i] );
|
||||
AddChild( pLayer );
|
||||
}
|
||||
|
||||
@@ -16,11 +16,11 @@ public:
|
||||
BGAnimation();
|
||||
virtual ~BGAnimation();
|
||||
|
||||
void LoadFromAniDir( const CString &sAniDir, bool bGeneric=true );
|
||||
void LoadFromAniDir( const CString &sAniDir );
|
||||
void LoadFromNode( const CString& sDir, const XNode* pNode );
|
||||
|
||||
protected:
|
||||
void AddLayersFromAniDir( const CString &_sAniDir, const IniFile& ini, bool bGeneric );
|
||||
void AddLayersFromAniDir( const CString &_sAniDir, const IniFile& ini );
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -24,15 +24,8 @@ const float SPIRAL_MIN_ZOOM = 0.3f;
|
||||
#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();
|
||||
}
|
||||
|
||||
@@ -370,8 +363,7 @@ void BGAnimationLayer::LoadFromNode( const CString& sDir, const XNode* pNode )
|
||||
|
||||
DEBUG_ASSERT( IsADirectory(sAniDir) );
|
||||
|
||||
CHECKPOINT_M( ssprintf( "BGAnimationLayer::LoadFromIni \"%s\" %s",
|
||||
sAniDir.c_str(), m_bGeneric? "(generic) ":"" ) );
|
||||
CHECKPOINT_M( ssprintf( "BGAnimationLayer::LoadFromIni \"%s\"", sAniDir.c_str() ) );
|
||||
|
||||
{
|
||||
CString expr;
|
||||
@@ -474,13 +466,6 @@ void BGAnimationLayer::LoadFromNode( const CString& sDir, const XNode* pNode )
|
||||
this->AddChild( pActor );
|
||||
if( bStretch )
|
||||
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;
|
||||
case TYPE_PARTICLES:
|
||||
|
||||
@@ -12,7 +12,7 @@ struct XNode;
|
||||
class BGAnimationLayer : public ActorFrame
|
||||
{
|
||||
public:
|
||||
BGAnimationLayer( bool Generic );
|
||||
BGAnimationLayer();
|
||||
~BGAnimationLayer();
|
||||
void Init();
|
||||
void Unload();
|
||||
@@ -43,8 +43,6 @@ protected:
|
||||
//
|
||||
|
||||
// common stuff
|
||||
bool m_bGeneric;
|
||||
|
||||
CString m_sDrawCond;
|
||||
|
||||
// stretch stuff
|
||||
|
||||
Reference in New Issue
Block a user