diff options
Diffstat (limited to 'src/app')
-rw-r--r-- | src/app/app.cpp | 2 | ||||
-rw-r--r-- | src/app/system.cpp | 5 | ||||
-rw-r--r-- | src/app/system.h | 3 |
3 files changed, 9 insertions, 1 deletions
diff --git a/src/app/app.cpp b/src/app/app.cpp index e2405b8..404c615 100644 --- a/src/app/app.cpp +++ b/src/app/app.cpp @@ -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 = ""; diff --git a/src/app/system.cpp b/src/app/system.cpp index ce69469..90b7d20 100644 --- a/src/app/system.cpp +++ b/src/app/system.cpp @@ -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"); diff --git a/src/app/system.h b/src/app/system.h index d22a519..c357bff 100644 --- a/src/app/system.h +++ b/src/app/system.h @@ -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(); |