From 6a8a81a09526019dc324670edd62c777993248c6 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 31 Aug 2005 22:15:33 +0000 Subject: [PATCH] remove Generic stuff. It broke a while back, and it's too painful to keep around. --- stepmania/src/BGAnimation.cpp | 12 ++++++------ stepmania/src/BGAnimation.h | 4 ++-- stepmania/src/BGAnimationLayer.cpp | 19 ++----------------- stepmania/src/BGAnimationLayer.h | 4 +--- 4 files changed, 11 insertions(+), 28 deletions(-) diff --git a/stepmania/src/BGAnimation.cpp b/stepmania/src/BGAnimation.cpp index 2fec3ae60a..2d3084b612 100644 --- a/stepmania/src/BGAnimation.cpp +++ b/stepmania/src/BGAnimation.cpp @@ -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 ); } diff --git a/stepmania/src/BGAnimation.h b/stepmania/src/BGAnimation.h index aab665e4a3..daea171d3a 100644 --- a/stepmania/src/BGAnimation.h +++ b/stepmania/src/BGAnimation.h @@ -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 diff --git a/stepmania/src/BGAnimationLayer.cpp b/stepmania/src/BGAnimationLayer.cpp index 73799f6ebd..c3292d6644 100644 --- a/stepmania/src/BGAnimationLayer.cpp +++ b/stepmania/src/BGAnimationLayer.cpp @@ -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: diff --git a/stepmania/src/BGAnimationLayer.h b/stepmania/src/BGAnimationLayer.h index dc0b182304..f6ed7a37ec 100644 --- a/stepmania/src/BGAnimationLayer.h +++ b/stepmania/src/BGAnimationLayer.h @@ -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