Example #1
0
rString gfx::MaterialBank::GetDir(rString& filename)
{
	bool found = false;
	for (int i = static_cast<int>(filename.size()); i > 0; i--)
	{
		if (filename.c_str()[i] == '/' || filename.c_str()[i] == '\\' )
			found = true;
		if (!found)
		{
			filename.erase(i);
		}

	}
	return filename;
}
Example #2
0
rString gfx::ShaderProgram::GetDir ( rString filename )
{
    bool found = false;
    for ( int i = static_cast<int> ( filename.size() ); i > 0; i-- )
    {
        if ( filename.c_str() [i] == '/' )
        {
            found = true;
        }
        if ( !found )
        {
            filename.erase ( i );
        }
    }
    return filename;
}
Example #3
0
rString gfx::TextureAtlas::GetDir ( rString str )
{
    bool found = false;
    for ( int i = static_cast<int> ( str.size() ); i > 0; i-- )
    {
        if ( str.c_str() [i] == '/' )
        {
            found = true;
        }
        if ( !found )
        {
            str.erase ( i );
        }

    }
    return str;
}