]> git.localhorst.tv Git - l2e.git/blob - src/map/Map.h
moved map data to maps.l2s
[l2e.git] / src / map / Map.h
1 /*
2  * Map.h
3  *
4  *  Created on: Sep 29, 2012
5  *      Author: holy
6  */
7
8 #ifndef MAP_MAP_H_
9 #define MAP_MAP_H_
10
11 #include "Entity.h"
12 #include "fwd.h"
13 #include "../geometry/Vector.h"
14 #include "../graphics/fwd.h"
15
16 #include <SDL.h>
17
18 namespace map {
19
20 class Map {
21
22 public:
23         Map();
24         ~Map() { }
25
26 public:
27         const graphics::Sprite *Tileset() const { return tileset; }
28         Area *AreaAt(const geometry::Vector<int> &);
29         const Area *AreaAt(const geometry::Vector<int> &) const;
30         Tile *TileAt(const geometry::Vector<int> &);
31         const Tile *TileAt(const geometry::Vector<int> &) const;
32         Trigger *TriggerAt(const geometry::Vector<int> &);
33         SDL_Surface *BattleBackgroundAt(const geometry::Vector<int> &);
34         geometry::Vector<int> TileCoordinates(const geometry::Vector<int> &) const;
35
36         Entity *EntitiesBegin() { return entities; }
37         Entity *EntitiesEnd() { return entities + numEntities; }
38
39         void Render(SDL_Surface *dest, const geometry::Vector<int> &offset) const;
40         void RenderDebug(SDL_Surface *dest, const geometry::Vector<int> &offset) const;
41
42         static void CreateTypeDescription();
43         static void Construct(void *);
44
45 private:
46         const graphics::Sprite *tileset;
47         SDL_Surface *battlebg;
48         Area *areas;
49         int numAreas;
50         Trigger *triggers;
51         int numTriggers;
52         Entity *entities;
53         int numEntities;
54         int width;
55
56 };
57
58 }
59
60 #endif /* MAP_MAP_H_ */