summaryrefslogtreecommitdiffstats
path: root/menu_demo/menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'menu_demo/menu.c')
-rw-r--r--menu_demo/menu.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/menu_demo/menu.c b/menu_demo/menu.c
index d1db8f8..99a72a9 100644
--- a/menu_demo/menu.c
+++ b/menu_demo/menu.c
@@ -7,6 +7,8 @@
#include "button.h"
+#define MENU_MAX_BUTTONS 16
+
enum MenuState {
MENU_MAIN,
MENU_START,
@@ -14,10 +16,10 @@ enum MenuState {
};
struct MenuStruct {
- struct ButtonStruct button[10];
+ struct ButtonStruct m_sButtons[MENU_MAX_BUTTONS];
};
-int g_iState; // which menu are we in
+int g_iState; // which menu state are we in
struct MenuStruct g_sMenuMain; // definition of the main menu
struct MenuStruct g_sMenuStart; // definition of the start menu
@@ -25,12 +27,6 @@ struct MenuStruct g_sMenuOptions; // definition of the options menu
void MenuMainRender(void)
{
- glBegin(GL_QUADS);
- glVertex3d( 10, 10, 0);
- glVertex3d( 10, -10, 0);
- glVertex3d(-10, -10, 0);
- glVertex3d(-10, 10, 0);
- glEnd();
} // MenuMainRender
@@ -51,12 +47,6 @@ void MenuInit(void)
} // InitMenu
-int MenuGetState(void)
-{
- return g_iState;
-
-} // GetMenuState
-
void MenuRender(void)
{
glColor3d(1, 1, 1);