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: main.cpp
- Revision:
- 17:5104ecef5bd0
- Parent:
- 16:e846864778c4
- Child:
- 18:08046153e6ad
--- a/main.cpp Mon Apr 15 08:14:13 2019 +0000 +++ b/main.cpp Mon Apr 15 13:28:30 2019 +0000 @@ -24,12 +24,12 @@ //Methods void startscreen(); -int menu(); +StartOption menu(); void init(); void print_start_menu(int output); -////////////////Main Function////////////// +////////////////Main Function///////////////// int main(){ @@ -37,10 +37,10 @@ init(); startscreen(); while(1){ - int choice_selected = menu(); - if(choice_selected == 0){ engine.classic_mode(accelerometer, gamepad, lcd, fps);} - if(choice_selected == 1){ engine.brickbreaker_mode(accelerometer, gamepad, lcd, randnoise, fps);} - if(choice_selected == 2){ engine.options_menu(gamepad, lcd);} + StartOption choice_selected = menu(); + if(choice_selected == CLASSIC){ engine.classic_mode(accelerometer, gamepad, lcd, fps);} + if(choice_selected == BRICKBREAKER){ engine.brickbreaker_mode(accelerometer, gamepad, lcd, randnoise, fps);} + if(choice_selected == OPTIONS){ engine.options_menu(gamepad, lcd);} } } @@ -83,7 +83,7 @@ } } -int menu(){ +StartOption menu(){ StartSelection fsm[3] = { {0,{OPTIONS,BRICKBREAKER,CLASSIC}}, {2,{CLASSIC,OPTIONS,BRICKBREAKER}},