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 N5110 ShiftReg PinDetect
Diff: StateManager.h
- Revision:
- 19:89c3eeb3761b
- Parent:
- 17:d6a3b29cab31
diff -r 709ea375b0df -r 89c3eeb3761b StateManager.h
--- a/StateManager.h Mon May 11 04:40:23 2015 +0000
+++ b/StateManager.h Thu Mar 25 03:43:10 2021 +0000
@@ -4,9 +4,9 @@
#include "State.h"
#include "MainMenu.h"
#include "Game.h"
-#include "TitleScreen.h"
+#include "CoverPage.h"
#include "GameOver.h"
-#include "SubmitHighscore.h"
+#include "Achievement.h"
/** @file StateManager.h
* @author Andreas Garmannslund
@@ -22,8 +22,8 @@
* @param input Pointer to the InputManager which is controlling user input.
* @param firstState The initial state of the finite state machine.
*/
- StateManager(N5110 *lcd, InputManager* input, Sound *sound, MainState firstState)
- : lcd(lcd), input(input), sound(sound) {currentState = 0; nextState = NO_STATE; changeState(firstState);}
+ StateManager(N5110 *lcd, InputManager* input, Sound *sound, ShiftReg *shiftreg, MainState firstState)
+ : lcd(lcd), input(input), sound(sound), shiftreg(shiftreg) {currentState = 0; nextState = NO_STATE; changeState(firstState);}
/// Frees allocated memory
~StateManager() {if (currentState != 0) delete currentState;}
@@ -53,6 +53,7 @@
N5110 *lcd;
InputManager *input;
Sound *sound;
+ ShiftReg *shiftreg;
State* currentState; // Current state object
MainState nextState; // requested state, NONE if no state is requested
};