summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDidier 'OdyX' Raboud <didier@raboud.com>2013-10-31 11:29:52 +0100
committerDidier 'OdyX' Raboud <didier@raboud.com>2013-11-13 09:35:32 +0100
commitb32f87bac7cde826db2502422b0696c0d08f0822 (patch)
treee382e6584cf2925eb4a201deb5942a9b655790b7 /src
parent93727a3fdf543d5699f676772e32311fe8383254 (diff)
downloadcolobot-b32f87bac7cde826db2502422b0696c0d08f0822.tar.gz
colobot-b32f87bac7cde826db2502422b0696c0d08f0822.tar.bz2
colobot-b32f87bac7cde826db2502422b0696c0d08f0822.zip
Abstract the definition of LangPath to CSystemUtils
Diffstat (limited to 'src')
-rw-r--r--src/app/app.cpp2
-rw-r--r--src/app/system.cpp7
-rw-r--r--src/app/system.h3
3 files changed, 10 insertions, 2 deletions
diff --git a/src/app/app.cpp b/src/app/app.cpp
index 5693148..ce97335 100644
--- a/src/app/app.cpp
+++ b/src/app/app.cpp
@@ -148,7 +148,7 @@ CApplication::CApplication()
m_trackedKeys = 0;
m_dataPath = GetSystemUtils()->GetDataPath();
- m_langPath = COLOBOT_I18N_DIR;
+ m_langPath = GetSystemUtils()->GetLangPath();
m_texPackPath = "";
m_runSceneName = "";
diff --git a/src/app/system.cpp b/src/app/system.cpp
index 90b7d20..eaa9e4c 100644
--- a/src/app/system.cpp
+++ b/src/app/system.cpp
@@ -194,7 +194,12 @@ float CSystemUtils::TimeStampDiff(SystemTimeStamp *before, SystemTimeStamp *afte
std::string CSystemUtils::GetDataPath()
{
- return std::string(COLOBOT_DEFAULT_DATADIR);
+ return COLOBOT_DEFAULT_DATADIR;
+}
+
+std::string CSystemUtils::GetLangPath()
+{
+ return COLOBOT_I18N_DIR;
}
std::string CSystemUtils::GetProfileFileLocation()
diff --git a/src/app/system.h b/src/app/system.h
index c357bff..c2125fe 100644
--- a/src/app/system.h
+++ b/src/app/system.h
@@ -133,6 +133,9 @@ public:
//! Returns the data path (containing textures, levels, helpfiles, etc)
virtual std::string GetDataPath();
+ //! Returns the translations path
+ virtual std::string GetLangPath();
+
//! Returns the profile (colobot.ini) file location
virtual std::string GetProfileFileLocation();