From 4efe5ad6f9c8abb53df1e06921ce010ced24868e Mon Sep 17 00:00:00 2001 From: XaviDCR92 Date: Sun, 5 Aug 2018 17:58:03 +0200 Subject: * Sprite data width and height is now extracted from Sprite class. --- Camera.h | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) (limited to 'Camera.h') diff --git a/Camera.h b/Camera.h index 6ff3045..3b3acad 100644 --- a/Camera.h +++ b/Camera.h @@ -1,25 +1,36 @@ #ifndef CAMERA_H__ #define CAMERA_H__ -/* ************************************* +/* ******************************************************************* * Includes - * *************************************/ + * ******************************************************************/ #include "Cursor.h" #include #include -/* ************************************* +/* ******************************************************************* * 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); -- cgit v1.2.3