summaryrefslogtreecommitdiff
path: root/Menu.cpp
diff options
context:
space:
mode:
authorXaviDCR92 <xavi.dcr@gmail.com>2017-09-08 18:39:22 +0200
committerXaviDCR92 <xavi.dcr@gmail.com>2017-09-08 18:39:22 +0200
commit786dccd2bc0946d48b8a2758ef2c607678bc8dd9 (patch)
tree47952d77e5646a993671134b50c16f32ebe35b1c /Menu.cpp
parent72d350a37aa67936361ac8a374472b7e0227da61 (diff)
Removed Building and GameStructures modules. Restructured SW for Unit and Player, still a lot TODO
Diffstat (limited to 'Menu.cpp')
-rw-r--r--Menu.cpp26
1 files changed, 14 insertions, 12 deletions
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;
}