]> git.localhorst.tv Git - blank.git/blobdiff - src/standalone/MasterState.hpp
use (and fix) new shape implementation
[blank.git] / src / standalone / MasterState.hpp
index 823e7f3a67ed781f1c274e5f598c004839bb8966..680bb5e620cbaa15a9a3f6414f02ecf0c767263c 100644 (file)
@@ -8,12 +8,14 @@
 #include "UnloadState.hpp"
 #include "../ai/Spawner.hpp"
 #include "../graphics/SkyBox.hpp"
+#include "../model/ShapeRegistry.hpp"
 #include "../model/Skeletons.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"
@@ -40,8 +42,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;
@@ -59,10 +63,13 @@ public:
 private:
        Config &config;
        Environment &env;
+       ShapeRegistry shapes;
        BlockTypeRegistry block_types;
        const WorldSave &save;
        World world;
+       ChunkIndex &spawn_index;
        Player &player;
+       bool spawn_player;
        HUD hud;
        InteractiveManipulator manip;
        DirectInput input;