1
This commit is contained in:
parent
67465bc565
commit
dd2da45e78
@ -30,6 +30,7 @@ namespace mtb
|
||||
float scale() const { return scale_; };
|
||||
const std::string map_collider() const { return map_collider_; };
|
||||
const std::string world_object_file() const { return world_object_file_; };
|
||||
const std::string terrain_file() const { return terrain_file_; };
|
||||
|
||||
bool has_map_id() const { return __flags__.test(0);};
|
||||
bool has_template_list() const { return __flags__.test(1);};
|
||||
@ -51,6 +52,7 @@ namespace mtb
|
||||
bool has_scale() const { return __flags__.test(17);};
|
||||
bool has_map_collider() const { return __flags__.test(18);};
|
||||
bool has_world_object_file() const { return __flags__.test(19);};
|
||||
bool has_terrain_file() const { return __flags__.test(20);};
|
||||
|
||||
protected:
|
||||
|
||||
@ -74,9 +76,10 @@ namespace mtb
|
||||
float scale_ = 0.0f;
|
||||
std::string map_collider_;
|
||||
std::string world_object_file_;
|
||||
std::string terrain_file_;
|
||||
|
||||
public:
|
||||
std::bitset<20> __flags__;
|
||||
std::bitset<21> __flags__;
|
||||
};
|
||||
|
||||
};
|
||||
|
@ -67,7 +67,7 @@ namespace mtb
|
||||
{
|
||||
a8::reflect::Class* meta_class = nullptr;
|
||||
if (!meta_class) {
|
||||
meta_class = new a8::reflect::Class("Map", 20, 0);
|
||||
meta_class = new a8::reflect::Class("Map", 21, 0);
|
||||
meta_class->SetSimpleField(0, "map_id", a8::reflect::ET_INT32, my_offsetof2(Map, map_id_));
|
||||
meta_class->SetSimpleField(1, "template_list", a8::reflect::ET_STRING, my_offsetof2(Map, template_list_));
|
||||
meta_class->SetSimpleField(2, "map_name", a8::reflect::ET_STRING, my_offsetof2(Map, map_name_));
|
||||
@ -88,6 +88,7 @@ namespace mtb
|
||||
meta_class->SetSimpleField(17, "scale", a8::reflect::ET_FLOAT, my_offsetof2(Map, scale_));
|
||||
meta_class->SetSimpleField(18, "map_collider", a8::reflect::ET_STRING, my_offsetof2(Map, map_collider_));
|
||||
meta_class->SetSimpleField(19, "world_object_file", a8::reflect::ET_STRING, my_offsetof2(Map, world_object_file_));
|
||||
meta_class->SetSimpleField(20, "terrain_file", a8::reflect::ET_STRING, my_offsetof2(Map, terrain_file_));
|
||||
}
|
||||
return meta_class;
|
||||
}
|
||||
|
@ -35,6 +35,7 @@ message Map
|
||||
optional float scale = 18;
|
||||
optional string map_collider = 19;
|
||||
optional string world_object_file = 20;
|
||||
optional string terrain_file = 21;
|
||||
}
|
||||
|
||||
message MapArea
|
||||
|
@ -16,4 +16,14 @@ message HeightData{
|
||||
message HeightInfo{
|
||||
optional int32 t = 1;
|
||||
required int32 h = 2;
|
||||
}
|
||||
}
|
||||
|
||||
message vector3{
|
||||
required float x = 1;
|
||||
required float y = 2;
|
||||
required float z = 3;
|
||||
}
|
||||
message vertex{
|
||||
repeated vector3 vectors = 1;
|
||||
repeated int32 triangles = 2;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user