diff --git a/xml_converter/doc/rendering/render_ingame.md b/xml_converter/doc/rendering/render_ingame.md
index b84edfb2..3000df16 100644
--- a/xml_converter/doc/rendering/render_ingame.md
+++ b/xml_converter/doc/rendering/render_ingame.md
@@ -3,8 +3,14 @@ name: Render Ingame
type: Boolean
applies_to: [Icon, Trail]
xml_fields: [IngameVisibility, BHIngameVisibility]
-protobuf_field: tentative__render_ingame
-
+protobuf_field: is_hidden_ingame
+custom_functions:
+ read.xml:
+ function: inverted_xml_attribute_to_bool
+ side_effects: []
+ write.xml:
+ function: bool_to_inverted_xml_attribute
+ side_effects: []
---
Allows or Prevents this object from being rendered in the 3D game space.
@@ -12,5 +18,5 @@ Allows or Prevents this object from being rendered in the 3D game space.
Notes
=====
-We want to figure out a way to invert this value becuase a "false" value is the default value inside a protobuf and if we set the default as "true" then we have to write this field for every object. This inversion will need to be present in the code generator and that might take a bit to design and implement.
+https://gw2pathing.com/docs/marker-dev/attributes/visibility
diff --git a/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/input/pack/markers.bin b/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/input/pack/markers.bin
new file mode 100644
index 00000000..6da03ce8
Binary files /dev/null and b/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/input/pack/markers.bin differ
diff --git a/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/output_proto/markers.bin
new file mode 100644
index 00000000..6da03ce8
Binary files /dev/null and b/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/output_proto/markers.bin differ
diff --git a/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/output_xml/xml_file.xml
new file mode 100644
index 00000000..e647bc3e
--- /dev/null
+++ b/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/output_xml/xml_file.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/testcase.yaml b/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/testcase.yaml
new file mode 100644
index 00000000..d87f4066
--- /dev/null
+++ b/xml_converter/integration_tests/test_cases/proto_is_hidden_ingame/testcase.yaml
@@ -0,0 +1,5 @@
+input_paths:
+ "pack": "proto"
+expected_stdout: |
+expected_stderr: |
+expected_returncode: 0
diff --git a/xml_converter/integration_tests/test_cases/xml_render_ingame/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_render_ingame/input/pack/xml_file.xml
new file mode 100644
index 00000000..38e3d973
--- /dev/null
+++ b/xml_converter/integration_tests/test_cases/xml_render_ingame/input/pack/xml_file.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/xml_converter/integration_tests/test_cases/xml_render_ingame/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_render_ingame/output_proto/markers.bin
new file mode 100644
index 00000000..f7b462ac
Binary files /dev/null and b/xml_converter/integration_tests/test_cases/xml_render_ingame/output_proto/markers.bin differ
diff --git a/xml_converter/integration_tests/test_cases/xml_render_ingame/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_render_ingame/output_xml/xml_file.xml
new file mode 100644
index 00000000..92b78696
--- /dev/null
+++ b/xml_converter/integration_tests/test_cases/xml_render_ingame/output_xml/xml_file.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/xml_converter/integration_tests/test_cases/xml_render_ingame/testcase.yaml b/xml_converter/integration_tests/test_cases/xml_render_ingame/testcase.yaml
new file mode 100644
index 00000000..9510c793
--- /dev/null
+++ b/xml_converter/integration_tests/test_cases/xml_render_ingame/testcase.yaml
@@ -0,0 +1,5 @@
+input_paths:
+ "pack": "xml"
+expected_stdout: |
+expected_stderr: |
+expected_returncode: 0
diff --git a/xml_converter/proto/waypoint.proto b/xml_converter/proto/waypoint.proto
index 1a028d79..d5520acb 100644
--- a/xml_converter/proto/waypoint.proto
+++ b/xml_converter/proto/waypoint.proto
@@ -55,9 +55,9 @@ message Icon {
SpecializationFilter specialization_filter = 31;
SpeciesFilter species_filter = 32;
CullChirality cull_chirality = 33;
+ bool is_hidden_ingame = 34;
float tentative__scale = 2048;
- bool tentative__render_ingame = 2049;
bool tentative__render_on_map = 2050;
bool tentative__render_on_minimap = 2051;
string bhdraft__schedule = 2052;
@@ -87,8 +87,8 @@ message Trail {
SpeciesFilter species_filter = 28;
int32 map_display_size = 29;
CullChirality cull_chirality = 30;
+ bool is_hidden_ingame = 31;
- bool tentative__render_ingame = 2049;
bool tentative__render_on_map = 2050;
bool tentative__render_on_minimap = 2051;
string bhdraft__schedule = 2052;
diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp
index 36c87c83..73443810 100644
--- a/xml_converter/src/icon_gen.cpp
+++ b/xml_converter/src/icon_gen.cpp
@@ -182,10 +182,10 @@ bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorprofession_filter), &(this->profession_filter_is_set));
}
else if (attributename == "ingamevisibility") {
- xml_attribute_to_bool(attribute, errors, state, &(this->render_ingame), &(this->render_ingame_is_set));
+ inverted_xml_attribute_to_bool(attribute, errors, state, &(this->render_ingame), &(this->render_ingame_is_set));
}
else if (attributename == "bhingamevisibility") {
- xml_attribute_to_bool(attribute, errors, state, &(this->render_ingame), &(this->render_ingame_is_set));
+ inverted_xml_attribute_to_bool(attribute, errors, state, &(this->render_ingame), &(this->render_ingame_is_set));
}
else if (attributename == "mapvisibility") {
xml_attribute_to_bool(attribute, errors, state, &(this->render_on_map), &(this->render_on_map_is_set));
@@ -364,7 +364,7 @@ vector Icon::as_xml(XMLWriterState* state) const {
xml_node_contents.push_back(profession_filter_to_xml_attribute("Profession", state, &this->profession_filter));
}
if (this->render_ingame_is_set) {
- xml_node_contents.push_back(bool_to_xml_attribute("IngameVisibility", state, &this->render_ingame));
+ xml_node_contents.push_back(bool_to_inverted_xml_attribute("IngameVisibility", state, &this->render_ingame));
}
if (this->render_on_map_is_set) {
xml_node_contents.push_back(bool_to_xml_attribute("MapVisibility", state, &this->render_on_map));
@@ -540,7 +540,7 @@ waypoint::Icon Icon::as_protobuf(ProtoWriterState* state) const {
profession_filter_to_proto(this->profession_filter, state, setter);
}
if (this->render_ingame_is_set) {
- std::function setter = [&proto_icon](bool val) { proto_icon.set_tentative__render_ingame(val); };
+ std::function setter = [&proto_icon](bool val) { proto_icon.set_is_hidden_ingame(val); };
bool_to_proto(this->render_ingame, state, setter);
}
if (this->render_on_map_is_set) {
@@ -695,8 +695,8 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon, ProtoReaderState* state) {
if (proto_icon.has_profession_filter()) {
proto_to_profession_filter(proto_icon.profession_filter(), state, &(this->profession_filter), &(this->profession_filter_is_set));
}
- if (proto_icon.tentative__render_ingame() != 0) {
- proto_to_bool(proto_icon.tentative__render_ingame(), state, &(this->render_ingame), &(this->render_ingame_is_set));
+ if (proto_icon.is_hidden_ingame() != 0) {
+ proto_to_bool(proto_icon.is_hidden_ingame(), state, &(this->render_ingame), &(this->render_ingame_is_set));
}
if (proto_icon.tentative__render_on_map() != 0) {
proto_to_bool(proto_icon.tentative__render_on_map(), state, &(this->render_on_map), &(this->render_on_map_is_set));
diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp
index a22ff256..274cb021 100644
--- a/xml_converter/src/trail_gen.cpp
+++ b/xml_converter/src/trail_gen.cpp
@@ -104,10 +104,10 @@ bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorprofession_filter), &(this->profession_filter_is_set));
}
else if (attributename == "ingamevisibility") {
- xml_attribute_to_bool(attribute, errors, state, &(this->render_ingame), &(this->render_ingame_is_set));
+ inverted_xml_attribute_to_bool(attribute, errors, state, &(this->render_ingame), &(this->render_ingame_is_set));
}
else if (attributename == "bhingamevisibility") {
- xml_attribute_to_bool(attribute, errors, state, &(this->render_ingame), &(this->render_ingame_is_set));
+ inverted_xml_attribute_to_bool(attribute, errors, state, &(this->render_ingame), &(this->render_ingame_is_set));
}
else if (attributename == "mapvisibility") {
xml_attribute_to_bool(attribute, errors, state, &(this->render_on_map), &(this->render_on_map_is_set));
@@ -214,7 +214,7 @@ vector Trail::as_xml(XMLWriterState* state) const {
xml_node_contents.push_back(profession_filter_to_xml_attribute("Profession", state, &this->profession_filter));
}
if (this->render_ingame_is_set) {
- xml_node_contents.push_back(bool_to_xml_attribute("IngameVisibility", state, &this->render_ingame));
+ xml_node_contents.push_back(bool_to_inverted_xml_attribute("IngameVisibility", state, &this->render_ingame));
}
if (this->render_on_map_is_set) {
xml_node_contents.push_back(bool_to_xml_attribute("MapVisibility", state, &this->render_on_map));
@@ -314,7 +314,7 @@ waypoint::Trail Trail::as_protobuf(ProtoWriterState* state) const {
profession_filter_to_proto(this->profession_filter, state, setter);
}
if (this->render_ingame_is_set) {
- std::function setter = [&proto_trail](bool val) { proto_trail.set_tentative__render_ingame(val); };
+ std::function setter = [&proto_trail](bool val) { proto_trail.set_is_hidden_ingame(val); };
bool_to_proto(this->render_ingame, state, setter);
}
if (this->render_on_map_is_set) {
@@ -405,8 +405,8 @@ void Trail::parse_protobuf(waypoint::Trail proto_trail, ProtoReaderState* state)
if (proto_trail.has_profession_filter()) {
proto_to_profession_filter(proto_trail.profession_filter(), state, &(this->profession_filter), &(this->profession_filter_is_set));
}
- if (proto_trail.tentative__render_ingame() != 0) {
- proto_to_bool(proto_trail.tentative__render_ingame(), state, &(this->render_ingame), &(this->render_ingame_is_set));
+ if (proto_trail.is_hidden_ingame() != 0) {
+ proto_to_bool(proto_trail.is_hidden_ingame(), state, &(this->render_ingame), &(this->render_ingame_is_set));
}
if (proto_trail.tentative__render_on_map() != 0) {
proto_to_bool(proto_trail.tentative__render_on_map(), state, &(this->render_on_map), &(this->render_on_map_is_set));