summaryrefslogtreecommitdiffstats
path: root/src/app
diff options
context:
space:
mode:
authorDidier 'OdyX' Raboud <didier@raboud.com>2013-10-31 10:08:32 +0100
committerDidier 'OdyX' Raboud <didier@raboud.com>2013-11-13 09:35:31 +0100
commit17ad3e5a906c59e8d108b75a6d51cc7528dfa44d (patch)
treedf9aa3e473e29e556d17edef4deca70c0fa878c4 /src/app
parent8f7f56f1eae2998b9431e07a3ed0ea7765eb19ba (diff)
downloadcolobot-17ad3e5a906c59e8d108b75a6d51cc7528dfa44d.tar.gz
colobot-17ad3e5a906c59e8d108b75a6d51cc7528dfa44d.tar.bz2
colobot-17ad3e5a906c59e8d108b75a6d51cc7528dfa44d.zip
Abstract the definition of DataPath to CSystemUtils
Diffstat (limited to 'src/app')
-rw-r--r--src/app/app.cpp2
-rw-r--r--src/app/system.cpp5
-rw-r--r--src/app/system.h3
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();