summaryrefslogtreecommitdiffstats
path: root/src/object/robotmain.cpp
diff options
context:
space:
mode:
authorerihel <erihel@gmail.com>2013-03-17 19:01:32 +0100
committererihel <erihel@gmail.com>2013-03-17 19:01:32 +0100
commitd6bbc99c90ef586b041651d373524b30fe6c8676 (patch)
treee01eee683dc4e693450769a441a37c9d070b97d1 /src/object/robotmain.cpp
parent9f5bef030d97e9ee20d8c635335fdafd854fed44 (diff)
downloadcolobot-d6bbc99c90ef586b041651d373524b30fe6c8676.tar.gz
colobot-d6bbc99c90ef586b041651d373524b30fe6c8676.tar.bz2
colobot-d6bbc99c90ef586b041651d373524b30fe6c8676.zip
* Changed file loading to fix issue #73
* Moved few functions from misc.cpp to profile.cpp (used to set/get user dir) * Removed some warnings * More work to change const char* to std::string * Some work on file path to fix issue #60 with bad slashes on POSIX platform
Diffstat (limited to 'src/object/robotmain.cpp')
-rw-r--r--src/object/robotmain.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/object/robotmain.cpp b/src/object/robotmain.cpp
index da6ac42..635fc4e 100644
--- a/src/object/robotmain.cpp
+++ b/src/object/robotmain.cpp
@@ -1187,7 +1187,7 @@ void CRobotMain::ChangePhase(Phase phase)
pe->SetFontType(Gfx::FONT_COLOBOT);
pe->SetEditCap(false);
pe->SetHiliteCap(false);
- pe->ReadText("help/win.txt");
+ pe->ReadText(std::string("help/win.txt"));
}
else
{
@@ -4094,8 +4094,9 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject)
{
OpString(line, "image", name);
AddExt(name, ".png");
- if (strstr(name, "%user%") != 0)
- CopyFileToTemp(name);
+ if (strstr(name, "%user%") != 0) {
+ GetProfile().CopyFileToTemp(std::string(name));
+ }
m_terrain->AddMaterial(OpInt(line, "id", 0),
name,