55 lines
1.5 KiB
C++
55 lines
1.5 KiB
C++
#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__ */
|
|
|