use GetExtension, Dirname, Basename

This commit is contained in:
Glenn Maynard
2003-10-29 20:46:37 +00:00
parent c18079e3e6
commit e2c2ae4941
4 changed files with 7 additions and 30 deletions
+2 -7
View File
@@ -84,12 +84,6 @@ bool Sprite::LoadFromSpriteFile( RageTextureID ID )
m_sSpritePath = ID.filename;
// Split for the directory. We'll need it below
CString sFontDir, sFontFileName, sFontExtension;
splitrelpath( m_sSpritePath, sFontDir, sFontFileName, sFontExtension );
// read sprite file
IniFile ini;
ini.SetPath( m_sSpritePath );
@@ -101,7 +95,8 @@ bool Sprite::LoadFromSpriteFile( RageTextureID ID )
if( sTextureFile == "" )
RageException::Throw( "Error reading value 'Texture' from %s.", m_sSpritePath.c_str() );
ID.filename = sFontDir + sTextureFile; // save the path of the real texture
// save the path of the real texture
ID.filename = Dirname(m_sSpritePath) + sTextureFile;
{
vector<CString> asElementPaths;
GetDirListing( ID.filename + "*", asElementPaths, false, true );