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:
- 10:40c77d69e83c
- Parent:
- 9:ce0a12fb205b
- Child:
- 11:2cf0d4ce8677
--- a/main.cpp Wed Apr 10 12:54:56 2019 +0000
+++ b/main.cpp Thu Apr 11 08:08:52 2019 +0000
@@ -16,23 +16,30 @@
N5110 lcd(PTC9,PTC0,PTC7,PTD2,PTD1,PTC11);
void startscreen();
int menu();
+GameEngine engine;
////////////////Main Command//////////////////
int main(){
- gamepad.init();
- lcd.init();
- lcd.setContrast(0.55);
- wait(1);
+ init();
startscreen();
int choice_selected = menu();
+ if(choice_selected == 0){ engine.classic();}
+ if(choice_selected == 1){ engine.brickbreaker();}
+ if(choice_selected == 2){ engine.options_menu();}
}
//////////////Start up functions///////////////////
-
+void init(){
+ gamepad.init();
+ lcd.init();
+ lcd.setContrast(0.55);
+ engine.init();
+ wait(1);
+}
void startscreen() {
lcd.clear();