Abstract the definition of DataPath to CSystemUtils

dev-ui
Didier 'OdyX' Raboud 2013-10-31 10:08:32 +01:00
parent 8f7f56f1ea
commit 17ad3e5a90
3 changed files with 9 additions and 1 deletions

View File

@ -147,7 +147,7 @@ CApplication::CApplication()
m_mouseButtonsState = 0;
m_trackedKeys = 0;
m_dataPath = COLOBOT_DEFAULT_DATADIR;
m_dataPath = GetSystemUtils()->GetDataPath();
m_langPath = COLOBOT_I18N_DIR;
m_texPackPath = "";

View File

@ -192,6 +192,11 @@ float CSystemUtils::TimeStampDiff(SystemTimeStamp *before, SystemTimeStamp *afte
return result;
}
std::string CSystemUtils::GetDataPath()
{
return std::string(COLOBOT_DEFAULT_DATADIR);
}
std::string CSystemUtils::GetProfileFileLocation()
{
return std::string("colobot.ini");

View File

@ -130,6 +130,9 @@ public:
/** The difference is \a after - \a before. */
virtual long long TimeStampExactDiff(SystemTimeStamp *before, SystemTimeStamp *after) = 0;
//! Returns the data path (containing textures, levels, helpfiles, etc)
virtual std::string GetDataPath();
//! Returns the profile (colobot.ini) file location
virtual std::string GetProfileFileLocation();