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:
- 14:d6fbbb912425
- Parent:
- 13:94abfe83a294
- Child:
- 16:3abc974e8f69
--- a/main.cpp Wed May 08 19:49:35 2019 +0000
+++ b/main.cpp Wed May 08 20:02:54 2019 +0000
@@ -16,6 +16,7 @@
#include "Donkey.h"
#include "Options.h"
#include "Controls.h"
+#include "Instructions.h"
#include "Banana.h"
#include "Barrel.h"
#include "GameEngine.h"
@@ -28,6 +29,8 @@
GameEngine eng;
Options opt;
Controls cont;
+Instructions instr;
+
void init();
void print_menu();
@@ -89,9 +92,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 },
};
-// Instructions ---------------------
-void instructions_run();
-// Options --------------------------
@@ -154,7 +154,7 @@
}
if (menu_option_pos == 2) {
// printf("Instructions");
- instructions_run();
+ instr.instructions_run(pad, lcd);
}
if (menu_option_pos == 3) {
// printf("Options");
@@ -212,17 +212,7 @@
// Instructions State------------------------------------------------------
-void instructions_run() {
- wait_ms(250);
- while (pad.check_event(Gamepad::BACK_PRESSED) == false) {
- //printf("Instructions State");
- lcd.clear();
- lcd.printString("Instructions",7,0);
- lcd.refresh();
- wait_ms(1.0f/fps);
- }
-}
// Options State-----------------------------------------------------------