44 lines
687 B
C++
44 lines
687 B
C++
#ifndef APPLICATION_H
|
|
#define APPLICATION_H
|
|
|
|
#include <memory>
|
|
#include <SFML/System/Clock.hpp>
|
|
#include <SFML/Window/Keyboard.hpp>
|
|
#include <SFML/Window/Event.hpp>
|
|
|
|
#include "game/game.h"
|
|
#include "gui/state.h"
|
|
|
|
class Application
|
|
{
|
|
public:
|
|
|
|
enum State
|
|
{
|
|
SPLASH_SCREEN,
|
|
MAIN_MENU,
|
|
GAME_PICKER,
|
|
GAME,
|
|
EDITOR_PICKER,
|
|
EDITOR,
|
|
SETTINGS
|
|
};
|
|
|
|
Application();
|
|
void run();
|
|
void input();
|
|
void update();
|
|
void draw();
|
|
|
|
private:
|
|
std::stack<std::shared_ptr<GUIState>> _states;
|
|
sf::RenderWindow _game_window;
|
|
std::shared_ptr<Game> _game;
|
|
|
|
State _state;
|
|
|
|
void exec();
|
|
};
|
|
|
|
#endif // APPLICATION_H
|