project-kyoku/modes/classicmode/game/classicgame.h

46 lines
1.0 KiB
C
Raw Normal View History

2021-10-04 11:30:21 -04:00
#pragma once
2021-05-31 13:04:16 -04:00
#include <map>
#include <memory>
#include <SFML/Audio/SoundBuffer.hpp>
#include <SFML/Audio/Sound.hpp>
#include "core/game.h"
#include "core/timeline.h"
#include "classicmode/context.h"
#include "classicnote.h"
#include "classicmode/classicactions.h"
2021-06-16 13:11:00 -04:00
class ClassicGraphicsManager;
2021-10-04 11:30:21 -04:00
class HoldManager;
2021-06-07 14:19:58 -04:00
2021-05-31 13:04:16 -04:00
class ClassicGame final : public Game
{
public:
2021-12-21 12:07:19 -05:00
explicit ClassicGame();
virtual ~ClassicGame() override;
virtual void run() override;
virtual void input(PlayerInput&& inputdata) override;
virtual void update(UpdateData&& updatedata) override;
virtual void draw() const override;
2021-05-31 13:04:16 -04:00
private:
std::map<sf::Keyboard::Key, Type> _keys_to_buttons;
std::map<Type, Action> _buttons_to_pressed_actions;
std::map<Type, Action> _buttons_to_released_actions;
2021-06-07 14:19:58 -04:00
2021-12-21 12:07:19 -05:00
std::unique_ptr<ClassicGraphicsManager> _graphics_manager;
2021-10-04 11:30:21 -04:00
std::shared_ptr<HoldManager> _hold_manager;
Timeline<ClassicNote> _timeline;
sf::SoundBuffer _slap_buffer;
sf::Sound _slap;
Context _context;
};