9#include <steamclient/types/generated/SteamLanguage.hpp>
13namespace Steam::Utils::MsgUtil {
14static constexpr uint32_t PROTO_MASK = 0x80000000;
16inline uint32_t make_msg(Steam::Internal::Enums::EMsg msg,
bool isProto) {
17 uint32_t value =
static_cast<uint32_t
>(msg);
18 return isProto ? (value | PROTO_MASK) : value;
21inline Steam::Internal::Enums::EMsg get_msg(uint32_t raw) {
22 return static_cast<Steam::Internal::Enums::EMsg
>(raw & ~PROTO_MASK);
25inline uint32_t make_gc_msg(uint32_t msg,
bool isProto) {
26 return isProto ? (msg | PROTO_MASK) : msg;
29inline uint32_t get_gc_msg(uint32_t raw) {
return raw & ~PROTO_MASK; }
31inline static bool is_protobuf_msg(uint32_t emsg) {
32 return (emsg & PROTO_MASK) > 0;