Files are now in a src directory and I'm using a src/meson.build and tests/meson.build to specify what to build.
This commit is contained in:
parent
4778677647
commit
1d4ae911b9
108 changed files with 94 additions and 83 deletions
|
|
@ -1,61 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "simplefsm.hpp"
|
||||
#include "dinkyecs.hpp"
|
||||
#include "boss/ui.hpp"
|
||||
#include "events.hpp"
|
||||
#include "battle.hpp"
|
||||
#include "gui/event_router.hpp"
|
||||
#include <memory>
|
||||
#include <any>
|
||||
|
||||
namespace boss {
|
||||
using std::shared_ptr;
|
||||
|
||||
enum class State {
|
||||
START=__LINE__,
|
||||
PLAYER_REQUESTS=__LINE__,
|
||||
EXEC_PLAN=__LINE__,
|
||||
ANIMATE=__LINE__,
|
||||
END=__LINE__
|
||||
};
|
||||
|
||||
class Fight : public DeadSimpleFSM<State, game::Event> {
|
||||
public:
|
||||
sf::RenderWindow* $window = nullptr;
|
||||
shared_ptr<DinkyECS::World> $world = nullptr;
|
||||
DinkyECS::Entity $boss_id = DinkyECS::NONE;
|
||||
combat::BattleEngine $battle;
|
||||
boss::UI $ui;
|
||||
DinkyECS::Entity $host = DinkyECS::NONE;
|
||||
components::Combat* $host_combat = nullptr;
|
||||
gui::routing::Router $router{};
|
||||
sf::Vector2f $mouse_pos{};
|
||||
|
||||
Fight(shared_ptr<DinkyECS::World> world,
|
||||
DinkyECS::Entity boss_id,
|
||||
DinkyECS::Entity player_id);
|
||||
|
||||
void set_window(sf::RenderWindow* window);
|
||||
bool handle_mouse(game::Event ev);
|
||||
void event(game::Event ev, std::any data);
|
||||
|
||||
void START(game::Event ev, std::any data);
|
||||
void PLAYER_REQUESTS(game::Event ev, std::any data);
|
||||
void EXEC_PLAN(game::Event ev, std::any data);
|
||||
void ANIMATE(game::Event ev, std::any data);
|
||||
void END(game::Event ev, std::any data);
|
||||
void render(sf::RenderWindow& window);
|
||||
void update();
|
||||
|
||||
bool handle_world_events();
|
||||
void run_systems();
|
||||
bool player_dead();
|
||||
void init_fight();
|
||||
|
||||
void do_combat(std::any data);
|
||||
void next_combat();
|
||||
sf::Vector2f mouse_position();
|
||||
bool handle_keyboard_mouse();
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue