Browse Source

feat(proto): update with new rules

tags/0.1.0
DragonAura 2 years ago
parent
commit
588cf25a9a
6 changed files with 2176 additions and 275 deletions
  1. +1123
    -216
      CAPI/proto/Message2Clients.pb.cc
  2. +907
    -21
      CAPI/proto/Message2Clients.pb.h
  3. +65
    -37
      CAPI/proto/MessageType.pb.cc
  4. +46
    -1
      CAPI/proto/MessageType.pb.h
  5. +22
    -0
      dependency/proto/Message2Clients.proto
  6. +13
    -0
      dependency/proto/MessageType.proto

+ 1123
- 216
CAPI/proto/Message2Clients.pb.cc
File diff suppressed because it is too large
View File


+ 907
- 21
CAPI/proto/Message2Clients.pb.h
File diff suppressed because it is too large
View File


+ 65
- 37
CAPI/proto/MessageType.pb.cc View File

@@ -23,43 +23,47 @@ namespace _pbi = _pb::internal;
namespace protobuf namespace protobuf
{ {
} // namespace protobuf } // namespace protobuf
static const ::_pb::EnumDescriptor* file_level_enum_descriptors_MessageType_2eproto[10];
static const ::_pb::EnumDescriptor* file_level_enum_descriptors_MessageType_2eproto[11];
static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_MessageType_2eproto = nullptr; static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_MessageType_2eproto = nullptr;
const uint32_t TableStruct_MessageType_2eproto::offsets[1] = {}; const uint32_t TableStruct_MessageType_2eproto::offsets[1] = {};
static constexpr ::_pbi::MigrationSchema* schemas = nullptr; static constexpr ::_pbi::MigrationSchema* schemas = nullptr;
static constexpr ::_pb::Message* const* file_default_instances = nullptr; static constexpr ::_pb::Message* const* file_default_instances = nullptr;


const char descriptor_table_protodef_MessageType_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = const char descriptor_table_protodef_MessageType_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
"\n\021MessageType.proto\022\010protobuf*i\n\tPlaceTy"
"pe\022\023\n\017NULL_PLACE_TYPE\020\000\022\010\n\004LAND\020\001\022\010\n\004WAL"
"L\020\002\022\t\n\005GRASS\020\003\022\r\n\tCLASSROOM\020\004\022\010\n\004GATE\020\005\022"
"\017\n\013HIDDEN_GATE\020\006*8\n\tShapeType\022\023\n\017NULL_SH"
"APE_TYPE\020\000\022\n\n\006CIRCLE\020\001\022\n\n\006SQUARE\020\002*N\n\010Pr"
"opType\022\022\n\016NULL_PROP_TYPE\020\000\022\n\n\006PTYPE1\020\001\022\n"
"\n\006PTYPE2\020\002\022\n\n\006PTYPE3\020\003\022\n\n\006PTYPE4\020\004*f\n\017St"
"udentBuffType\022\023\n\017NULL_SBUFF_TYPE\020\000\022\016\n\nSB"
"UFFTYPE1\020\001\022\016\n\nSBUFFTYPE2\020\002\022\016\n\nSBUFFTYPE3"
"\020\003\022\016\n\nSBUFFTYPE4\020\004*^\n\014StudentState\022\017\n\013NU"
"LL_STATUS\020\000\022\010\n\004IDLE\020\001\022\014\n\010LEARNING\020\002\022\014\n\010A"
"DDICTED\020\003\022\010\n\004QUIT\020\004\022\r\n\tGRADUATED\020\005*f\n\017Tr"
"ickerBuffType\022\023\n\017NULL_TBUFF_TYPE\020\000\022\016\n\nTB"
"UFFTYPE1\020\001\022\016\n\nTBUFFTYPE2\020\002\022\016\n\nTBUFFTYPE3"
"\020\003\022\016\n\nTBUFFTYPE4\020\004*J\n\nPlayerType\022\024\n\020NULL"
"_PLAYER_TYPE\020\000\022\022\n\016STUDENT_PLAYER\020\001\022\022\n\016TR"
"ICKER_PLAYER\020\002*l\n\013StudentType\022\025\n\021NULL_ST"
"UDENT_TYPE\020\000\022\020\n\014STUDENTTYPE1\020\001\022\020\n\014STUDEN"
"TTYPE2\020\002\022\020\n\014STUDENTTYPE3\020\003\022\020\n\014STUDENTTYP"
"E4\020\004*l\n\013TrickerType\022\025\n\021NULL_TRICKER_TYPE"
"\020\000\022\020\n\014TRICKERTYPE1\020\001\022\020\n\014TRICKERTYPE2\020\002\022\020"
"\n\014TRICKERTYPE3\020\003\022\020\n\014TRICKERTYPE4\020\004*P\n\tGa"
"meState\022\023\n\017NULL_GAME_STATE\020\000\022\016\n\nGAME_STA"
"RT\020\001\022\020\n\014GAME_RUNNING\020\002\022\014\n\010GAME_END\020\003b\006pr"
"oto3";
"\n\021MessageType.proto\022\010protobuf*{\n\nBulletT"
"ype\022\024\n\020NULL_BULLET_TYPE\020\000\022\017\n\013LINE_BULLET"
"\020\001\022\021\n\rCOMMON_BULLET\020\002\022\017\n\013FAST_BULLET\020\003\022\023"
"\n\017ORDINARY_BULLET\020\004\022\r\n\tATOM_BOMB\020\005*i\n\tPl"
"aceType\022\023\n\017NULL_PLACE_TYPE\020\000\022\010\n\004LAND\020\001\022\010"
"\n\004WALL\020\002\022\t\n\005GRASS\020\003\022\r\n\tCLASSROOM\020\004\022\010\n\004GA"
"TE\020\005\022\017\n\013HIDDEN_GATE\020\006*8\n\tShapeType\022\023\n\017NU"
"LL_SHAPE_TYPE\020\000\022\n\n\006CIRCLE\020\001\022\n\n\006SQUARE\020\002*"
"N\n\010PropType\022\022\n\016NULL_PROP_TYPE\020\000\022\n\n\006PTYPE"
"1\020\001\022\n\n\006PTYPE2\020\002\022\n\n\006PTYPE3\020\003\022\n\n\006PTYPE4\020\004*"
"f\n\017StudentBuffType\022\023\n\017NULL_SBUFF_TYPE\020\000\022"
"\016\n\nSBUFFTYPE1\020\001\022\016\n\nSBUFFTYPE2\020\002\022\016\n\nSBUFF"
"TYPE3\020\003\022\016\n\nSBUFFTYPE4\020\004*\205\001\n\014StudentState"
"\022\017\n\013NULL_STATUS\020\000\022\010\n\004IDLE\020\001\022\014\n\010LEARNING\020"
"\002\022\014\n\010ADDICTED\020\003\022\010\n\004QUIT\020\004\022\r\n\tGRADUATED\020\005"
"\022\013\n\007TREATED\020\006\022\013\n\007RESCUED\020\007\022\013\n\007STUNNED\020\010*"
"f\n\017TrickerBuffType\022\023\n\017NULL_TBUFF_TYPE\020\000\022"
"\016\n\nTBUFFTYPE1\020\001\022\016\n\nTBUFFTYPE2\020\002\022\016\n\nTBUFF"
"TYPE3\020\003\022\016\n\nTBUFFTYPE4\020\004*J\n\nPlayerType\022\024\n"
"\020NULL_PLAYER_TYPE\020\000\022\022\n\016STUDENT_PLAYER\020\001\022"
"\022\n\016TRICKER_PLAYER\020\002*l\n\013StudentType\022\025\n\021NU"
"LL_STUDENT_TYPE\020\000\022\020\n\014STUDENTTYPE1\020\001\022\020\n\014S"
"TUDENTTYPE2\020\002\022\020\n\014STUDENTTYPE3\020\003\022\020\n\014STUDE"
"NTTYPE4\020\004*l\n\013TrickerType\022\025\n\021NULL_TRICKER"
"_TYPE\020\000\022\020\n\014TRICKERTYPE1\020\001\022\020\n\014TRICKERTYPE"
"2\020\002\022\020\n\014TRICKERTYPE3\020\003\022\020\n\014TRICKERTYPE4\020\004*"
"P\n\tGameState\022\023\n\017NULL_GAME_STATE\020\000\022\016\n\nGAM"
"E_START\020\001\022\020\n\014GAME_RUNNING\020\002\022\014\n\010GAME_END\020"
"\003b\006proto3";
static ::_pbi::once_flag descriptor_table_MessageType_2eproto_once; static ::_pbi::once_flag descriptor_table_MessageType_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_MessageType_2eproto = { const ::_pbi::DescriptorTable descriptor_table_MessageType_2eproto = {
false, false,
false, false,
964,
1129,
descriptor_table_protodef_MessageType_2eproto, descriptor_table_protodef_MessageType_2eproto,
"MessageType.proto", "MessageType.proto",
&descriptor_table_MessageType_2eproto_once, &descriptor_table_MessageType_2eproto_once,
@@ -82,11 +86,32 @@ PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_MessageT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_MessageType_2eproto(&descriptor_table_MessageType_2eproto); PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_MessageType_2eproto(&descriptor_table_MessageType_2eproto);
namespace protobuf namespace protobuf
{ {
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* PlaceType_descriptor()
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* BulletType_descriptor()
{ {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_MessageType_2eproto); ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_MessageType_2eproto);
return file_level_enum_descriptors_MessageType_2eproto[0]; return file_level_enum_descriptors_MessageType_2eproto[0];
} }
bool BulletType_IsValid(int value)
{
switch (value)
{
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
return true;
default:
return false;
}
}

const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* PlaceType_descriptor()
{
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_MessageType_2eproto);
return file_level_enum_descriptors_MessageType_2eproto[1];
}
bool PlaceType_IsValid(int value) bool PlaceType_IsValid(int value)
{ {
switch (value) switch (value)
@@ -107,7 +132,7 @@ namespace protobuf
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ShapeType_descriptor() const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ShapeType_descriptor()
{ {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_MessageType_2eproto); ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_MessageType_2eproto);
return file_level_enum_descriptors_MessageType_2eproto[1];
return file_level_enum_descriptors_MessageType_2eproto[2];
} }
bool ShapeType_IsValid(int value) bool ShapeType_IsValid(int value)
{ {
@@ -125,7 +150,7 @@ namespace protobuf
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* PropType_descriptor() const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* PropType_descriptor()
{ {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_MessageType_2eproto); ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_MessageType_2eproto);
return file_level_enum_descriptors_MessageType_2eproto[2];
return file_level_enum_descriptors_MessageType_2eproto[3];
} }
bool PropType_IsValid(int value) bool PropType_IsValid(int value)
{ {
@@ -145,7 +170,7 @@ namespace protobuf
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* StudentBuffType_descriptor() const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* StudentBuffType_descriptor()
{ {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_MessageType_2eproto); ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_MessageType_2eproto);
return file_level_enum_descriptors_MessageType_2eproto[3];
return file_level_enum_descriptors_MessageType_2eproto[4];
} }
bool StudentBuffType_IsValid(int value) bool StudentBuffType_IsValid(int value)
{ {
@@ -165,7 +190,7 @@ namespace protobuf
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* StudentState_descriptor() const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* StudentState_descriptor()
{ {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_MessageType_2eproto); ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_MessageType_2eproto);
return file_level_enum_descriptors_MessageType_2eproto[4];
return file_level_enum_descriptors_MessageType_2eproto[5];
} }
bool StudentState_IsValid(int value) bool StudentState_IsValid(int value)
{ {
@@ -177,6 +202,9 @@ namespace protobuf
case 3: case 3:
case 4: case 4:
case 5: case 5:
case 6:
case 7:
case 8:
return true; return true;
default: default:
return false; return false;
@@ -186,7 +214,7 @@ namespace protobuf
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* TrickerBuffType_descriptor() const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* TrickerBuffType_descriptor()
{ {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_MessageType_2eproto); ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_MessageType_2eproto);
return file_level_enum_descriptors_MessageType_2eproto[5];
return file_level_enum_descriptors_MessageType_2eproto[6];
} }
bool TrickerBuffType_IsValid(int value) bool TrickerBuffType_IsValid(int value)
{ {
@@ -206,7 +234,7 @@ namespace protobuf
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* PlayerType_descriptor() const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* PlayerType_descriptor()
{ {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_MessageType_2eproto); ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_MessageType_2eproto);
return file_level_enum_descriptors_MessageType_2eproto[6];
return file_level_enum_descriptors_MessageType_2eproto[7];
} }
bool PlayerType_IsValid(int value) bool PlayerType_IsValid(int value)
{ {
@@ -224,7 +252,7 @@ namespace protobuf
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* StudentType_descriptor() const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* StudentType_descriptor()
{ {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_MessageType_2eproto); ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_MessageType_2eproto);
return file_level_enum_descriptors_MessageType_2eproto[7];
return file_level_enum_descriptors_MessageType_2eproto[8];
} }
bool StudentType_IsValid(int value) bool StudentType_IsValid(int value)
{ {
@@ -244,7 +272,7 @@ namespace protobuf
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* TrickerType_descriptor() const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* TrickerType_descriptor()
{ {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_MessageType_2eproto); ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_MessageType_2eproto);
return file_level_enum_descriptors_MessageType_2eproto[8];
return file_level_enum_descriptors_MessageType_2eproto[9];
} }
bool TrickerType_IsValid(int value) bool TrickerType_IsValid(int value)
{ {
@@ -264,7 +292,7 @@ namespace protobuf
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* GameState_descriptor() const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* GameState_descriptor()
{ {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_MessageType_2eproto); ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_MessageType_2eproto);
return file_level_enum_descriptors_MessageType_2eproto[9];
return file_level_enum_descriptors_MessageType_2eproto[10];
} }
bool GameState_IsValid(int value) bool GameState_IsValid(int value)
{ {


+ 46
- 1
CAPI/proto/MessageType.pb.h View File

@@ -50,6 +50,39 @@ PROTOBUF_NAMESPACE_CLOSE
namespace protobuf namespace protobuf
{ {


enum BulletType : int
{
NULL_BULLET_TYPE = 0,
LINE_BULLET = 1,
COMMON_BULLET = 2,
FAST_BULLET = 3,
ORDINARY_BULLET = 4,
ATOM_BOMB = 5,
BulletType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(),
BulletType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max()
};
bool BulletType_IsValid(int value);
constexpr BulletType BulletType_MIN = NULL_BULLET_TYPE;
constexpr BulletType BulletType_MAX = ATOM_BOMB;
constexpr int BulletType_ARRAYSIZE = BulletType_MAX + 1;

const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* BulletType_descriptor();
template<typename T>
inline const std::string& BulletType_Name(T enum_t_value)
{
static_assert(::std::is_same<T, BulletType>::value || ::std::is_integral<T>::value, "Incorrect type passed to function BulletType_Name.");
return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum(
BulletType_descriptor(), enum_t_value
);
}
inline bool BulletType_Parse(
::PROTOBUF_NAMESPACE_ID::ConstStringParam name, BulletType* value
)
{
return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum<BulletType>(
BulletType_descriptor(), name, value
);
}
enum PlaceType : int enum PlaceType : int
{ {
NULL_PLACE_TYPE = 0, NULL_PLACE_TYPE = 0,
@@ -186,12 +219,15 @@ namespace protobuf
ADDICTED = 3, ADDICTED = 3,
QUIT = 4, QUIT = 4,
GRADUATED = 5, GRADUATED = 5,
TREATED = 6,
RESCUED = 7,
STUNNED = 8,
StudentState_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(), StudentState_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(),
StudentState_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max() StudentState_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max()
}; };
bool StudentState_IsValid(int value); bool StudentState_IsValid(int value);
constexpr StudentState StudentState_MIN = NULL_STATUS; constexpr StudentState StudentState_MIN = NULL_STATUS;
constexpr StudentState StudentState_MAX = GRADUATED;
constexpr StudentState StudentState_MAX = STUNNED;
constexpr int StudentState_ARRAYSIZE = StudentState_MAX + 1; constexpr int StudentState_ARRAYSIZE = StudentState_MAX + 1;


const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* StudentState_descriptor(); const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* StudentState_descriptor();
@@ -388,6 +424,15 @@ namespace protobuf


PROTOBUF_NAMESPACE_OPEN PROTOBUF_NAMESPACE_OPEN


template<>
struct is_proto_enum<::protobuf::BulletType> : ::std::true_type
{
};
template<>
inline const EnumDescriptor* GetEnumDescriptor<::protobuf::BulletType>()
{
return ::protobuf::BulletType_descriptor();
}
template<> template<>
struct is_proto_enum<::protobuf::PlaceType> : ::std::true_type struct is_proto_enum<::protobuf::PlaceType> : ::std::true_type
{ {


+ 22
- 0
dependency/proto/Message2Clients.proto View File

@@ -44,6 +44,28 @@ message MessageOfTricker
repeated TrickerBuffType buff = 14; repeated TrickerBuffType buff = 14;
} }


message MessageOfBullet
{
BulletType type = 1;
int32 x = 2;
int32 y = 3;
double facing_direction = 4;
int64 guid = 5;
int64 parent_team_id = 6;
PlaceType place = 7;
double bomb_range = 8;
}

message MessageOfBombedBullet //for Unity,直接继承自THUAI5
{
BulletType type = 1;
int32 x = 2;
int32 y = 3;
double facing_direction = 4;
int64 mapping_id = 5;
double bomb_range = 6;
}

message MessageOfProp // 可拾取道具的信息 message MessageOfProp // 可拾取道具的信息
{ {
PropType type = 1; PropType type = 1;


+ 13
- 0
dependency/proto/MessageType.proto View File

@@ -2,6 +2,16 @@
syntax = "proto3"; syntax = "proto3";
package protobuf; package protobuf;


enum BulletType
{
NULL_BULLET_TYPE = 0;
LINE_BULLET = 1;
COMMON_BULLET = 2;
FAST_BULLET = 3;
ORDINARY_BULLET = 4;
ATOM_BOMB = 5;
}

enum PlaceType // 地图中的所有物件类型 enum PlaceType // 地图中的所有物件类型
{ {
NULL_PLACE_TYPE = 0; NULL_PLACE_TYPE = 0;
@@ -51,6 +61,9 @@ enum StudentState
ADDICTED = 3; // 血条归零后原地沉迷游戏 ADDICTED = 3; // 血条归零后原地沉迷游戏
QUIT = 4; // 退学状态,相当于寄了 QUIT = 4; // 退学状态,相当于寄了
GRADUATED = 5; // 毕业状态,相当于逃脱了 GRADUATED = 5; // 毕业状态,相当于逃脱了
TREATED = 6;
RESCUED = 7;
STUNNED = 8;
} }


enum TrickerBuffType // 屠夫可用的增益效果类型 enum TrickerBuffType // 屠夫可用的增益效果类型


Loading…
Cancel
Save