Mochu Yao explorer game

Dependencies:   mbed

Revision:
22:f8ba0ab7465c
Parent:
21:349c70c8a7de
Child:
30:65e639ace415
--- a/menu/Menu.cpp	Tue Apr 28 14:26:47 2020 +0000
+++ b/menu/Menu.cpp	Tue Apr 28 16:58:19 2020 +0000
@@ -1,4 +1,4 @@
-#include "menu.h"
+#include "Menu.h"
 
 int page1_sprite[25][80] = {
     { 0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },
@@ -51,6 +51,11 @@
     gamepad.check_event(Gamepad::B_PRESSED));
   _output = fsm[_state].output;  
         // implement required delay
+        // set the next state depending on direction
+  _state = fsm[_state].next_state[_input_value]; 
+}
+
+void Menu::get_output(N5110 &lcd, Gamepad &gamepad) {
     if (_output == 0) {
     run_game(lcd, gamepad);  // Runs the main game loop.
   } else if (_output == 1) {
@@ -58,10 +63,8 @@
   } else {
     display_page2(lcd, gamepad);  // Displayes the control page.
   }
-        // set the next state depending on direction
-  _state = fsm[_state].next_state[_input_value]; 
-}
-
+  }
+  
 void Menu::get_input(bool start, bool back, bool b) {
     if(!start && !back && !b) {
         _input_value = 0;}