diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-09-29 11:03:48 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-09-29 11:03:48 +0000 |
commit | c00d3acf930359740ae6125533b5233ae06b765e (patch) | |
tree | a1ba92c7142c455e95758b37daf35a959903bf8a /src/resources/mapreader.h | |
parent | 4d117b39c555966d7648a03e0127560278e47170 (diff) | |
download | mana-c00d3acf930359740ae6125533b5233ae06b765e.tar.gz mana-c00d3acf930359740ae6125533b5233ae06b765e.tar.bz2 mana-c00d3acf930359740ae6125533b5233ae06b765e.tar.xz mana-c00d3acf930359740ae6125533b5233ae06b765e.zip |
Moved tileset management into the map class and made sure the tilesets are
cleaned up properly on switching maps.
Diffstat (limited to 'src/resources/mapreader.h')
-rw-r--r-- | src/resources/mapreader.h | 46 |
1 files changed, 3 insertions, 43 deletions
diff --git a/src/resources/mapreader.h b/src/resources/mapreader.h index f37a67c3..1e4ada64 100644 --- a/src/resources/mapreader.h +++ b/src/resources/mapreader.h @@ -21,8 +21,8 @@ * $Id$ */ -#ifndef _INCLUDED_MAPREADER_H -#define _INCLUDED_MAPREADER_H +#ifndef _TMW_MAPREADER_H_ +#define _TMW_MAPREADER_H_ #include <vector> @@ -31,25 +31,7 @@ #include "../graphic/spriteset.h" class Map; - -/** - * A tileset, which is basically just a spriteset but it stores a firstgid. - */ -class Tileset : public Spriteset { - public: - /** - * Constructor. - */ - Tileset(Image *img, int w, int h, int firstGid); - - /** - * Returns the first gid. - */ - int getFirstGid(); - - private: - int firstGid; -}; +class Tileset; /** * Reader for XML map files (*.tmx) @@ -88,28 +70,6 @@ class MapReader */ static int getProperty(xmlNodePtr node, const char* name, int def); - - /** - * Converts a global tile id to the Image* pointing to the associated - * tile image. - */ - static Image* - getTileWithGid(int gid); - - /** - * Finds the tile set that a tile with the given global id is part of. - */ - static Tileset* - getTilesetWithGid(int gid); - - /** - * Sets a tile using a global tile id. Used by the layer loading - * routine. - */ - static void - setTileWithGid(Map *map, int x, int y, int layer, int gid); - - static std::vector<Tileset*> tilesets; }; #endif |