X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;ds=sidebyside;f=src%2Fclient%2FInteractiveState.hpp;h=1b9c9a5ba06fc4b42a6a92399daee24ab6ce144a;hb=b066e776622f96e906600a0c4a08de392bd03676;hp=77e02c35365d9e2484a7ad7f0f652aa680dd167a;hpb=7fd76e64de47f564117b9e6f73f1482d93842108;p=blank.git diff --git a/src/client/InteractiveState.hpp b/src/client/InteractiveState.hpp index 77e02c3..1b9c9a5 100644 --- a/src/client/InteractiveState.hpp +++ b/src/client/InteractiveState.hpp @@ -1,16 +1,23 @@ #ifndef BLANK_CLIENT_INTERACTIVESTATE_HPP_ #define BLANK_CLIENT_INTERACTIVESTATE_HPP_ +#include "../app/State.hpp" +#include "../ui/ClientController.hpp" + +#include "ChunkReceiver.hpp" #include "ChunkRequester.hpp" #include "../app/IntervalTimer.hpp" -#include "../app/State.hpp" +#include "../graphics/SkyBox.hpp" #include "../io/WorldSave.hpp" #include "../model/Skeletons.hpp" -#include "../net/ChunkReceiver.hpp" +#include "../ui/DirectInput.hpp" +#include "../ui/HUD.hpp" +#include "../ui/InteractiveManipulator.hpp" #include "../ui/Interface.hpp" #include "../world/BlockTypeRegistry.hpp" #include "../world/ChunkRenderer.hpp" #include "../world/EntityState.hpp" +#include "../world/Player.hpp" #include "../world/World.hpp" #include @@ -25,13 +32,14 @@ namespace client { class MasterState; class InteractiveState -: public State { +: public State +, public ClientController { public: explicit InteractiveState(MasterState &, std::uint32_t player_id); World &GetWorld() noexcept { return world; } - Interface &GetInterface() noexcept { return interface; } + Player &GetPlayer() noexcept { return player; } ChunkReceiver &GetChunkReceiver() noexcept { return chunk_receiver; } Skeletons &GetSkeletons() noexcept { return skeletons; } @@ -44,11 +52,21 @@ public: void PushPlayerUpdate(const Entity &, int dt); void MergePlayerCorrection(std::uint16_t, const EntityState &); + void SetAudio(bool) override; + void SetVideo(bool) override; + void SetHUD(bool) override; + void SetDebug(bool) override; + void Exit() override; + private: MasterState &master; BlockTypeRegistry block_types; WorldSave save; World world; + Player &player; + HUD hud; + InteractiveManipulator manip; + DirectInput input; Interface interface; ChunkRequester chunk_requester; ChunkReceiver chunk_receiver; @@ -56,6 +74,8 @@ private: Skeletons skeletons; IntervalTimer loop_timer; + SkyBox sky; + struct PlayerHistory { EntityState state; int delta_t;