Henry Triff / Mbed 2 deprecated ELEC2645_Project_el18ht

Dependencies:   mbed

Revision:
6:5f76dd718dc3
Child:
7:2ce6e90f6d47
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Ghost/Ghost.h	Wed Feb 19 21:40:21 2020 +0000
@@ -0,0 +1,85 @@
+#ifndef GHOST_H
+#define GHOST_H
+
+#include "mbed.h"
+#include "Gamepad.h"
+#include "N5110.h"
+#include "FXOS8700CQ.h"
+#include "Graphics.h"
+#include "Controls.h"
+#include "Mechanics.h"
+#include "Menu.h"
+#include "LEDs.h"
+#include "Ghost.h"
+#include <string>
+
+#ifndef STRUCTS
+#define STRUCTS
+
+//STRUCTS
+struct Point_2D {
+    float x;
+    float y;
+};
+struct Line_2D {
+    Point_2D from;
+    Point_2D to;
+};
+
+struct Square_2D {
+    Point_2D TL;
+    Point_2D BR;
+};
+struct Triangle_2D {
+    Point_2D TL;
+    Point_2D BR;
+    int Type;
+};
+
+struct Map_Data {
+    int number_of_track_lines;
+    int number_of_dotted_lines;
+    int number_of_flags;
+    int number_of_walls;
+    int number_of_off_track_squares;
+    int number_of_off_track_triangles;
+    int number_of_out_of_bounds_squares;
+    int number_of_out_of_bounds_triangles;
+    int number_of_gates;
+    int number_of_boost_plates;
+};
+
+struct Time {
+    int mins;
+    int secs;
+    int milis;
+};
+
+struct Gyro_Data {
+    float ax;
+    float ay;
+    float az;
+    float mx;
+    float my;
+    float mz;
+};
+
+#endif
+
+static Point_2D Ghost_Data[6000];
+static int Ghost_Held_Data_Time = 0;
+static Point_2D Ghost_Held_Data[6000];
+
+class Ghost
+{
+public:
+
+    void Record(Point_2D position, int race_time);
+    void Copy(int race_time);
+    Point_2D Play(bool ghost_available, int race_time);
+
+private:
+
+};
+
+#endif
\ No newline at end of file