protected string GetAlternateName( string textureName )
{
// Get alternative JPG to TGA and vice versa
int pos;
string ext, baseName;
pos = textureName.LastIndexOf( "." );
ext = textureName.Substring( pos, 4 ).ToLower();
baseName = textureName.Substring( 0, pos );
if ( ext == ".jpg" )
{
return baseName + ".tga";
}
else
{
return baseName + ".jpg";
}
}