blob: 5347a6a2d2fdf31c2bdf779b19083eacc9d12566 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
#ifndef BASEUNIT_H__
#define BASEUNIT_H__
/* *******************************************************************
* Includes
* ******************************************************************/
#include <stdbool.h>
#include <stdint.h>
#include "Camera.h"
/* *******************************************************************
* Defines
* ******************************************************************/
/* *******************************************************************
* Global types definition
* ******************************************************************/
/* *******************************************************************
* Global variables declaration
* ******************************************************************/
/* *******************************************************************
* Global functions declaration
* ******************************************************************/
/* *******************************************************************
* Class definition
* ******************************************************************/
class BaseUnit
{
public:
explicit BaseUnit(void);
void handler(void);
void drawHandler(const uint8_t* const pu8SprData);
void create(const uint16_t x, const uint16_t y);
static void setCamera(const Camera* const c);
bool isAlive(void);
bool isSelected(void);
void setSelected(const bool bSelect);
uint16_t getX(void);
uint16_t getY(void);
protected:
uint16_t _hp; /**< Health points. */
bool _alive; /**< Alive unit flag. */
bool _selected; /**< Selected unit flag. */
uint16_t _x; /**< X coordinate inside map. */
uint16_t _y; /**< Y coordinate inside map. */
};
#endif /* BASEUNIT_H__ */
|