From 786dccd2bc0946d48b8a2758ef2c607678bc8dd9 Mon Sep 17 00:00:00 2001 From: XaviDCR92 Date: Fri, 8 Sep 2017 18:39:22 +0200 Subject: Removed Building and GameStructures modules. Restructured SW for Unit and Player, still a lot TODO --- Camera.h | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) (limited to 'Camera.h') 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 } -- cgit v1.2.3