Game
Dependencies:
mbed
« Back to documentation index
Menu Class Reference
Menu Class.
More...
#include <Menu.h >
Public Member Functions
Menu ()
Constructor.
~Menu ()
Destructor.
bool Main_Menu (N5110 &LCD, Gamepad &Device)
Runs the main menu screen and the settings, credits and instructions menus.
bool Game_Setup (N5110 &LCD, Gamepad &Device)
Runs the finite state machine for the game setup.
int Get_Mode ()
Returns the decided game mode.
int Get_Map ()
Returns the decided game map.
int Get_Laps ()
Returns the number of laps decided.
int Get_Car ()
Returns the decided car.
bool Get_Setting_LED ()
Returns the LED setting.
bool Get_Setting_Gyro ()
Returns the gyro control setting.
Detailed Description
Menu Class.
Creates all game graphics.
Author: Henry W Triff
Date: Mar, 2020
Definition at line 107 of file Menu.h .
Constructor & Destructor Documentation
Constructor.
Definition at line 7 of file Menu.cpp .
Destructor.
Definition at line 11 of file Menu.cpp .
Member Function Documentation
Runs the finite state machine for the game setup.
Parameters:
LCD This is the N5110 class object (object)
Device This is the Gamepad class object (object)
Returns: True if the game should be started and false if returning to the main menu is required (bool)
Definition at line 612 of file Menu.cpp .
Returns the decided car.
Returns: The selected car (int)
Definition at line 895 of file Menu.cpp .
Returns the number of laps decided.
Returns: The selected number of laps (int)
Definition at line 891 of file Menu.cpp .
Returns the decided game map.
Returns: The selected game map (int)
Definition at line 887 of file Menu.cpp .
Returns the decided game mode.
Returns: The selected game mode (int)
Definition at line 883 of file Menu.cpp .
bool Get_Setting_Gyro
(
)
Returns the gyro control setting.
Returns: The selected gyro control setting (bool)
Definition at line 903 of file Menu.cpp .
Returns the LED setting.
Returns: The selected LED setting (bool)
Definition at line 899 of file Menu.cpp .
Runs the main menu screen and the settings, credits and instructions menus.
It also passes off to the game setup
Parameters:
LCD This is the N5110 class object (object)
Device This is the Gamepad class object (object)
Returns: True if the SD card needs to be formatted (bool)
Definition at line 361 of file Menu.cpp .