blob: 55ee7de54531bbcdebbed42eed7814b634820f15 (
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
/* *******************************************************************
* Includes
* ******************************************************************/
#include "BaseUnit.h"
#include <stdbool.h>
#include <stdint.h>
/* *******************************************************************
* Defines
* ******************************************************************/
/* *******************************************************************
* Types definition
* ******************************************************************/
/* *******************************************************************
* Global variables definition
* ******************************************************************/
/* *******************************************************************
* Local variables definition
* ******************************************************************/
/* *******************************************************************
* Local prototypes declaration
* ******************************************************************/
/* *******************************************************************
* Functions definition
* ******************************************************************/
/*****************************************************************//**
*
* \brief Constructor for BaseUnit class.
*
*********************************************************************/
BaseUnit::BaseUnit(void) :
_hp(0),
_alive(false),
_selected(false),
_x(0),
_y(0)
{
}
/*****************************************************************//**
*
* \brief This function is executed when user wants to create
* a new object derived from BaseUnit, and this function
* sets default parameters for a BaseUnit abstract object.
*
*********************************************************************/
void BaseUnit::create(const uint16_t x, const uint16_t y)
{
_alive = true;
_x = x;
_y = y;
}
/*****************************************************************//**
*
* \brief Periodical handler for BaseUnit class.
*
*********************************************************************/
void BaseUnit::handler(void)
{
}
|