simplify
This commit is contained in:
@@ -140,9 +140,7 @@ void BGAnimation::LoadFromAniDir( CString sAniDir )
|
|||||||
for( unsigned i=0; i<asImagePaths.size(); i++ )
|
for( unsigned i=0; i<asImagePaths.size(); i++ )
|
||||||
{
|
{
|
||||||
const CString sPath = asImagePaths[i];
|
const CString sPath = asImagePaths[i];
|
||||||
CString sDir, sFName, sExt;
|
if( Basename(sPath).Left(1) == "_" )
|
||||||
splitrelpath( sPath, sDir, sFName, sExt );
|
|
||||||
if( sFName.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;
|
BGAnimationLayer* pLayer = new BGAnimationLayer;
|
||||||
pLayer->LoadFromAniLayerFile( asImagePaths[i] );
|
pLayer->LoadFromAniLayerFile( asImagePaths[i] );
|
||||||
|
|||||||
@@ -32,11 +32,7 @@ void AnimatedTexture::Load( CString sTexOrIniPath )
|
|||||||
{
|
{
|
||||||
ASSERT( vFrames.empty() ); // don't load more than once
|
ASSERT( vFrames.empty() ); // don't load more than once
|
||||||
|
|
||||||
CString sDir, sFName, sExt;
|
if( GetExtension(sTexOrIniPath).CompareNoCase("ini")==0 )
|
||||||
splitrelpath( sTexOrIniPath, sDir, sFName, sExt );
|
|
||||||
|
|
||||||
bool bIsIni = sTexOrIniPath.Right(3).CompareNoCase("ini")== 0;
|
|
||||||
if( bIsIni )
|
|
||||||
{
|
{
|
||||||
IniFile ini;
|
IniFile ini;
|
||||||
ini.SetPath( sTexOrIniPath );
|
ini.SetPath( sTexOrIniPath );
|
||||||
@@ -56,7 +52,7 @@ void AnimatedTexture::Load( CString sTexOrIniPath )
|
|||||||
ini.GetValue( "AnimatedTexture", sDelayKey, fDelay ) )
|
ini.GetValue( "AnimatedTexture", sDelayKey, fDelay ) )
|
||||||
{
|
{
|
||||||
RageTextureID ID;
|
RageTextureID ID;
|
||||||
ID.filename = sDir+sFileName;
|
ID.filename = Dirname(sTexOrIniPath) + sFileName;
|
||||||
ID.bStretch = true;
|
ID.bStretch = true;
|
||||||
ID.bHotPinkColorKey = true;
|
ID.bHotPinkColorKey = true;
|
||||||
AnimatedTextureState state = {
|
AnimatedTextureState state = {
|
||||||
|
|||||||
Reference in New Issue
Block a user