X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgame%2Fdirector.h;h=1be3e8fa31bbf59c892866c436439ed7ee8c87da;hb=47767a381e6bdde03f68efdfc1d8e628c3655019;hp=9d221b0678345a8def4c06b5936c3bee95ebe865;hpb=f90804b7a1042a1266cbe3075631e4fcc18b9a8a;p=libs%2Fgame.git diff --git a/source/game/director.h b/source/game/director.h index 9d221b0..1be3e8f 100644 --- a/source/game/director.h +++ b/source/game/director.h @@ -2,9 +2,12 @@ #define MSP_GAME_DIRECTOR_H_ #include +#include #include +#include #include #include +#include "accessguard.h" #include "eventbus.h" #include "events.h" #include "eventsource.h" @@ -19,6 +22,8 @@ public: using EventSource = Game::EventSource; private: + std::optional access_guard; + DataFile::Collection &resources; EventBus event_bus; EventSource event_source; std::vector> stages; @@ -30,9 +35,17 @@ private: unsigned max_backlog_steps = 600; public: - Director(); + Director(DataFile::Collection &); + ~Director(); + + DataFile::Collection &get_resources() const { return resources; } + EventBus &get_event_bus() { return event_bus; } + EventSource &get_event_source() { return event_source; } + const std::vector> &get_stages() const { return stages; } + Stage &create_stage(); void activate_stage(Stage &); + Stage *get_active_stage() const { return active_stage; } void tick(); };