diff options
| author | Nicolas James <Eele1Ephe7uZahRie@tutanota.com> | 2025-02-12 21:57:46 +1100 |
|---|---|---|
| committer | Nicolas James <Eele1Ephe7uZahRie@tutanota.com> | 2025-02-12 21:57:46 +1100 |
| commit | e4483eca01b48b943cd0461e24a74ae1a3139ed4 (patch) | |
| tree | ed58c3c246e3af1af337697695d780aa31f6ad9a /src/shared/net/proto.hh | |
| parent | 1cc08c51eb4b0f95c30c0a98ad1fc5ad3459b2df (diff) | |
Update to most recent version (old initial commit)
Diffstat (limited to 'src/shared/net/proto.hh')
| -rw-r--r-- | src/shared/net/proto.hh | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/shared/net/proto.hh b/src/shared/net/proto.hh index 93bb005..d2bbd1c 100644 --- a/src/shared/net/proto.hh +++ b/src/shared/net/proto.hh @@ -1,26 +1,26 @@ #ifndef SHARED_NET_PROTO_HH_ #define SHARED_NET_PROTO_HH_ -#include "shared/math.hh" -#include "shared/player.hh" +#include "shared/math/math.hh" #undef Status // Protobuf doesn't like xlib apparently. #include "shared/net/lib/protobuf/net.pb.h" -// TODO packet struct parsing packet helper functions +// Helper functions for getting/setting simple structs for our protobuf. namespace shared { namespace net { -shared::player get_player(const proto::player& packet) noexcept; - -void set_angles(proto::angles& proto_angles, +void set_angles(proto::angles* const proto, const shared::math::angles& angles) noexcept; -void set_coords(proto::coords& proto_coords, +void set_coords(proto::coords* const proto, const shared::math::coords& coords) noexcept; -void set_vec3(proto::vec3& proto_vec3, const glm::vec3& vec3) noexcept; -void set_ivec3(proto::ivec3& proto_ivec3, const glm::ivec3& ivec3) noexcept; -void set_player(proto::player& proto_player, - const shared::player& player) noexcept; +void set_vec3(proto::vec3* const proto, const glm::vec3& vec3) noexcept; +void set_ivec3(proto::ivec3* const proto, const glm::ivec3& ivec3) noexcept; + +shared::math::angles get_angles(const proto::angles& proto) noexcept; +shared::math::coords get_coords(const proto::coords& proto) noexcept; +glm::vec3 get_vec3(const proto::vec3& proto) noexcept; +glm::ivec3 get_ivec3(const proto::ivec3& proto) noexcept; } // namespace net } // namespace shared |
