diff options
author | krzys-h <krzys_h@interia.pl> | 2014-05-18 12:12:47 +0200 |
---|---|---|
committer | krzys-h <krzys_h@interia.pl> | 2014-05-18 12:12:47 +0200 |
commit | f0d97bfdb91a2c0a17d1697b145d4df930280dbb (patch) | |
tree | 2d529428006e145b624108cce636b07867f566af /src/object/robotmain.cpp | |
parent | f71658e38dbcfc5635a6b2a9c6c4168582728bb5 (diff) | |
download | colobot-f0d97bfdb91a2c0a17d1697b145d4df930280dbb.tar.gz colobot-f0d97bfdb91a2c0a17d1697b145d4df930280dbb.tar.bz2 colobot-f0d97bfdb91a2c0a17d1697b145d4df930280dbb.zip |
Better datadir mod support
Diffstat (limited to 'src/object/robotmain.cpp')
-rw-r--r-- | src/object/robotmain.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/object/robotmain.cpp b/src/object/robotmain.cpp index 256c362..2424938 100644 --- a/src/object/robotmain.cpp +++ b/src/object/robotmain.cpp @@ -20,6 +20,7 @@ #include "CBot/CBotDll.h" #include "app/app.h" +#include "app/gamedata.h" #include "common/event.h" #include "common/global.h" @@ -4081,7 +4082,7 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject) if (Cmd(line, "Instructions") && !resetObject) { OpString(line, "name", name); - std::string path = m_app->GetDataFilePath(DIR_HELP, name); + std::string path = CGameData::GetInstancePointer()->GetFilePath(DIR_HELP, name); strcpy(m_infoFilename[SATCOM_HUSTON], path.c_str()); m_immediatSatCom = OpInt(line, "immediat", 0); @@ -4093,7 +4094,7 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject) if (Cmd(line, "Satellite") && !resetObject) { OpString(line, "name", name); - std::string path = m_app->GetDataFilePath(DIR_HELP, name); + std::string path = CGameData::GetInstancePointer()->GetFilePath(DIR_HELP, name); strcpy(m_infoFilename[SATCOM_SAT], path.c_str()); continue; } @@ -4101,7 +4102,7 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject) if (Cmd(line, "Loading") && !resetObject) { OpString(line, "name", name); - std::string path = m_app->GetDataFilePath(DIR_HELP, name); + std::string path = CGameData::GetInstancePointer()->GetFilePath(DIR_HELP, name); strcpy(m_infoFilename[SATCOM_LOADING], path.c_str()); continue; } @@ -4109,14 +4110,14 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject) if (Cmd(line, "HelpFile") && !resetObject) { OpString(line, "name", name); - std::string path = m_app->GetDataFilePath(DIR_HELP, name); + std::string path = CGameData::GetInstancePointer()->GetFilePath(DIR_HELP, name); strcpy(m_infoFilename[SATCOM_PROG], path.c_str()); continue; } if (Cmd(line, "SoluceFile") && !resetObject) { OpString(line, "name", name); - std::string path = m_app->GetDataFilePath(DIR_HELP, name); + std::string path = CGameData::GetInstancePointer()->GetFilePath(DIR_HELP, name); strcpy(m_infoFilename[SATCOM_SOLUCE], path.c_str()); continue; } |