X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fstandalone%2FMasterState.hpp;h=9cb095ac1eb8d7d048bc12481e25227ca3feb287;hb=56069d41c1553d87a8759713ef391d3a908adc0e;hp=84c331523e43a4602a52a07d4eed6cdd7bbd22a1;hpb=5178dd1e226d45db7ae61e3d7d6866dc4254d9ae;p=blank.git diff --git a/src/standalone/MasterState.hpp b/src/standalone/MasterState.hpp index 84c3315..9cb095a 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 "../audio/SoundBank.hpp" #include "../graphics/SkyBox.hpp" -#include "../model/Skeletons.hpp" +#include "../shared/ChatState.hpp" +#include "../shared/CLI.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" @@ -31,7 +33,8 @@ namespace standalone { class MasterState : public State -, public ClientController { +, public ClientController +, public ChatState::Responder { public: MasterState( @@ -43,7 +46,11 @@ public: ); ~MasterState(); - void OnEnter() override; + void OnResume() override; + void OnPause() override; + + void OnFocus() override; + void OnBlur() override; void Handle(const SDL_Event &) override; void Update(int dt) override; @@ -58,14 +65,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; @@ -73,13 +84,15 @@ private: Generator generator; ChunkLoader chunk_loader; ChunkRenderer chunk_renderer; - Skeletons skeletons; Spawner spawner; SkyBox sky; + CLI cli; + PreloadState preload; UnloadState unload; + ChatState chat; };