diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2008-12-08 20:58:10 +0100 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2008-12-08 21:22:43 +0100 |
commit | 68760426532b9ca4c6939d7a7b8faa1586ee82e0 (patch) | |
tree | 891f475717294eef4c68af4bb830f35744643075 /src/resources/mapreader.cpp | |
parent | ddc93c461070fb3d868fbb5426e8361d1b93ee38 (diff) | |
download | mana-client-68760426532b9ca4c6939d7a7b8faa1586ee82e0.tar.gz mana-client-68760426532b9ca4c6939d7a7b8faa1586ee82e0.tar.bz2 mana-client-68760426532b9ca4c6939d7a7b8faa1586ee82e0.tar.xz mana-client-68760426532b9ca4c6939d7a7b8faa1586ee82e0.zip |
Code reformatting
I wish I had never fallen for this weird style, and I hope removing it
will prevent others from introducing new code like this. :-)
Diffstat (limited to 'src/resources/mapreader.cpp')
-rw-r--r-- | src/resources/mapreader.cpp | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp index 4c37c239..835e52b3 100644 --- a/src/resources/mapreader.cpp +++ b/src/resources/mapreader.cpp @@ -43,9 +43,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; @@ -109,9 +108,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); @@ -143,8 +141,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(); @@ -201,8 +198,7 @@ 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); @@ -289,8 +285,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) { @@ -319,8 +314,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()); @@ -454,10 +448,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) { if (xmlHasProp(node, BAD_CAST "source")) { |