]> git.localhorst.tv Git - l2e.git/blob - src/map/Map.h
trigger handling in map state
[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 "fwd.h"
12 #include "../geometry/Vector.h"
13 #include "../graphics/fwd.h"
14
15 #include <SDL.h>
16
17 namespace map {
18
19 class Map {
20
21 public:
22         Map();
23         ~Map() { }
24
25 public:
26         const graphics::Sprite *Tileset() const { return tileset; }
27         const Area &AreaAt(const geometry::Vector<int> &) const;
28         const Tile &TileAt(const geometry::Vector<int> &) const;
29         Trigger *TriggerAt(const geometry::Vector<int> &);
30
31         void Render(SDL_Surface *dest, const geometry::Vector<int> &offset) const;
32
33 // temporary setters
34 public:
35         void SetTileset(const graphics::Sprite *t) { tileset = t; }
36         void SetAreas(Area *a, int num) { areas = a; numAreas = num; }
37         void SetTriggers(Trigger *t, int num) { triggers = t; numTriggers = num; }
38         void SetWidth(int w) { width = w; }
39
40 private:
41         const graphics::Sprite *tileset;
42         Area *areas;
43         int numAreas;
44         Trigger *triggers;
45         int numTriggers;
46         int width;
47
48 };
49
50 }
51
52 #endif /* MAP_MAP_H_ */