Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: Ghost/Ghost.h
- Revision:
- 10:29126a41b1da
- Parent:
- 7:2ce6e90f6d47
- Child:
- 11:7b12992156de
--- a/Ghost/Ghost.h Thu Mar 05 15:40:21 2020 +0000 +++ b/Ghost/Ghost.h Wed Mar 25 15:36:01 2020 +0000 @@ -5,6 +5,7 @@ #include "Gamepad.h" #include "N5110.h" #include "FXOS8700CQ.h" +#include "SDFileSystem.h" #include "Graphics.h" #include "Mechanics.h" #include "Menu.h" @@ -74,13 +75,28 @@ static int Ghost_Held_Data_Time = 0; static Point_2D Ghost_Held_Data[6000]; +#ifndef ENUMS +#define ENUMS +enum track {Small, Medium, Large}; +enum cars {Basic, Offroad, Drifter, Sportscar, Racecar, Stupid}; +#endif + class Ghost { public: void Record(Point_2D position, int race_time); - void Copy(int race_time); + void Copy(int race_time, int track, int car, SDFileSystem &SD); Point_2D Play(bool ghost_available, int race_time); + bool SD_init(SDFileSystem &SD); + void SD_Write(int track, int car, int race_time, SDFileSystem &SD); + void SD_Read(int track, int car, SDFileSystem &SD); + + void SD_Write_Data(string name, int race_time, SDFileSystem &SD); + void SD_Write_Time(int track, int car, int race_time, SDFileSystem &SD); + void SD_Read_Data(string name, int race_time, SDFileSystem &SD); + void SD_Read_Time(int track, int car, SDFileSystem &SD); + int SD_Get_Time(int track, int car, SDFileSystem &SD); private: