1 #ifndef GAME_STATES_LOADGAME_HPP
2 #define GAME_STATES_LOADGAME_HPP
4 #include <BLIB/Render.hpp>
21 ,
public bl::input::Listener {
41 virtual const char*
name()
const override;
48 virtual void activate(bl::engine::Engine& engine)
override;
55 virtual void deactivate(bl::engine::Engine& engine)
override;
63 virtual void update(bl::engine::Engine& engine,
float dt,
float)
override;
66 enum LoadState { SelectingSave, ChooseAction, SaveDeleted, Fading, Error } state;
68 std::vector<core::file::GameSave> saves;
69 unsigned int selectedSave;
70 bl::rc::res::TextureRef bgndTxtr;
71 bl::gfx::Sprite background;
72 bl::rc::rgi::FadeEffectTask* fadeout;
74 bl::menu::Menu saveMenu;
75 bl::menu::Menu actionMenu;
80 void saveSelected(
unsigned int save);
84 virtual bool observe(
const bl::input::Actor&,
unsigned int activatedControl,
85 bl::input::DispatchType,
bool eventTriggered)
override;
bl::menu::TriggerDriver< Control::MoveUp, Control::MoveRight, Control::MoveDown, Control::MoveLeft, Control::Interact > MenuDriver
Helper typedef for Peoplemon specific menu driving.
Parent namespace for all functionality unique to the game.
Owns all primary systems and a reference to the engine.
Provides a menu to select a save and loads the selected save.
virtual void activate(bl::engine::Engine &engine) override
Activates the state.
static bl::engine::State::Ptr create(core::system::Systems &systems)
Creates the load game state.
virtual ~LoadGame()=default
Destroy the New Game state.
virtual void deactivate(bl::engine::Engine &engine) override
Deactivates the state.
virtual void update(bl::engine::Engine &engine, float dt, float) override
Updates the state and menus and whatnot.
virtual const char * name() const override
Returns "LoadGame".
Parent to all game states. Provides some commonly required data like core game systems.
core::system::Systems & systems