A complex 2D-dungeon game on LPC1768 in SWJTU-Leeds Joint School XJEL2645 project. Referenced from the framework contributed by https://os.mbed.com/users/Siriagus/code/SimplePlatformGame/

Dependencies:   mbed N5110 ShiftReg PinDetect

MainMenu.h

Committer:
Siriagus
Date:
2015-05-01
Revision:
6:edb48de563a9
Parent:
5:100d960fc6d5
Child:
7:678873947b29

File content as of revision 6:edb48de563a9:

#ifndef MAIN_MENU_H
#define MAIN_MENU_H

#include "State.h"

class MainMenu : public State
{
    public:
        MainMenu(StateManager* fsm, N5110 *lcd, InputManager* input)
                : State(fsm, lcd, input) {init();}
                
        virtual void update(time_t dt);
        virtual void render();
    
    private:
        void init();
        static void btnAPress(); // Need to be static to be used for callback
        static void btnBPress();
        static void btnCPress();
        
    // Variables
    private:
        enum MenuState {SELECT_PLAY, SELECT_HIGHSCORES, SELECT_CONTROLS, LOAD_GAME, HIGHSCORES, CONTROLS}; // Internal states for internal finite state machine
        static int currentState; // Current internal state
        static const int MENU_FSM[6][3]; // Internal finite state machine - works on a different principle than the one that controls the main states
};

#endif