diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2008-12-14 18:03:19 +0100 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2008-12-14 18:03:19 +0100 |
commit | 18f418c5cbd169be1b8e65c823e0b07d2d8db197 (patch) | |
tree | ad98ff929cf43690acb80f69e317fb5dcb8ff4f3 /src/resources/mapreader.cpp | |
parent | 69d62451a7a582e3906a7c9328ae14e4bba5ccfa (diff) | |
download | Mana-18f418c5cbd169be1b8e65c823e0b07d2d8db197.tar.gz Mana-18f418c5cbd169be1b8e65c823e0b07d2d8db197.tar.bz2 Mana-18f418c5cbd169be1b8e65c823e0b07d2d8db197.tar.xz Mana-18f418c5cbd169be1b8e65c823e0b07d2d8db197.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. :-)
(cherry picked from eAthena branch, commit
68760426532b9ca4c6939d7a7b8faa1586ee82e0)
Conflicts:
src/being.cpp
src/being.h
src/gui/tabbedcontainer.cpp
src/particle.cpp
src/particle.h
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 34018022..949d7913 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); @@ -280,8 +276,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) { @@ -311,8 +306,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()); @@ -446,10 +440,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")) { |