Menu class used as basis for program; running the game and allowing the user to change the style and difficulty of the game via an interface.
Diff: Menu.h
- Revision:
- 3:a79daa7c2b55
- Parent:
- 2:917211a4551b
- Child:
- 4:4f20bcef2c0c
diff -r 917211a4551b -r a79daa7c2b55 Menu.h --- a/Menu.h Fri Apr 07 10:28:49 2017 +0000 +++ b/Menu.h Sun Apr 16 12:31:48 2017 +0000 @@ -14,8 +14,10 @@ #include "N5110.h" #include "Gamepad.h" #include "MazeEngine.h" +#include "Animations.h" #include "Maze.h" #include "Ball.h" +#include "Sound.h" class Menu { @@ -25,31 +27,31 @@ Menu(); ~Menu(); - void init(int mazeIndex); - void main(N5110 &lcd, Gamepad &pad, FXOS8700CQ &device); - void intro(N5110 &lcd, Gamepad &pad); - void playGame(int mazeIndex, N5110 &lcd, Gamepad &pad, FXOS8700CQ &device); - void options(N5110 &lcd, Gamepad &pad); + void init(); + void main(N5110 &lcd, Gamepad &pad, FXOS8700CQ &device, Sound &tune, Animations &animate); + void intro(N5110 &lcd, Gamepad &pad, Sound &tune, Animations &animate); + void playGame(N5110 &lcd, Gamepad &pad, FXOS8700CQ &device, Sound &tune, int mazeIndex); + void options(N5110 &lcd, Gamepad &pad, Animations &animate); void lcdSettings(N5110 &lcd, Gamepad &pad); void soundSettings(N5110 &lcd, Gamepad &pad); - void controlOptions(N5110 &lcd, Gamepad &pad); + void controlOptions(N5110 &lcd, Gamepad &pad, Animations &animate); void difficultyOptions(N5110 &lcd, Gamepad &pad); void lcdColourOptions(N5110 &lcd, Gamepad &pad); void lcdInverseColour(N5110 &lcd, Gamepad &pad); void lcdBackgroundColour(N5110 &lcd, Gamepad &pad); + void animateJoystick(N5110 &lcd, Gamepad &pad, Animations &animate); + void animateGamepad(N5110 &lcd, Gamepad &pad, Animations &animate); + void soundEffects(N5110 &lcd, Gamepad &pad); + void musicSettings(N5110 &lcd, Gamepad &pad); private: MazeEngine _engine; - - void animateJoystick(N5110 &lcd); - void animateGamepad(N5110 &lcd); - - void drawVerticalJoystick(N5110 &lcd); - - bool CONTROL; + Sound _tune; int _mazeIndex; + bool _control; + bool _colour; };