Abstract the definition of DataPath to CSystemUtils
parent
8f7f56f1ea
commit
17ad3e5a90
|
@ -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 = "";
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue