X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fapp%2FWorldState.hpp;h=d5eac1980d850a9ce31b98ef8988bf187bc9e9d6;hb=38a4cffc0b6aa58e49d24c06aad7bee14cb6515d;hp=e4edd121cc664fa45e4fa713628891dbe724ab32;hpb=22b25d4b9cc24e249bc8007757267cea00ab18d3;p=blank.git diff --git a/src/app/WorldState.hpp b/src/app/WorldState.hpp index e4edd12..d5eac19 100644 --- a/src/app/WorldState.hpp +++ b/src/app/WorldState.hpp @@ -1,9 +1,16 @@ #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/ChunkLoader.hpp" +#include "../world/ChunkRenderer.hpp" +#include "../world/Generator.hpp" #include "../world/World.hpp" @@ -17,21 +24,34 @@ class WorldState public: WorldState( Environment &, + const Generator::Config &, const Interface::Config &, - const World::Config & + const World::Config &, + 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; - Spawner spawner; Interface interface; + Generator generator; + ChunkLoader chunk_loader; + ChunkRenderer chunk_renderer; + Skeletons skeletons; + Spawner spawner; + + PreloadState preload; + UnloadState unload; };