summaryrefslogtreecommitdiff
path: root/src/resources/mapreader.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-03-26 01:54:25 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-03-26 01:54:25 +0000
commitb40bfe580d2dc9038c00521a44fcd6edd352f239 (patch)
treeab6ca6ea7b4592bba4e10bddac773528f6467853 /src/resources/mapreader.cpp
parentaa3877cbe156b04c9194856e92ab0dbc129280c1 (diff)
downloadmana-b40bfe580d2dc9038c00521a44fcd6edd352f239.tar.gz
mana-b40bfe580d2dc9038c00521a44fcd6edd352f239.tar.bz2
mana-b40bfe580d2dc9038c00521a44fcd6edd352f239.tar.xz
mana-b40bfe580d2dc9038c00521a44fcd6edd352f239.zip
Images are now exclusively loaded through PhysFS, and Tiled maps should load
fine again.
Diffstat (limited to 'src/resources/mapreader.cpp')
-rw-r--r--src/resources/mapreader.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp
index 31048207..c656edba 100644
--- a/src/resources/mapreader.cpp
+++ b/src/resources/mapreader.cpp
@@ -236,9 +236,11 @@ Tileset* MapReader::readTileset(
if (source)
{
+ std::string sourceStr = std::string((const char*)source);
+ sourceStr.erase(0, 3); // Remove "../"
+
ResourceManager *resman = ResourceManager::getInstance();
- Image* tilebmp = resman->getImage(path +
- std::string((const char*)source));
+ Image* tilebmp = resman->getImage(sourceStr);
if (tilebmp)
{
@@ -247,7 +249,7 @@ Tileset* MapReader::readTileset(
return set;
}
else {
- logger.log("Warning: Failed to load tileset (%s)\n", source);
+ logger.log("Warning: Failed to load tileset (%s)", source);
}
}