X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fapp%2FWorldState.hpp;h=c0b4ce10a23829f8012d9a4c144d3d2e2a971ba4;hb=43820582217f7e4b707d98f2e69d969eb77fc7c3;hp=38f894420b717115c0cb049beb67c1f130b2b702;hpb=551573ecb04969696f916aeb5485658e298a7f6b;p=blank.git diff --git a/src/app/WorldState.hpp b/src/app/WorldState.hpp index 38f8944..c0b4ce1 100644 --- a/src/app/WorldState.hpp +++ b/src/app/WorldState.hpp @@ -1,9 +1,14 @@ #ifndef BLANK_APP_WORLDSTATE_HPP_ #define BLANK_APP_WORLDSTATE_HPP_ +#include "PreloadState.hpp" #include "State.hpp" +#include "UnloadState.hpp" #include "../ai/Spawner.hpp" +#include "../model/Skeletons.hpp" #include "../ui/Interface.hpp" +#include "../world/BlockTypeRegistry.hpp" +#include "../world/ChunkRenderer.hpp" #include "../world/World.hpp" @@ -22,18 +27,27 @@ public: const WorldSave & ); + void OnEnter() override; + void Handle(const SDL_Event &) override; void Update(int dt) override; void Render(Viewport &) override; World &GetWorld() noexcept { return world; } + Interface &GetInterface() noexcept { return interface; } private: Environment &env; + BlockTypeRegistry block_types; World world; + ChunkRenderer chunk_renderer; + Skeletons skeletons; Spawner spawner; Interface interface; + PreloadState preload; + UnloadState unload; + }; }