merge IniFile and XmlFile

This commit is contained in:
Chris Danford
2005-01-07 14:28:00 +00:00
parent 5b2582cab3
commit 981e52ec58
27 changed files with 427 additions and 509 deletions
+6 -5
View File
@@ -41,11 +41,12 @@ void AnimatedTexture::Load( CString sTexOrIniPath )
if( !ini.ReadFile( sTexOrIniPath ) )
RageException::Throw( "Error reading %s: %s", sTexOrIniPath.c_str(), ini.GetError().c_str() );
if( !ini.GetKey("AnimatedTexture") )
const XNode* pAnimatedTexture = ini.GetChild("AnimatedTexture");
if( pAnimatedTexture == NULL )
RageException::Throw( "The animated texture file '%s' doesn't contain a section called 'AnimatedTexture'.", sTexOrIniPath.c_str() );
ini.GetValue( "AnimatedTexture", "TexVelocityX", m_fTexVelocityX );
ini.GetValue( "AnimatedTexture", "TexVelocityY", m_fTexVelocityY );
pAnimatedTexture->GetAttrValue( "TexVelocityX", m_fTexVelocityX );
pAnimatedTexture->GetAttrValue( "TexVelocityY", m_fTexVelocityY );
for( int i=0; i<1000; i++ )
{
@@ -54,8 +55,8 @@ void AnimatedTexture::Load( CString sTexOrIniPath )
CString sFileName;
float fDelay = 0;
if( ini.GetValue( "AnimatedTexture", sFileKey, sFileName ) &&
ini.GetValue( "AnimatedTexture", sDelayKey, fDelay ) )
if( pAnimatedTexture->GetAttrValue( sFileKey, sFileName ) &&
pAnimatedTexture->GetAttrValue( sDelayKey, fDelay ) )
{
RageTextureID ID;
ID.filename = Dirname(sTexOrIniPath) + sFileName;