diff options
author | Simponic <loganthebean222@gmail.com> | 2020-08-08 18:16:34 -0600 |
---|---|---|
committer | Simponic <loganthebean222@gmail.com> | 2020-08-08 18:16:34 -0600 |
commit | 7f856467a086ec9a3ebd1ccdf12e578dffb9c98b (patch) | |
tree | 191714e3ef0daf90d5252532dd0db3f4f0256de5 /include/point.h | |
parent | 6a44a34e0ebb867753df26f1cb0a38f53420a606 (diff) | |
download | geometry-dash-gba-7f856467a086ec9a3ebd1ccdf12e578dffb9c98b.tar.gz geometry-dash-gba-7f856467a086ec9a3ebd1ccdf12e578dffb9c98b.zip |
Player added
Diffstat (limited to 'include/point.h')
-rw-r--r-- | include/point.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/include/point.h b/include/point.h new file mode 100644 index 0000000..5c69422 --- /dev/null +++ b/include/point.h @@ -0,0 +1,28 @@ +#include "types.h" +#include "fixed.h" + +#ifndef POINT_H +#define POINT_H + +typedef struct POINT { + FIXED x; + FIXED y; +} ALIGN(4) POINT; + +static inline POINT createPoint (FIXED x, FIXED y) { + // Create a point from data + POINT temp; + temp.x = x; + temp.y = y; + return temp; +} + +static inline POINT addPoint (POINT *a, POINT *b) { + // Add two points + POINT temp; + temp.x = a->x + b->x; + temp.y = a->y + b->y; + return temp; +} + +#endif // POINT_H |