Max Houghton
/
MazeGame_el15mh
el15mh 200929957
main.cpp
- Committer:
- el15mh
- Date:
- 2017-04-07
- Revision:
- 5:55eee1d71c1d
- Parent:
- 4:66ab008f7b06
- Child:
- 6:84572bbd9c5c
File content as of revision 5:55eee1d71c1d:
#include "mbed.h" #include "N5110.h" #include "Gamepad.h" #include "Menu.h" #include "Maze.h" #include "Ball.h" #include "MazeEngine.h" // CREATE OBJECTS // N5110 lcd(PTC9,PTC0,PTC7,PTD2,PTD1,PTC11); MazeEngine engine; Gamepad pad; Menu menu; Maze maze; Ball ball; // STRUCT FOR INPUT // struct input { Direction direction; float magnitude; }; // FUNCTION PROTOTYPES // void init(); int main() { init(); // initialise devices printf("Devices initialised \n"); menu.intro(lcd, pad); while(1) { menu.main(lcd, pad); printf("Start menu \n"); // menu.main(lcd, pad); // maze.drawBox(lcd); // lcd.drawCircle(15, 15, 3, FILL_BLACK); // ball.draw(lcd, 20, 20, 10); } } void init() { lcd.init(); pad.init(); lcd.setBrightness(pad.read_pot()); }