]> git.localhorst.tv Git - blank.git/blobdiff - src/standalone/MasterState.hpp
file and directory removal functions
[blank.git] / src / standalone / MasterState.hpp
index f2c702fb2033df38fbfe39df28e1ac930760e5f8..04234e5ccea07d18eb99683e6cca088ee0e279c2 100644 (file)
@@ -4,16 +4,20 @@
 #include "../app/State.hpp"
 #include "../ui/ClientController.hpp"
 
+#include "DirectCLIFeedback.hpp"
 #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"
 #include "../world/Generator.hpp"
@@ -30,7 +34,8 @@ namespace standalone {
 
 class MasterState
 : public State
-, public ClientController {
+, public ClientController
+, public ChatState::Responder {
 
 public:
        MasterState(
@@ -40,8 +45,13 @@ public:
                const World::Config &,
                const WorldSave &
        );
+       ~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;
@@ -54,14 +64,21 @@ public:
        void SetVideo(bool) override;
        void SetHUD(bool) override;
        void SetDebug(bool) override;
+       void NextCamera() 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;
@@ -69,13 +86,16 @@ private:
        Generator generator;
        ChunkLoader chunk_loader;
        ChunkRenderer chunk_renderer;
-       Skeletons skeletons;
        Spawner spawner;
 
        SkyBox sky;
 
+       CLI cli;
+       DirectCLIFeedback cli_ctx;
+
        PreloadState preload;
        UnloadState unload;
+       ChatState chat;
 
 };