]> git.localhorst.tv Git - l2e.git/blob - src/menu/HeroStatus.h
12fe62f05cde32c0ee68e0cbf2c97cd3746f650f
[l2e.git] / src / menu / HeroStatus.h
1 /*
2  * HeroStatus.h
3  *
4  *  Created on: Oct 21, 2012
5  *      Author: holy
6  */
7
8 #ifndef MENU_HEROSTATUS_H_
9 #define MENU_HEROSTATUS_H_
10
11 #include "fwd.h"
12 #include "../common/fwd.h"
13 #include "../geometry/Vector.h"
14
15 #include <SDL.h>
16
17 namespace menu {
18
19 class HeroStatus {
20
21 public:
22         HeroStatus();
23         ~HeroStatus();
24
25 public:
26         void SetResources(const Resources *r) { res = r; }
27         void SetHero(const common::Hero *h) { hero = h; }
28         void SetPosition(const geometry::Vector<int> &p) { position = p; }
29
30         int Width() const;
31         int Height() const;
32         geometry::Vector<int> Size() const { return geometry::Vector<int>(Width(), Height()); }
33         const geometry::Vector<int> &Position() const { return position; }
34
35         void Render(SDL_Surface *screen, const geometry::Vector<int> &offset) const;
36
37 private:
38         const Resources *res;
39         const common::Hero *hero;
40         geometry::Vector<int> position;
41
42 };
43
44 }
45
46 #endif /* MENU_HEROSTATUS_H_ */