PocketEmpires/Camera.h

50 lines
1.1 KiB
C++

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