diff options
author | Simponic <loganthebean222@gmail.com> | 2020-08-11 22:13:56 -0600 |
---|---|---|
committer | Simponic <loganthebean222@gmail.com> | 2020-08-11 22:13:56 -0600 |
commit | 723f879f85f25c2d466146e08261e0ae993c72b6 (patch) | |
tree | 185f367c712554f92c14b0074503ff0667e098c3 /include | |
parent | e84e232f8d003f3cf3340517d8bf6b65ba430143 (diff) | |
download | geometry-dash-gba-723f879f85f25c2d466146e08261e0ae993c72b6.tar.gz geometry-dash-gba-723f879f85f25c2d466146e08261e0ae993c72b6.zip |
Added basic camera controls
Diffstat (limited to 'include')
-rw-r--r-- | include/camera.h | 14 | ||||
-rw-r--r-- | include/map.h | 2 | ||||
-rw-r--r-- | include/playerObject.h | 2 |
3 files changed, 17 insertions, 1 deletions
diff --git a/include/camera.h b/include/camera.h new file mode 100644 index 0000000..7984763 --- /dev/null +++ b/include/camera.h @@ -0,0 +1,14 @@ +#include "types.h" + +#ifndef CAMERA_H +#define CAMERA_H + +typedef struct CAMERA { + int x; + int y; +} ALIGN(4) CAMERA; + +CAMERA createCamera(); +void applyCameraShift(); + +#endif // CAMERA_H diff --git a/include/map.h b/include/map.h index 9a8a264..1bef313 100644 --- a/include/map.h +++ b/include/map.h @@ -3,6 +3,6 @@ #ifndef MAP_H #define MAP_H -extern const int map1[7][20]; +extern const int map1[9][20]; #endif // MAP_H diff --git a/include/playerObject.h b/include/playerObject.h index 7feb894..acfadbc 100644 --- a/include/playerObject.h +++ b/include/playerObject.h @@ -4,6 +4,7 @@ #include "toolbox.h" #include "fixed.h" #include "sinlut.h" +#include "camera.h" #ifndef PLAYEROBJECT_H #define PLAYEROBJECT_H @@ -11,6 +12,7 @@ #define GRAVITY 0.75 typedef struct playerObject { + CAMERA camera; VELOCITY vel; POINT pt; u32 rotation; // Rotation amount |