diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2010-05-21 21:56:41 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2010-05-21 21:56:41 +0200 |
commit | 63b4c9869b6256ed7644113cd23305b07cf9df03 (patch) | |
tree | aff0d99f5b58cbaf4195ac755ecfb79f97bf7b65 /src/resources | |
parent | 8c4c5a58c256cce7beb21b68c8a7d6b6ff5c4a3a (diff) | |
parent | 2953a3f92c5097bd99ff21f4536fe167a32d90c5 (diff) | |
download | mana-client-63b4c9869b6256ed7644113cd23305b07cf9df03.tar.gz mana-client-63b4c9869b6256ed7644113cd23305b07cf9df03.tar.bz2 mana-client-63b4c9869b6256ed7644113cd23305b07cf9df03.tar.xz mana-client-63b4c9869b6256ed7644113cd23305b07cf9df03.zip |
Merge branch '1.0'
Conflicts:
src/beingmanager.cpp
src/beingmanager.h
src/client.cpp
src/localplayer.cpp
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/ambientlayer.cpp | 1 | ||||
-rw-r--r-- | src/resources/mapreader.cpp | 2 | ||||
-rw-r--r-- | src/resources/resourcemanager.cpp | 6 |
3 files changed, 7 insertions, 2 deletions
diff --git a/src/resources/ambientlayer.cpp b/src/resources/ambientlayer.cpp index 780baf00..50fe8bd9 100644 --- a/src/resources/ambientlayer.cpp +++ b/src/resources/ambientlayer.cpp @@ -51,6 +51,7 @@ AmbientLayer::AmbientLayer(Image *img, float parallax, std::string idPath = mImage->getIdPath() + "_rescaled"; ResourceManager::getInstance()->addResource(idPath, rescaledOverlay); mImage = rescaledOverlay; + rescaledOverlay->incRef(); } else mImage->incRef(); diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp index 219eb317..e8a2bd20 100644 --- a/src/resources/mapreader.cpp +++ b/src/resources/mapreader.cpp @@ -369,7 +369,7 @@ static void setTile(Map *map, MapLayer *layer, int x, int y, int gid) else { // Set collision tile - if (set && (gid - set->getFirstGid() != 0)) + if (set && (gid - set->getFirstGid() == 1)) map->blockTile(x, y, Map::BLOCKTYPE_WALL); } } diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp index 3d23edcd..3013f20b 100644 --- a/src/resources/resourcemanager.cpp +++ b/src/resources/resourcemanager.cpp @@ -318,7 +318,11 @@ struct DyedImageLoader } int fileSize; void *buffer = l->manager->loadFile(path, fileSize); - if (!buffer) return NULL; + if (!buffer) + { + delete d; + return NULL; + } Resource *res = d ? Image::load(buffer, fileSize, *d) : Image::load(buffer, fileSize); free(buffer); |