From b32f87bac7cde826db2502422b0696c0d08f0822 Mon Sep 17 00:00:00 2001 From: Didier 'OdyX' Raboud Date: Thu, 31 Oct 2013 11:29:52 +0100 Subject: Abstract the definition of LangPath to CSystemUtils --- src/app/app.cpp | 2 +- src/app/system.cpp | 7 ++++++- src/app/system.h | 3 +++ 3 files changed, 10 insertions(+), 2 deletions(-) (limited to 'src') 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(); -- cgit v1.2.3-1-g7c22