PocketEmpires/Camera.h

47 lines
1.1 KiB
C++

#ifndef CAMERA_H__
#define CAMERA_H__
/* *************************************
* Includes
* *************************************/
#include "Cursor.h"
#include <stdint.h>
#include <stdbool.h>
/* *************************************
* Defines
* *************************************/
/* *************************************
* Structs and enums
* *************************************/
/* *************************************
* Class definition
* *************************************/
class Camera
{
public:
Camera(void);
void adjustLock(const bool bLock);
bool isLocked(void) const;
uint8_t getX(const uint8_t x) const;
uint8_t getY(const uint8_t y) const;
/* Event handlers. */
void onLeftBtnPressed(Cursor& cursor);
void onRightBtnPressed(Cursor& cursor);
void onUpBtnPressed(Cursor& cursor);
void onDownBtnPressed(Cursor& cursor);
private:
bool _bLocked;
int16_t _xOffset;
int16_t _yOffset;
uint8_t _speedTimer;
};
#endif /* CAMERA_H__ */