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.
Dependencies: mbed
Menu/Menu.h
- Committer:
- lewisgw
- Date:
- 2019-04-01
- Revision:
- 12:ebaefda53dd0
- Parent:
- 11:b66170249a26
- Child:
- 13:bcf6bb69c597
File content as of revision 12:ebaefda53dd0:
/** Menu Class * @breif Class to control the overall state of the game * @author Lewis Wooltorton * @date April 2019 */ #ifndef MENU_H #define MENU_H #include "mbed.h" #include "N5110.h" #include "Gamepad.h" //#include "Engine.h" #include "EngineController.h" struct State { int output; int next_state[4]; }; class Menu { public: Menu(); ~Menu(); void init(); void run(N5110 &lcd, Gamepad &gamepad); private: void set_input(bool start, bool back); void run_game(N5110 &lcd, Gamepad &gamepad); void display_menu(N5110 &lcd, Gamepad &gamepad); void display_controls(N5110 &lcd, Gamepad &gamepad); void output(N5110 &lcd, Gamepad &gamepad); int _menu_input; EngineController _controller; bool _button; int _state; int _output; }; #endif