summaryrefslogtreecommitdiff
path: root/Camera.h
diff options
context:
space:
mode:
authorXaviDCR92 <xavi.dcr@gmail.com>2017-09-08 18:39:22 +0200
committerXaviDCR92 <xavi.dcr@gmail.com>2017-09-08 18:39:22 +0200
commit786dccd2bc0946d48b8a2758ef2c607678bc8dd9 (patch)
tree47952d77e5646a993671134b50c16f32ebe35b1c /Camera.h
parent72d350a37aa67936361ac8a374472b7e0227da61 (diff)
downloadpocketempires-786dccd2bc0946d48b8a2758ef2c607678bc8dd9.tar.gz
Removed Building and GameStructures modules. Restructured SW for Unit and Player, still a lot TODO
Diffstat (limited to 'Camera.h')
-rw-r--r--Camera.h34
1 files changed, 23 insertions, 11 deletions
diff --git a/Camera.h b/Camera.h
index 5cba887..66a9fad 100644
--- a/Camera.h
+++ b/Camera.h
@@ -7,7 +7,6 @@
#include "Global_Inc.h"
#include "Gfx.h"
-#include "Pad.h"
#ifdef __cplusplus
extern "C"
@@ -18,24 +17,37 @@ extern "C"
/* *************************************
* Defines
* *************************************/
-
+
/* *************************************
* Structs and enums
* *************************************/
+typedef struct t_Camera
+{
+ int16_t X_Offset;
+ int16_t Y_Offset;
+ int8_t X_Speed;
+ int8_t Y_Speed;
+ uint8_t Speed_Timer;
+ bool locked;
+}TYPE_CAMERA;
+
+typedef struct t_sprite TYPE_SPRITE;
+
/* *************************************
* Global prototypes
* *************************************/
-void CameraInit(TYPE_CAMERA * ptrCamera);
-void CameraHandler(TYPE_CAMERA * ptrCamera);
-TYPE_COLLISION_BLOCK CameraApplyCoordinatesToCoordinates( TYPE_CAMERA * ptrCamera,
- uint16_t x,
- uint16_t y );
-void CameraApplyCoordinatesToSprite(TYPE_CAMERA * ptrCamera,
- TYPE_SPRITE * spr,
- uint16_t x,
- uint16_t y );
+void CameraInit(TYPE_CAMERA* ptrCamera);
+void CameraHandler(TYPE_CAMERA* ptrCamera);
+void CameraSetLock(TYPE_CAMERA* ptrCamera, bool value);
+void CameraApplyCoordinatesToSprite( TYPE_CAMERA* ptrCamera,
+ TYPE_SPRITE * spr,
+ uint16_t x,
+ uint16_t y );
+TYPE_COLLISION_BLOCK CameraApplyCoordinatesToCoordinates( TYPE_CAMERA* ptrCamera,
+ uint16_t x,
+ uint16_t y );
#ifdef __cplusplus
}