blob: 90d55cc52b3a562cb1169c750b8ea87fb30b9fbf (
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 CURSOR_H__
#define CURSOR_H__
/* *******************************************************************
* Includes
* ******************************************************************/
#include "Camera.h"
#include <stdbool.h>
#include <stdint.h>
/* *******************************************************************
* Defines
* ******************************************************************/
/* *******************************************************************
* Global types definition
* ******************************************************************/
/* Forward declaration. */
class Camera;
/* *******************************************************************
* Global variables declaration
* ******************************************************************/
/* *******************************************************************
* Global functions declaration
* ******************************************************************/
/* *******************************************************************
* Class definition
* ******************************************************************/
class Cursor
{
public:
explicit Cursor(const Camera& c);
void move(const int8_t x = 0, const int8_t y = 0);
uint8_t getX(void);
uint8_t getY(void);
uint8_t getScreenX(void);
uint8_t getScreenY(void);
bool isXCentered(void);
bool isYCentered(void);
private:
uint8_t _x;
uint8_t _y;
const Camera& _cam;
};
#endif /* CURSOR_H__ */
|