summaryrefslogtreecommitdiff
path: root/src/resources/mapreader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/mapreader.cpp')
-rw-r--r--src/resources/mapreader.cpp27
1 files changed, 11 insertions, 16 deletions
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp
index b4beb558..bb444330 100644
--- a/src/resources/mapreader.cpp
+++ b/src/resources/mapreader.cpp
@@ -42,9 +42,8 @@ const unsigned int DEFAULT_TILE_HEIGHT = 32;
* Inflates either zlib or gzip deflated memory. The inflated memory is
* expected to be freed by the caller.
*/
-int
-inflateMemory(unsigned char *in, unsigned int inLength,
- unsigned char *&out, unsigned int &outLength)
+int inflateMemory(unsigned char *in, unsigned int inLength,
+ unsigned char *&out, unsigned int &outLength)
{
int bufferSize = 256 * 1024;
int ret;
@@ -108,9 +107,8 @@ inflateMemory(unsigned char *in, unsigned int inLength,
return ret == Z_STREAM_END ? Z_OK : Z_DATA_ERROR;
}
-int
-inflateMemory(unsigned char *in, unsigned int inLength,
- unsigned char *&out)
+int inflateMemory(unsigned char *in, unsigned int inLength,
+ unsigned char *&out)
{
unsigned int outLength = 0;
int ret = inflateMemory(in, inLength, out, outLength);
@@ -142,7 +140,7 @@ inflateMemory(unsigned char *in, unsigned int inLength,
return outLength;
}
-Map* MapReader::readMap(const std::string &filename)
+Map *MapReader::readMap(const std::string &filename)
{
// Load the file through resource manager
ResourceManager *resman = ResourceManager::getInstance();
@@ -199,8 +197,7 @@ Map* MapReader::readMap(const std::string &filename)
return map;
}
-Map*
-MapReader::readMap(xmlNodePtr node, const std::string &path)
+Map *MapReader::readMap(xmlNodePtr node, const std::string &path)
{
// Take the filename off the path
const std::string pathDir = path.substr(0, path.rfind("/") + 1);
@@ -284,7 +281,7 @@ MapReader::readMap(xmlNodePtr node, const std::string &path)
return map;
}
-void MapReader::readProperties(xmlNodePtr node, Properties* props)
+void MapReader::readProperties(xmlNodePtr node, Properties *props)
{
for_each_xml_child_node(childNode, node)
{
@@ -313,8 +310,7 @@ static void setTile(Map *map, MapLayer *layer, int x, int y, int gid)
}
}
-void
-MapReader::readLayer(xmlNodePtr node, Map *map)
+void MapReader::readLayer(xmlNodePtr node, Map *map)
{
// Layers are not necessarily the same size as the map
const int w = XML::getProperty(node, "width", map->getWidth());
@@ -448,10 +444,9 @@ MapReader::readLayer(xmlNodePtr node, Map *map)
}
}
-Tileset*
-MapReader::readTileset(xmlNodePtr node,
- const std::string &path,
- Map *map)
+Tileset *MapReader::readTileset(xmlNodePtr node,
+ const std::string &path,
+ Map *map)
{
int firstGid = XML::getProperty(node, "firstgid", 0);
XML::Document* doc = NULL;