summaryrefslogtreecommitdiffstats
path: root/src/object/robotmain.cpp
diff options
context:
space:
mode:
authorkrzys-h <krzys_h@interia.pl>2014-10-27 21:15:14 +0100
committerkrzys-h <krzys_h@interia.pl>2014-10-27 21:15:14 +0100
commitd6e88a07b08585d6a6f151d34a07d8bca78711ea (patch)
tree1c3f385d0883ef3db787d91e6f11edd8323ebc03 /src/object/robotmain.cpp
parent990ecf729038baa995fd7d58d17aceecce343d4b (diff)
downloadcolobot-d6e88a07b08585d6a6f151d34a07d8bca78711ea.tar.gz
colobot-d6e88a07b08585d6a6f151d34a07d8bca78711ea.tar.bz2
colobot-d6e88a07b08585d6a6f151d34a07d8bca78711ea.zip
Support for %lvl% in TerrainInitTextures + cleanup
cleanup: * Removed CProfile::SetUserPath (unused) * Removed CProfile::GetUserBasedPath (unused) * Removed CProfile::CopyFileToTemp (i have no idea why it even existed) * Removed CopyFileListToTemp (it did the same as CopyFileToTemp but for multiple files, wasn't even fully implemented)
Diffstat (limited to 'src/object/robotmain.cpp')
-rw-r--r--src/object/robotmain.cpp13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/object/robotmain.cpp b/src/object/robotmain.cpp
index 62176a1..012b08a 100644
--- a/src/object/robotmain.cpp
+++ b/src/object/robotmain.cpp
@@ -4123,7 +4123,7 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject)
if (line->GetCommand() == "TerrainInitTextures" && !resetObject)
{
- std::string name = line->GetParam("image")->AsPath(""); //TODO: don't make this relative to textures/
+ std::string name = "../"+line->GetParam("image")->AsPath("textures");
if(name.find(".") == std::string::npos)
name += ".png";
unsigned int dx = line->GetParam("dx")->AsInt(1);
@@ -4154,11 +4154,6 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject)
}
}
- /*TODO: ???
- if (strstr(name, "%user%") != 0)
- CopyFileListToTemp(name, tt, dx*dy);
- */
-
m_terrain->InitTextures(name.c_str(), tt, dx, dy);
continue;
}
@@ -4175,12 +4170,6 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject)
if(name.find(".") == std::string::npos)
name += ".png";
name = "../"+name;
- /*TODO: ???
- if (strstr(name, "%user%") != 0)
- {
- GetProfile().CopyFileToTemp(std::string(name));
- }
- */
m_terrain->AddMaterial(line->GetParam("id")->AsInt(0),
name.c_str(),