diff options
| author | XaviDCR92 <xavi.dcr@gmail.com> | 2018-08-05 17:58:03 +0200 |
|---|---|---|
| committer | XaviDCR92 <xavi.dcr@gmail.com> | 2018-08-05 17:58:03 +0200 |
| commit | 4efe5ad6f9c8abb53df1e06921ce010ced24868e (patch) | |
| tree | 24bae4ac1f561fec6af339ab0a2ce7de0ad28718 /Camera.h | |
| parent | c501d0e4e732e09a4a75d873e976b2c801ef7920 (diff) | |
| download | pocketempires-4efe5ad6f9c8abb53df1e06921ce010ced24868e.tar.gz | |
* Sprite data width and height is now extracted from Sprite class.
Diffstat (limited to 'Camera.h')
| -rw-r--r-- | Camera.h | 35 |
1 files changed, 24 insertions, 11 deletions
@@ -1,25 +1,36 @@ #ifndef CAMERA_H__ #define CAMERA_H__ -/* ************************************* +/* ******************************************************************* * Includes - * *************************************/ + * ******************************************************************/ #include "Cursor.h" #include <stdint.h> #include <stdbool.h> -/* ************************************* +/* ******************************************************************* * Defines - * *************************************/ + * ******************************************************************/ -/* ************************************* - * Structs and enums - * *************************************/ +/* ******************************************************************* + * Global types definition + * ******************************************************************/ -/* ************************************* +/* Forward declaration. */ +class Cursor; + +/* ******************************************************************* + * Global variables declaration + * ******************************************************************/ + +/* ******************************************************************* + * Global functions declaration + * ******************************************************************/ + +/* ******************************************************************* * Class definition - * *************************************/ + * ******************************************************************/ class Camera { @@ -27,8 +38,10 @@ class Camera 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; + int16_t getX(const uint16_t x) const; + int16_t getY(const uint16_t y) const; + uint16_t getRealX(const int16_t x) const; + uint16_t getRealY(const int16_t y) const; /* Event handlers. */ void onLeftBtnPressed(Cursor& cursor); |
