From 786dccd2bc0946d48b8a2758ef2c607678bc8dd9 Mon Sep 17 00:00:00 2001 From: XaviDCR92 Date: Fri, 8 Sep 2017 18:39:22 +0200 Subject: Removed Building and GameStructures modules. Restructured SW for Unit and Player, still a lot TODO --- Menu.cpp | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'Menu.cpp') diff --git a/Menu.cpp b/Menu.cpp index 06d5c18..85c36ae 100644 --- a/Menu.cpp +++ b/Menu.cpp @@ -1,39 +1,41 @@ /* ************************************** * Includes * * **************************************/ - + #include "Menu.h" - +#include "Player.h" +#include "Gameplay.h" + /* ************************************** * Defines * * **************************************/ - + /* ************************************** * Local variables * * **************************************/ - + static const char MainMenuOption_0[] PROGMEM = "Single player game"; static const char MainMenuOption_1[] PROGMEM = "Multiplayer game"; static const char MainMenuOption_2[] PROGMEM = "Options"; static const char MainMenuOption_3[] PROGMEM = "Quit"; - -static const char * const MainMenuOptions[] PROGMEM = { MainMenuOption_0, + +static const char* const MainMenuOptions[] PROGMEM = { MainMenuOption_0, MainMenuOption_1, MainMenuOption_2, MainMenuOption_3 }; - + void MenuGetPlayerName(Player * ptrPlayer) { memset(ptrPlayer->getName(), 0, PLAYER_NAME_LENGTH); gb.getDefaultName(ptrPlayer->getName()); } - + void MainMenu(void) { //int8_t menu(const char* const* items, uint8_t length); - + uint8_t choice = gb.menu(MainMenuOptions, 3); - + switch(choice) { case 0: @@ -44,9 +46,9 @@ void MainMenu(void) break; break; case 2: - + break; - + default: break; } -- cgit v1.2.3