2012-07-20 16:14:09 +00:00
|
|
|
#include "GameData.h"
|
2012-07-21 19:06:24 +00:00
|
|
|
#include <iostream>
|
2012-07-20 16:14:09 +00:00
|
|
|
|
|
|
|
GameData::GameData(SystemData* system, std::string path, std::string name)
|
|
|
|
{
|
|
|
|
mSystem = system;
|
|
|
|
mPath = path;
|
|
|
|
mName = name;
|
|
|
|
}
|
|
|
|
|
|
|
|
std::string GameData::getName()
|
|
|
|
{
|
|
|
|
return mName;
|
|
|
|
}
|
2012-07-21 19:06:24 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
std::string GameData::getValidPath()
|
|
|
|
{
|
|
|
|
//a quick and dirty way to insert a backslash before spaces
|
|
|
|
std::string path = mPath;
|
|
|
|
for(unsigned int i = 0; i < path.length(); i++)
|
|
|
|
{
|
|
|
|
if(path[i] == *" ")
|
|
|
|
{
|
|
|
|
path.insert(i, "\\");
|
|
|
|
i++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return path;
|
|
|
|
}
|