X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fstandalone%2FMasterState.hpp;h=173c07cdd1e8208dd5939efb9b5842311a449650;hb=8de9eb53c9ae92c6bfa8f01cf6659b683fe2155d;hp=823e7f3a67ed781f1c274e5f598c004839bb8966;hpb=a50aa0f2a2fea14f5f8c56209e2ecde3088ef913;p=blank.git diff --git a/src/standalone/MasterState.hpp b/src/standalone/MasterState.hpp index 823e7f3..173c07c 100644 --- a/src/standalone/MasterState.hpp +++ b/src/standalone/MasterState.hpp @@ -7,13 +7,15 @@ #include "PreloadState.hpp" #include "UnloadState.hpp" #include "../ai/Spawner.hpp" +#include "../app/ChatState.hpp" +#include "../audio/SoundBank.hpp" #include "../graphics/SkyBox.hpp" -#include "../model/Skeletons.hpp" +#include "../shared/WorldResources.hpp" #include "../ui/DirectInput.hpp" #include "../ui/HUD.hpp" #include "../ui/InteractiveManipulator.hpp" #include "../ui/Interface.hpp" -#include "../world/BlockTypeRegistry.hpp" +#include "../world/ChunkIndex.hpp" #include "../world/ChunkLoader.hpp" #include "../world/ChunkRenderer.hpp" #include "../world/Generator.hpp" @@ -30,7 +32,8 @@ namespace standalone { class MasterState : public State -, public ClientController { +, public ClientController +, public ChatState::Responder { public: MasterState( @@ -40,8 +43,10 @@ public: const World::Config &, const WorldSave & ); + ~MasterState(); - void OnEnter() override; + void OnResume() override; + void OnPause() override; void Handle(const SDL_Event &) override; void Update(int dt) override; @@ -56,13 +61,18 @@ public: void SetDebug(bool) override; void Exit() override; + void OnLineSubmit(const std::string &) override; + private: Config &config; Environment &env; - BlockTypeRegistry block_types; + WorldResources res; + SoundBank sounds; const WorldSave &save; World world; + ChunkIndex &spawn_index; Player &player; + bool spawn_player; HUD hud; InteractiveManipulator manip; DirectInput input; @@ -70,13 +80,13 @@ private: Generator generator; ChunkLoader chunk_loader; ChunkRenderer chunk_renderer; - Skeletons skeletons; Spawner spawner; SkyBox sky; PreloadState preload; UnloadState unload; + ChatState chat; };