ECE2035 Project 2
Dependencies: mbed mbed-rtos SDFileSystem
Diff: main.cpp
- Revision:
- 4:8e15742ebcc6
- Parent:
- 0:bff8b9020128
- Child:
- 5:b9b7993823e1
--- a/main.cpp Sun Apr 04 18:02:25 2021 +0000 +++ b/main.cpp Wed Apr 07 13:26:44 2021 +0000 @@ -18,6 +18,7 @@ #include "fruit_public.h" #include "player_public.h" #include "mbed.h" +#include "doubly_linked_list.h" //For sound components ////AnalogOut DACout(p18); @@ -50,6 +51,7 @@ // First things first: initialize hardware ASSERT_P(hardware_init() == ERROR_NONE, "Hardware init failed!"); pc.printf("Program Starting\n"); + pc.printf("-------------------------\n"); // ===User implementations start=== @@ -67,30 +69,30 @@ //playNotes(); //initialize functions - ////compost_pile_init(); + compost_pile_init(); fruit_init(); player_init(); pc.printf("Initialization complete\n"); - uLCD.printf(" Score: %d", score); + uLCD.printf("Score: %d", score); while(1) { t.start(); - + // Draw fruits first //pc.printf("fruit_generator\n"); + //pc.printf("Main: fruit_generator\n"); fruit_generator(); //Put score on screen // NOTE: Text is 8 pixels tall - + // pc.printf("Main: player_move\n"); player_move(inputs.ax); - ////player_knife_draw(); - //pc.printf("Reading inputs\n"); + //pc.printf("Main: read_inputs\n"); inputs = read_inputs(); if (!inputs.b1) { break;