X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fclient%2FClient.hpp;h=b09001cda1d40a1e096f9883eb19ee391298d499;hb=HEAD;hp=68b2f7fc65e5de8434484178d4d537a98a998937;hpb=8ae45b6555d55f301f83daf8c1337d332d8305ab;p=blank.git diff --git a/src/client/Client.hpp b/src/client/Client.hpp index 68b2f7f..b09001c 100644 --- a/src/client/Client.hpp +++ b/src/client/Client.hpp @@ -1,6 +1,7 @@ #ifndef BLANK_CLIENT_CLIENT_HPP_ #define BLANK_CLIENT_CLIENT_HPP_ +#include "../app/Config.hpp" #include "../net/Connection.hpp" #include @@ -16,13 +17,7 @@ namespace client { class Client { public: - struct Config { - std::string host = "localhost"; - Uint16 port = 12354; - }; - -public: - explicit Client(const Config &); + explicit Client(const Config::Network &); ~Client(); void Handle(); @@ -35,7 +30,19 @@ public: std::uint16_t SendPing(); std::uint16_t SendLogin(const std::string &); std::uint16_t SendPart(); - std::uint16_t SendPlayerUpdate(const Entity &); + std::uint16_t SendPlayerUpdate( + const EntityState &prediction, + const glm::vec3 &movement, + float pitch, + float yaw, + std::uint8_t actions, + std::uint8_t slot); + std::uint16_t SendChunkRequest( + const glm::ivec3 &); + std::uint16_t SendMessage( + std::uint8_t type, + std::uint32_t ref, + const std::string &msg); private: void HandlePacket(const UDPpacket &);