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:
- 13:94abfe83a294
- Parent:
- 12:50a7abf21f18
- Child:
- 14:d6fbbb912425
--- a/main.cpp Wed May 08 01:28:25 2019 +0000
+++ b/main.cpp Wed May 08 19:49:35 2019 +0000
@@ -15,6 +15,7 @@
#include "Gamepad.h"
#include "Donkey.h"
#include "Options.h"
+#include "Controls.h"
#include "Banana.h"
#include "Barrel.h"
#include "GameEngine.h"
@@ -26,6 +27,7 @@
Banana banana;
GameEngine eng;
Options opt;
+Controls cont;
void init();
void print_menu();
@@ -87,7 +89,6 @@
{ 0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0 },
};
-void controls_run();
// Instructions ---------------------
void instructions_run();
// Options --------------------------
@@ -149,7 +150,7 @@
}
if (menu_option_pos == 1) {
// printf("Controls");
- controls_run();
+ cont.controls_run(pad, lcd);
}
if (menu_option_pos == 2) {
// printf("Instructions");
@@ -210,19 +211,6 @@
-// Controls State----------------------------------------------------------
-void controls_run() {
- wait_ms(250);
-
- while (pad.check_event(Gamepad::BACK_PRESSED) == false) {
- //printf("Control State");
- lcd.clear();
- lcd.printString("Controls",19,0);
- lcd.refresh();
- wait_ms(1.0f/fps);
- }
-}
-
// Instructions State------------------------------------------------------
void instructions_run() {
wait_ms(250);