From 919b5501fb4683b3f27baceab4c0d8e5e22a0a7b Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sat, 21 Sep 2024 22:24:23 -0400 Subject: [PATCH 1/2] Changed the name waypoint to guildpoint --- .github/workflows/diff_protobin.yml | 4 +- CategoryData.gd | 4 +- Icon.gd | 4 +- ImportPackDialog.gd | 4 +- Spatial.gd | 256 +++++++++--------- Trail2D.gd | 6 +- Trail3D.gd | 6 +- waypoint.gd => guildpoint.gd | 190 ++++++------- xml_converter/CMakeLists.txt | 2 +- .../disable_player_cutout.md | 2 +- .../cpp_templates/attribute_template.hpp | 2 +- .../attribute_template_compoundvalue.cpp | 2 +- .../cpp_templates/attribute_template_enum.cpp | 2 +- .../attribute_template_multiflagvalue.cpp | 2 +- .../cpp_templates/class_template.cpp | 6 +- .../cpp_templates/class_template.hpp | 4 +- xml_converter/generators/generate_cpp.py | 4 +- xml_converter/generators/protobuf_types.py | 6 +- xml_converter/integration_tests/run_tests.py | 8 +- .../integration_tests/src/proto_utils.py | 14 +- .../{waypoint.proto => guildpoint.proto} | 4 +- xml_converter/src/attribute/color.cpp | 2 +- xml_converter/src/attribute/color.hpp | 2 +- .../src/attribute/cull_chirality_gen.cpp | 20 +- .../src/attribute/cull_chirality_gen.hpp | 6 +- .../src/attribute/euler_rotation_gen.cpp | 8 +- .../src/attribute/euler_rotation_gen.hpp | 6 +- .../src/attribute/festival_filter_gen.cpp | 8 +- .../src/attribute/festival_filter_gen.hpp | 6 +- .../src/attribute/map_type_filter_gen.cpp | 8 +- .../src/attribute/map_type_filter_gen.hpp | 6 +- .../src/attribute/marker_category.cpp | 10 +- .../src/attribute/marker_category.hpp | 6 +- .../src/attribute/mount_filter_gen.cpp | 8 +- .../src/attribute/mount_filter_gen.hpp | 6 +- xml_converter/src/attribute/position_gen.cpp | 8 +- xml_converter/src/attribute/position_gen.hpp | 6 +- .../src/attribute/profession_filter_gen.cpp | 8 +- .../src/attribute/profession_filter_gen.hpp | 6 +- .../src/attribute/reset_behavior_gen.cpp | 44 +-- .../src/attribute/reset_behavior_gen.hpp | 6 +- .../attribute/specialization_filter_gen.cpp | 8 +- .../attribute/specialization_filter_gen.hpp | 6 +- .../src/attribute/species_filter_gen.cpp | 8 +- .../src/attribute/species_filter_gen.hpp | 6 +- xml_converter/src/attribute/trail_data.cpp | 8 +- xml_converter/src/attribute/trail_data.hpp | 6 +- xml_converter/src/attribute/unique_id.cpp | 2 +- xml_converter/src/attribute/unique_id.hpp | 2 +- xml_converter/src/category_gen.cpp | 8 +- xml_converter/src/category_gen.hpp | 6 +- xml_converter/src/icon_gen.cpp | 34 +-- xml_converter/src/icon_gen.hpp | 6 +- xml_converter/src/packaging_protobin.cpp | 24 +- xml_converter/src/packaging_protobin.hpp | 2 +- .../src/state_structs/proto_reader_state.hpp | 4 +- xml_converter/src/trail_gen.cpp | 24 +- xml_converter/src/trail_gen.hpp | 6 +- xml_converter/src/xml_converter.cpp | 70 ++--- 59 files changed, 471 insertions(+), 471 deletions(-) rename waypoint.gd => guildpoint.gd (96%) rename xml_converter/proto/{waypoint.proto => guildpoint.proto} (99%) diff --git a/.github/workflows/diff_protobin.yml b/.github/workflows/diff_protobin.yml index 86d8ff2a..78dee1e0 100644 --- a/.github/workflows/diff_protobin.yml +++ b/.github/workflows/diff_protobin.yml @@ -27,14 +27,14 @@ jobs: mkdir -p $(dirname "$file") if [ -n "$(git ls-tree "origin/${{ github.base_ref }}" -- "$file")" ]; then git show origin/${{ github.base_ref }}:$file > $file._old - protoc --decode=waypoint.Waypoint xml_converter/proto/waypoint.proto < $file._old > $file.textproto._old + protoc --decode=guildpoint.Guildpoint xml_converter/proto/guildpoint.proto < $file._old > $file.textproto._old else touch $file.textproto._old fi if [ -n "$(git ls-tree "refs/pull/${{ github.event.pull_request.number }}/head" -- "$file")" ]; then git show refs/pull/${{ github.event.pull_request.number }}/head:$file > $file._new - protoc --decode=waypoint.Waypoint xml_converter/proto/waypoint.proto < $file._new > $file.textproto._new + protoc --decode=guildpoint.Guildpoint xml_converter/proto/guildpoint.proto < $file._new > $file.textproto._new else touch $file.textproto._new fi diff --git a/CategoryData.gd b/CategoryData.gd index dfad8d30..3c4a6b04 100644 --- a/CategoryData.gd +++ b/CategoryData.gd @@ -1,6 +1,6 @@ -const Waypoint = preload("res://waypoint.gd") +const Guildpoint = preload("res://guildpoint.gd") var category3d: Spatial var category2d: Node2D -var waypoint_category: Waypoint.Category +var guildpoint_category: Guildpoint.Category var is_visible = false diff --git a/Icon.gd b/Icon.gd index 2c3fa437..f4fc9209 100644 --- a/Icon.gd +++ b/Icon.gd @@ -1,8 +1,8 @@ extends Sprite3D -const Waypoint = preload("res://waypoint.gd") +const Guildpoint = preload("res://guildpoint.gd") -var waypoint: Waypoint.Icon +var guildpoint: Guildpoint.Icon var category: TreeItem func set_icon_image(texture_path: String): diff --git a/ImportPackDialog.gd b/ImportPackDialog.gd index 3db05f00..597bf7da 100644 --- a/ImportPackDialog.gd +++ b/ImportPackDialog.gd @@ -19,7 +19,7 @@ func _on_FileDialog_dir_selected(dir_path: String): FileHandler.create_directory_if_missing(new_path) var args: PoolStringArray = [ "--input-taco-path", dir_path, - "--output-waypoint-path", new_path, - "--output-split-waypoint-path", self.unsaved_markers_dir + "--output-guildpoint-path", new_path, + "--output-split-guildpoint-path", self.unsaved_markers_dir ] FileHandler.call_xml_converter(args) diff --git a/Spatial.gd b/Spatial.gd index 66206751..d31d934a 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -19,7 +19,7 @@ var next_texture_id: int = 0 # will be created. var currently_active_trail3d = null var currently_active_trail2d = null -var currently_active_waypoint_trail = null +var currently_active_guildpoint_trail = null var currently_active_category = null var map_was_open = false @@ -55,7 +55,7 @@ const gizmo_scene = preload("res://Gizmo/PointEdit.tscn") # Scripts containing code used by this scene const CategoryData = preload("res://CategoryData.gd") -const Waypoint = preload("res://waypoint.gd") +const Guildpoint = preload("res://guildpoint.gd") const FileHandler = preload("res://FileHandler.gd") # File path for the the json that contains a hash of the data files @@ -345,15 +345,15 @@ func decode_context_packet(spb: StreamPeerBuffer): print("New Map") var old_texture_path: String = "" old_texture_path = get_texture_path(self.next_texture_id) - if old_map_id != 0 and not read_hash(old_map_id) == make_hash(self.waypoint_data.to_bytes()): + if old_map_id != 0 and not read_hash(old_map_id) == make_hash(self.guildpoint_data.to_bytes()): print("Saving Old Map") save_map_data(old_map_id) print("Loading New Map") - load_waypoint_markers(self.map_id) + load_guildpoint_markers(self.map_id) self.next_texture_id = get_texture_index(old_texture_path) if self.next_texture_id == -1: - self.waypoint_data.add_textures().set_filepath(old_texture_path) - self.next_texture_id = self.waypoint_data.get_textures().size() - 1 + self.guildpoint_data.add_textures().set_filepath(old_texture_path) + self.next_texture_id = self.guildpoint_data.get_textures().size() - 1 reset_minimap_masks() @@ -400,7 +400,7 @@ func reset_3D_minimap_masks(category: Spatial): reset_3D_minimap_masks(subcategory) -var waypoint_data = Waypoint.Waypoint.new() +var guildpoint_data = Guildpoint.Guildpoint.new() # We save the marker data in this directory when the files are have been split # by Map ID. All changes made by the editor are automatically saved in these # files prior to export. @@ -408,21 +408,21 @@ var unsaved_markers_dir = "user://protobin_by_map_id/" var saved_markers_dir = "user://protobin/" var marker_file_path = "" -func load_waypoint_markers(map_id_to_load: int): +func load_guildpoint_markers(map_id_to_load: int): self.marker_file_path = self.unsaved_markers_dir + String(map_id_to_load) + ".bin" - self.waypoint_data = Waypoint.Waypoint.new() + self.guildpoint_data = Guildpoint.Guildpoint.new() clear_map_markers() init_category_tree() var file = File.new() print("Loading protobuf file from path ", self.marker_file_path) file.open(self.marker_file_path, file.READ) var data = file.get_buffer(file.get_len()) - self.waypoint_data.from_bytes(data) - if !Waypoint.PB_ERR.NO_ERRORS: + self.guildpoint_data.from_bytes(data) + if !Guildpoint.PB_ERR.NO_ERRORS: print("OK") else: - print(Waypoint.PB_ERR) - waypoint_categories_to_godot_nodes() + print(Guildpoint.PB_ERR) + guildpoint_categories_to_godot_nodes() ##########Gizmo Stuff########### @@ -510,12 +510,12 @@ func init_category_tree(): -func waypoint_categories_to_godot_nodes(): - for waypoint_category in self.waypoint_data.get_category(): - _waypoint_categories_to_godot_nodes(null, waypoint_category, self.markers_3d, self.markers_2d, false) +func guildpoint_categories_to_godot_nodes(): + for guildpoint_category in self.guildpoint_data.get_category(): + _guildpoint_categories_to_godot_nodes(null, guildpoint_category, self.markers_3d, self.markers_2d, false) -func _waypoint_categories_to_godot_nodes(item: TreeItem, waypoint_category: Waypoint.Category, parent_category3d: Spatial, parent_category2d: Node2D, collapsed: bool): +func _guildpoint_categories_to_godot_nodes(item: TreeItem, guildpoint_category: Guildpoint.Category, parent_category3d: Spatial, parent_category2d: Node2D, collapsed: bool): var godot_category3d = category3d_scene.instance() var godot_category2d = category2d_scene.instance() parent_category3d.add_subcategory(godot_category3d) @@ -523,12 +523,12 @@ func _waypoint_categories_to_godot_nodes(item: TreeItem, waypoint_category: Wayp var category_item: TreeItem = self.markers_ui.create_item(item) var category_data = CategoryData.new() - category_data.waypoint_category = waypoint_category + category_data.guildpoint_category = guildpoint_category category_data.category3d = godot_category3d category_data.category2d = godot_category2d category_item.set_metadata(0, category_data) - var category_name: String = waypoint_category.get_name() + var category_name: String = guildpoint_category.get_name() if category_name == "": print("Category found with no name.") category_name = "No Name" @@ -548,15 +548,15 @@ func _waypoint_categories_to_godot_nodes(item: TreeItem, waypoint_category: Wayp godot_category3d.visible = category_data.is_visible godot_category2d.visible = category_data.is_visible - for trail in waypoint_category.get_trail(): + for trail in guildpoint_category.get_trail(): gen_new_trail(trail, category_item) - for icon in waypoint_category.get_icon(): + for icon in guildpoint_category.get_icon(): gen_new_icon(icon, category_item) - for category_child in waypoint_category.get_children(): - _waypoint_categories_to_godot_nodes(category_item, category_child, godot_category3d, godot_category2d, true) + for category_child in guildpoint_category.get_children(): + _guildpoint_categories_to_godot_nodes(category_item, category_child, godot_category3d, godot_category2d, true) func apply_category_visibility_to_nodes(category_item: TreeItem): @@ -574,17 +574,17 @@ func apply_category_visibility_to_nodes(category_item: TreeItem): category_data.category2d.visible = category_data.is_visible -func gen_new_trail(waypoint_trail: Waypoint.Trail, category_item: TreeItem) -> Array: +func gen_new_trail(guildpoint_trail: Guildpoint.Trail, category_item: TreeItem) -> Array: # Create the texture to use from an image file # TODO: We want to be able to cache this data so that if a texture is used # by multiple objects we only need to keep ony copy of it in memory. #22. # TODO: We want to have two copies of each texture in memory one for 2D # which does not use srgb to render properly, and one for 3D which forces # srgb to render properly. Issue #23. - var texture_id: int = waypoint_trail.get_texture_id() + var texture_id: int = guildpoint_trail.get_texture_id() if texture_id == 0: var category_data = category_item.get_metadata(0) - print("Warning: No texture found in " , category_data.waypoint_category.get_name()) + print("Warning: No texture found in " , category_data.guildpoint_category.get_name()) # TODO(330): Error Textures var texture_path: String = self.unsaved_markers_dir + get_texture_path(texture_id) var texture_file = File.new() @@ -600,7 +600,7 @@ func gen_new_trail(waypoint_trail: Waypoint.Trail, category_item: TreeItem) -> A texture.create_from_image(image, 22) var new_trail3d = trail3d_scene.instance() - new_trail3d.waypoint = waypoint_trail + new_trail3d.guildpoint = guildpoint_trail new_trail3d.refresh_mesh() new_trail3d.set_texture(texture) var category_data = category_item.get_metadata(0) @@ -611,29 +611,29 @@ func gen_new_trail(waypoint_trail: Waypoint.Trail, category_item: TreeItem) -> A var new_trail2d = trail2d_scene.instance() var points_2d := PoolVector2Array() new_trail2d.texture = texture - new_trail2d.waypoint = waypoint_trail + new_trail2d.guildpoint = guildpoint_trail new_trail2d.refresh_points() category_data.category2d.add_trail2d(new_trail2d) return [new_trail3d, new_trail2d] -func gen_new_icon(waypoint_icon: Waypoint.Icon, category_item: TreeItem): - var texture_id: int = waypoint_icon.get_texture_id() +func gen_new_icon(guildpoint_icon: Guildpoint.Icon, category_item: TreeItem): + var texture_id: int = guildpoint_icon.get_texture_id() if texture_id == 0: var category_data = category_item.get_metadata(0) - print("Warning: No texture found in " , category_data.waypoint_category.get_name()) + print("Warning: No texture found in " , category_data.guildpoint_category.get_name()) # TODO(330) Error Textures var texture_path: String = self.unsaved_markers_dir + get_texture_path(texture_id) - var position = waypoint_icon.get_position() + var position = guildpoint_icon.get_position() if position == null: var category_data = category_item.get_metadata(0) - print("Warning: No position found for icon ", category_data.waypoint_category.get_name()) + print("Warning: No position found for icon ", category_data.guildpoint_category.get_name()) return var position_vector = Vector3(position.get_x(), position.get_y(), -position.get_z()) var new_icon = icon_scene.instance() new_icon.translation = position_vector new_icon.set_icon_image(texture_path) - new_icon.waypoint = waypoint_icon + new_icon.guildpoint = guildpoint_icon var category_data = category_item.get_metadata(0) category_data.category3d.add_icon(new_icon) @@ -641,7 +641,7 @@ func gen_new_icon(waypoint_icon: Waypoint.Icon, category_item: TreeItem): # Section of functions for saving data to file ################################################################################ func save_map_data(map_id: int): - var packed_bytes = self.waypoint_data.to_bytes() + var packed_bytes = self.guildpoint_data.to_bytes() var file = File.new() file.open(self.marker_file_path, file.WRITE) file.store_buffer(packed_bytes) @@ -695,15 +695,15 @@ func gen_adjustment_nodes(): if self.currently_active_category == null: print("No category selected") return - var waypoint_category = self.currently_active_category.get_metadata(0).waypoint_category + var guildpoint_category = self.currently_active_category.get_metadata(0).guildpoint_category var category3d = self.currently_active_category.get_metadata(0).category3d var category2d = self.currently_active_category.get_metadata(0).category2d - for trail_index in waypoint_category.get_trail().size(): - var waypoint_trail = waypoint_category.get_trail()[trail_index] + for trail_index in guildpoint_category.get_trail().size(): + var guildpoint_trail = guildpoint_category.get_trail()[trail_index] var trail3d = category3d.trails3d[trail_index] var trail2d = category2d.trails2d[trail_index] - for point_index in get_trail_point_count(waypoint_trail): - var gizmo_position = get_trail_point_position(waypoint_trail, point_index) + for point_index in get_trail_point_count(guildpoint_trail): + var gizmo_position = get_trail_point_position(guildpoint_trail, point_index) # Simplistic cull to prevent nodes that are too far away to be # visible from being created. Additional work can be done here # if this is not enough of an optimization in the future. @@ -711,24 +711,24 @@ func gen_adjustment_nodes(): continue var new_gizmo = gizmo_scene.instance() new_gizmo.translation = gizmo_position - new_gizmo.connect("selected", self, "on_trail_gizmo_selected", [waypoint_trail, trail3d, trail2d, point_index]) + new_gizmo.connect("selected", self, "on_trail_gizmo_selected", [guildpoint_trail, trail3d, trail2d, point_index]) new_gizmo.connect("deselected", self, "on_gizmo_deselected") - new_gizmo.connect("updated", self, "set_trail_point_position", [waypoint_trail, trail3d, trail2d, point_index]) + new_gizmo.connect("updated", self, "set_trail_point_position", [guildpoint_trail, trail3d, trail2d, point_index]) $Gizmos.add_child(new_gizmo) - for icon_index in waypoint_category.get_icon().size(): - var waypoint_icon = waypoint_category.get_icon()[icon_index] + for icon_index in guildpoint_category.get_icon().size(): + var guildpoint_icon = guildpoint_category.get_icon()[icon_index] var icon = category3d.icons[icon_index] var new_gizmo = gizmo_scene.instance() - new_gizmo.translation = get_icon_position(waypoint_icon) - new_gizmo.connect("selected", self, "on_icon_gizmo_selected", [waypoint_icon, icon]) + new_gizmo.translation = get_icon_position(guildpoint_icon) + new_gizmo.connect("selected", self, "on_icon_gizmo_selected", [guildpoint_icon, icon]) new_gizmo.connect("deselected", self, "on_gizmo_deselected") - new_gizmo.connect("updated", self, "set_icon_position", [waypoint_icon, icon]) + new_gizmo.connect("updated", self, "set_icon_position", [guildpoint_icon, icon]) $Gizmos.add_child(new_gizmo) var currently_selected_gizmo = null var currently_selected_icon = null -var currently_selected_waypoint_icon = null -var currently_selected_waypoint_trail = null +var currently_selected_guildpoint_icon = null +var currently_selected_guildpoint_trail = null var currently_selected_trail3d = null var currently_selected_trail2d = null var currently_selected_point_index = null @@ -736,19 +736,19 @@ var currently_selected_point_index = null func set_2D_position_from_3D_point(position: Vector3, trail2d: Line2D, index: int): trail2d.set_point_position(index, Vector2(position.x, position.z)) -func on_icon_gizmo_selected(object: Spatial, waypoint_icon: Waypoint.Icon, icon: Sprite3D): +func on_icon_gizmo_selected(object: Spatial, guildpoint_icon: Guildpoint.Icon, icon: Sprite3D): self.currently_selected_gizmo = object self.currently_selected_icon = icon - self.currently_selected_waypoint_icon = waypoint_icon + self.currently_selected_guildpoint_icon = guildpoint_icon $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/DeleteNode.disabled = false $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/SnapSelectedToPlayer.disabled = false $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/XZSnapToPlayer.disabled = false $Control/Dialogs/NodeEditorDialog/ScrollContainer/VBoxContainer/YSnapToPlayer.disabled = false -func on_trail_gizmo_selected(object: Spatial, waypoint_trail: Waypoint.Trail, trail3d: Spatial, trail2d: Line2D, point_index: int): +func on_trail_gizmo_selected(object: Spatial, guildpoint_trail: Guildpoint.Trail, trail3d: Spatial, trail2d: Line2D, point_index: int): self.currently_selected_gizmo = object - self.currently_selected_waypoint_trail = waypoint_trail + self.currently_selected_guildpoint_trail = guildpoint_trail self.currently_selected_trail3d = trail3d self.currently_selected_trail2d = trail2d self.currently_selected_point_index = point_index @@ -764,8 +764,8 @@ func on_trail_gizmo_selected(object: Spatial, waypoint_trail: Waypoint.Trail, tr func on_gizmo_deselected(): self.currently_selected_gizmo = null self.currently_selected_icon = null - self.currently_selected_waypoint_icon = null - self.currently_selected_waypoint_trail = null + self.currently_selected_guildpoint_icon = null + self.currently_selected_guildpoint_trail = null self.currently_selected_trail3d = null self.currently_selected_trail2d = null self.currently_selected_point_index = null @@ -784,85 +784,85 @@ func clear_adjustment_nodes(): child.queue_free() ################################################################################ -# Update Waypoint datum +# Update Guildpoint datum ################################################################################ func get_texture_index(path: String) -> int: if path == "": return 0 - for i in self.waypoint_data.get_textures().size(): - if path == self.waypoint_data.get_textures()[i].get_filepath(): + for i in self.guildpoint_data.get_textures().size(): + if path == self.guildpoint_data.get_textures()[i].get_filepath(): return i return -1 func get_texture_path(texture_id: int) -> String: if texture_id == 0: return "" - if texture_id >= self.waypoint_data.get_textures().size() or texture_id < 0: + if texture_id >= self.guildpoint_data.get_textures().size() or texture_id < 0: toast("Invalid texture index found") # TODO(330): This should return an error texture filepath instead of empty string return "" - return self.waypoint_data.get_textures()[texture_id].get_filepath() + return self.guildpoint_data.get_textures()[texture_id].get_filepath() -func set_icon_position(new_position: Vector3, waypoint_icon: Waypoint.Icon, icon: Sprite3D): - if icon.waypoint != waypoint_icon: - push_error("Desync between Waypoint and Icon") - var position = waypoint_icon.new_position() +func set_icon_position(new_position: Vector3, guildpoint_icon: Guildpoint.Icon, icon: Sprite3D): + if icon.guildpoint != guildpoint_icon: + push_error("Desync between Guildpoint and Icon") + var position = guildpoint_icon.new_position() position.set_x(new_position.x) position.set_y(new_position.y) position.set_z(new_position.z) icon.set_position(new_position) -func remove_icon(waypoint_icon: Waypoint.Icon, icon: Sprite3D): - if icon.waypoint != waypoint_icon: - push_error("Desync between Waypoint and Icon") +func remove_icon(guildpoint_icon: Guildpoint.Icon, icon: Sprite3D): + if icon.guildpoint != guildpoint_icon: + push_error("Desync between Guildpoint and Icon") var category: Node = icon.get_parent() var icon_index: int = category.icons.find(icon) - category.waypoint_category.get_icon().remove(icon_index) + category.guildpoint_category.get_icon().remove(icon_index) category.category3d.remove_icon(icon) -func get_icon_position(waypoint_icon: Waypoint.Icon): +func get_icon_position(guildpoint_icon: Guildpoint.Icon): var position: Vector3 - position[0] = waypoint_icon.get_position().get_x() - position[1] = waypoint_icon.get_position().get_y() - position[2] = -waypoint_icon.get_position().get_z() + position[0] = guildpoint_icon.get_position().get_x() + position[1] = guildpoint_icon.get_position().get_y() + position[2] = -guildpoint_icon.get_position().get_z() return position -func set_trail_point_position(position: Vector3, waypoint_trail: Waypoint.Trail, trail3d: Spatial, trail2d: Line2D, point_index: int): - if trail3d.waypoint != trail2d.waypoint or trail2d.waypoint != waypoint_trail: - push_error("Desync between Waypoint, Trail3D, and Trail2D") - var trail_data = waypoint_trail.get_trail_data() +func set_trail_point_position(position: Vector3, guildpoint_trail: Guildpoint.Trail, trail3d: Spatial, trail2d: Line2D, point_index: int): + if trail3d.guildpoint != trail2d.guildpoint or trail2d.guildpoint != guildpoint_trail: + push_error("Desync between Guildpoint, Trail3D, and Trail2D") + var trail_data = guildpoint_trail.get_trail_data() trail_data.get_points_x()[point_index] = position.x trail_data.get_points_y()[point_index] = position.y trail_data.get_points_z()[point_index] = -position.z refresh_trail3d_points(trail3d) refresh_trail2d_points(trail2d) -func reverse_trail(waypoint_trail: Waypoint.Trail, trail3d: Spatial, trail2d: Line2D): - if trail3d.waypoint != trail2d.waypoint or trail2d.waypoint != waypoint_trail: - push_error("Desync between Waypoint, Trail3D, and Trail2D") - var trail_data = waypoint_trail.get_trail_data() +func reverse_trail(guildpoint_trail: Guildpoint.Trail, trail3d: Spatial, trail2d: Line2D): + if trail3d.guildpoint != trail2d.guildpoint or trail2d.guildpoint != guildpoint_trail: + push_error("Desync between Guildpoint, Trail3D, and Trail2D") + var trail_data = guildpoint_trail.get_trail_data() trail_data.get_points_x().invert() trail_data.get_points_y().invert() trail_data.get_points_z().invert() refresh_trail3d_points(trail3d) refresh_trail2d_points(trail2d) -func get_trail_point_count(waypoint_trail: Waypoint.Trail): - var trail_data = waypoint_trail.get_trail_data() +func get_trail_point_count(guildpoint_trail: Guildpoint.Trail): + var trail_data = guildpoint_trail.get_trail_data() return trail_data.get_points_x().size() -func get_trail_point_position(waypoint_trail: Waypoint.Trail, point_index: int): +func get_trail_point_position(guildpoint_trail: Guildpoint.Trail, point_index: int): var position: Vector3 - var trail_data = waypoint_trail.get_trail_data() + var trail_data = guildpoint_trail.get_trail_data() position[0] = trail_data.get_points_x()[point_index] position[1] = trail_data.get_points_y()[point_index] position[2] = -trail_data.get_points_z()[point_index] return position -func add_trail_point(position: Vector3, waypoint_trail: Waypoint.Trail, trail3d: Spatial, trail2d: Line2D, point_index: int = -1): - if trail3d.waypoint != trail2d.waypoint or trail2d.waypoint != waypoint_trail: - push_error("Desync between Waypoint, Trail3D, and Trail2D") - var trail_data = trail3d.waypoint.get_trail_data() +func add_trail_point(position: Vector3, guildpoint_trail: Guildpoint.Trail, trail3d: Spatial, trail2d: Line2D, point_index: int = -1): + if trail3d.guildpoint != trail2d.guildpoint or trail2d.guildpoint != guildpoint_trail: + push_error("Desync between Guildpoint, Trail3D, and Trail2D") + var trail_data = trail3d.guildpoint.get_trail_data() if point_index == -1: trail_data.get_points_x().append(position.x) trail_data.get_points_y().append(position.y) @@ -874,25 +874,25 @@ func add_trail_point(position: Vector3, waypoint_trail: Waypoint.Trail, trail3d: refresh_trail3d_points(trail3d) refresh_trail2d_points(trail2d) -func remove_trail_point(waypoint_trail: Waypoint.Trail, trail3d: Spatial, trail2d: Line2D, point_index: int): - if trail3d.waypoint != trail2d.waypoint or trail2d.waypoint != waypoint_trail: - push_error("Desync between Waypoint, Trail3D, and Trail2D") - var trail_data = trail3d.waypoint.get_trail_data() +func remove_trail_point(guildpoint_trail: Guildpoint.Trail, trail3d: Spatial, trail2d: Line2D, point_index: int): + if trail3d.guildpoint != trail2d.guildpoint or trail2d.guildpoint != guildpoint_trail: + push_error("Desync between Guildpoint, Trail3D, and Trail2D") + var trail_data = trail3d.guildpoint.get_trail_data() trail_data.get_points_x().remove(point_index) trail_data.get_points_y().remove(point_index) trail_data.get_points_z().remove(point_index) refresh_trail3d_points(trail3d) refresh_trail2d_points(trail2d) -func new_trail_point_after(waypoint_trail: Waypoint.Trail, trail3d: Spatial, trail2d: Line2D, point_index: int): - var start: Vector3 = get_trail_point_position(waypoint_trail, point_index) +func new_trail_point_after(guildpoint_trail: Guildpoint.Trail, trail3d: Spatial, trail2d: Line2D, point_index: int): + var start: Vector3 = get_trail_point_position(guildpoint_trail, point_index) var target_position: Vector3 - if get_trail_point_count(waypoint_trail) > point_index+1: - var end: Vector3 = get_trail_point_position(waypoint_trail, point_index+1) + if get_trail_point_count(guildpoint_trail) > point_index+1: + var end: Vector3 = get_trail_point_position(guildpoint_trail, point_index+1) target_position = ((start-end)/2) + end else: target_position = Vector3(self.player_position.x, self.player_position.y, -self.player_position.z) - add_trail_point(target_position, waypoint_trail, trail3d, trail2d, point_index+1) + add_trail_point(target_position, guildpoint_trail, trail3d, trail2d, point_index+1) func refresh_trail3d_points(trail3d: Spatial): trail3d.refresh_mesh() @@ -968,8 +968,8 @@ func _on_TexturePathOpen_file_selected(path: String): FileHandler.copy_file(path, self.unsaved_markers_dir.plus_file(next_texture_path)) var texture_index = get_texture_index(next_texture_path) if texture_index == -1: - self.waypoint_data.add_textures().set_filepath(next_texture_path) - texture_index = self.waypoint_data.get_textures().size() - 1 + self.guildpoint_data.add_textures().set_filepath(next_texture_path) + texture_index = self.guildpoint_data.get_textures().size() - 1 self.next_texture_id = texture_index @@ -980,20 +980,20 @@ func _on_TexturePathOpen_file_selected(path: String): func _on_NewTrail_pressed(): self.currently_active_trail3d = null self.currently_active_trail2d = null - self.currently_active_waypoint_trail = null + self.currently_active_guildpoint_trail = null ################################################################################ # Create a new icon and give it the texture ################################################################################ func _on_NewIcon_pressed(): - var waypoint_category: Waypoint.Category = self.currently_active_category.get_metadata(0).waypoint_category - var waypoint_icon = waypoint_category.add_icon() - var position = waypoint_icon.new_position() + var guildpoint_category: Guildpoint.Category = self.currently_active_category.get_metadata(0).guildpoint_category + var guildpoint_icon = guildpoint_category.add_icon() + var position = guildpoint_icon.new_position() position.set_x(self.player_position.x) position.set_y(self.player_position.y) position.set_z(-self.player_position.z) - waypoint_icon.set_texture_id(self.next_texture_id) - gen_new_icon(waypoint_icon, self.currently_active_category) + guildpoint_icon.set_texture_id(self.next_texture_id) + gen_new_icon(guildpoint_icon, self.currently_active_category) # A new trail point is created func _on_NewTrailPoint_pressed(): @@ -1001,18 +1001,18 @@ func _on_NewTrailPoint_pressed(): if self.currently_active_category == null: print("No category selected") return - var waypoint_category: Waypoint.Category = self.currently_active_category.get_metadata(0).waypoint_category - var waypoint_trail = waypoint_category.add_trail() - var trail_data = waypoint_trail.new_trail_data() + var guildpoint_category: Guildpoint.Category = self.currently_active_category.get_metadata(0).guildpoint_category + var guildpoint_trail = guildpoint_category.add_trail() + var trail_data = guildpoint_trail.new_trail_data() trail_data.add_points_x(self.player_position.x) trail_data.add_points_y(self.player_position.y) trail_data.add_points_z(-self.player_position.z) - waypoint_trail.set_texture_id(self.next_texture_id) - var new_trails: Array = gen_new_trail(waypoint_trail, self.currently_active_category) + guildpoint_trail.set_texture_id(self.next_texture_id) + var new_trails: Array = gen_new_trail(guildpoint_trail, self.currently_active_category) self.currently_active_trail3d = new_trails[0] self.currently_active_trail2d = new_trails[1] else: - add_trail_point(self.player_position, self.currently_active_waypoint_trail, self.currently_active_trail3d, self.currently_active_trail2d) + add_trail_point(self.player_position, self.currently_active_guildpoint_trail, self.currently_active_trail3d, self.currently_active_trail2d) func _on_NodeEditorDialog_hide(): on_gizmo_deselected() @@ -1021,18 +1021,18 @@ func _on_NodeEditorDialog_hide(): func _on_DeleteNode_pressed(): - if self.currently_selected_waypoint_icon != null: - remove_icon(self.currently_selected_waypoint_icon, self.currently_selected_icon) - if self.currently_selected_waypoint_trail != null : - remove_trail_point(self.currently_selected_waypoint_trail, self.currently_selected_trail3d, self.currently_active_trail2d, self.currently_selected_point_index) + if self.currently_selected_guildpoint_icon != null: + remove_icon(self.currently_selected_guildpoint_icon, self.currently_selected_icon) + if self.currently_selected_guildpoint_trail != null : + remove_trail_point(self.currently_selected_guildpoint_trail, self.currently_selected_trail3d, self.currently_active_trail2d, self.currently_selected_point_index) on_gizmo_deselected() clear_adjustment_nodes() gen_adjustment_nodes() func _on_NewTrailPointAfter_pressed(): - if self.currently_selected_waypoint_trail != null: - new_trail_point_after(self.currently_selected_waypoint_trail, self.currently_selected_trail3d, self.currently_selected_trail2d, self.currently_selected_point_index) + if self.currently_selected_guildpoint_trail != null: + new_trail_point_after(self.currently_selected_guildpoint_trail, self.currently_selected_trail3d, self.currently_selected_trail2d, self.currently_selected_point_index) on_gizmo_deselected() clear_adjustment_nodes() gen_adjustment_nodes() @@ -1062,21 +1062,21 @@ func _on_SnapSelectedToPlayer_pressed(): func _on_SetActiveTrail_pressed(): - self.currently_active_waypoint_trail = self.currently_selected_waypoint_trail + self.currently_active_guildpoint_trail = self.currently_selected_guildpoint_trail self.currently_active_trail3d = self.currently_selected_trail3d self.currently_active_trail2d = self.currently_selected_trail2d func _on_ReverseTrailDirection_pressed(): - if self.currently_selected_waypoint_trail != null: - reverse_trail(self.currently_selected_waypoint_trail, self.currently_selected_trail3d, self.currently_active_trail2d) + if self.currently_selected_guildpoint_trail != null: + reverse_trail(self.currently_selected_guildpoint_trail, self.currently_selected_trail3d, self.currently_active_trail2d) on_gizmo_deselected() clear_adjustment_nodes() gen_adjustment_nodes() func _on_ExitButton_pressed(): - if not read_hash(self.map_id) == make_hash(self.waypoint_data.to_bytes()): + if not read_hash(self.map_id) == make_hash(self.guildpoint_data.to_bytes()): save_map_data(self.map_id) exit_burrito() @@ -1092,7 +1092,7 @@ func _on_MarkersUI_cell_selected(): self.currently_active_category = category_item self.currently_active_trail2d = null self.currently_active_trail3d = null - self.currently_active_waypoint_trail = null + self.currently_active_guildpoint_trail = null on_gizmo_deselected() clear_adjustment_nodes() @@ -1110,19 +1110,19 @@ func _on_ImportPackDialog_dir_selected(dir): var user_data_dir = str(OS.get_user_data_dir()) var args: PoolStringArray = [ "--input-taco-path", dir, - "--input-waypoint-path", ProjectSettings.globalize_path(self.saved_markers_dir), - "--output-waypoint-path", ProjectSettings.globalize_path(self.saved_markers_dir), - "--output-split-waypoint-path", ProjectSettings.globalize_path(self.unsaved_markers_dir) + "--input-guildpoint-path", ProjectSettings.globalize_path(self.saved_markers_dir), + "--output-guildpoint-path", ProjectSettings.globalize_path(self.saved_markers_dir), + "--output-split-guildpoint-path", ProjectSettings.globalize_path(self.unsaved_markers_dir) ] FileHandler.call_xml_converter(args) save_hashes() - load_waypoint_markers(self.map_id) + load_guildpoint_markers(self.map_id) func _on_SaveData_pressed(): var user_data_dir = str(OS.get_user_data_dir()) var args: PoolStringArray = [ - "--input-waypoint-path", ProjectSettings.globalize_path(self.unsaved_markers_dir), - "--output-waypoint-path", ProjectSettings.globalize_path(self.saved_markers_dir), + "--input-guildpoint-path", ProjectSettings.globalize_path(self.unsaved_markers_dir), + "--output-guildpoint-path", ProjectSettings.globalize_path(self.saved_markers_dir), ] FileHandler.call_xml_converter(args) diff --git a/Trail2D.gd b/Trail2D.gd index 00fdd8a5..68bbe284 100644 --- a/Trail2D.gd +++ b/Trail2D.gd @@ -1,11 +1,11 @@ extends Line2D -const Waypoint = preload("res://waypoint.gd") -var waypoint: Waypoint.Trail +const Guildpoint = preload("res://guildpoint.gd") +var guildpoint: Guildpoint.Trail func refresh_points(): var trail_points := PoolVector2Array() - var trail_data = self.waypoint.get_trail_data() + var trail_data = self.guildpoint.get_trail_data() for index in range(0, trail_data.get_points_z().size()): trail_points.append(Vector2(trail_data.get_points_x()[index], -trail_data.get_points_z()[index])) self.points = trail_points diff --git a/Trail3D.gd b/Trail3D.gd index 258ffa74..fa41e410 100644 --- a/Trail3D.gd +++ b/Trail3D.gd @@ -1,17 +1,17 @@ extends Spatial -const Waypoint = preload("res://waypoint.gd") +const Guildpoint = preload("res://guildpoint.gd") var texture_path var color = Color(0.9, 0.1, 0.1) -var waypoint: Waypoint.Trail +var guildpoint: Guildpoint.Trail var category: TreeItem func refresh_mesh(): var tmpMesh = Mesh.new() var i = 0 var last_uv: float = 0.0 - var trail_data = self.waypoint.get_trail_data() + var trail_data = self.guildpoint.get_trail_data() for point_index in range(trail_data.get_points_x().size()-1): var point:Vector3 = Vector3(trail_data.get_points_x()[point_index], trail_data.get_points_y()[point_index], -trail_data.get_points_z()[point_index]) var next_point:Vector3 = Vector3(trail_data.get_points_x()[point_index+1], trail_data.get_points_y()[point_index+1], -trail_data.get_points_z()[point_index+1]) diff --git a/waypoint.gd b/guildpoint.gd similarity index 96% rename from waypoint.gd rename to guildpoint.gd index 00c6e815..83b08f8d 100644 --- a/waypoint.gd +++ b/guildpoint.gd @@ -660,7 +660,7 @@ class PBPacker: ############### USER DATA BEGIN ################ -class Waypoint: +class Guildpoint: func _init(): var service @@ -794,10 +794,10 @@ class Category: service.field = _is_separator data[_is_separator.tag] = service - _default_visibility = PBField.new("default_visibility", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 6, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + _is_hidden = PBField.new("is_hidden", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 6, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) service = PBServiceField.new() - service.field = _default_visibility - data[_default_visibility.tag] = service + service.field = _is_hidden + data[_is_hidden.tag] = service _tip_description = PBField.new("tip_description", PB_DATA_TYPE.STRING, PB_RULE.OPTIONAL, 7, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) service = PBServiceField.new() @@ -862,14 +862,14 @@ class Category: func set_is_separator(value : bool) -> void: _is_separator.value = value - var _default_visibility: PBField - func get_default_visibility() -> bool: - return _default_visibility.value - func clear_default_visibility() -> void: + var _is_hidden: PBField + func get_is_hidden() -> bool: + return _is_hidden.value + func clear_is_hidden() -> void: data[6].state = PB_SERVICE_STATE.UNFILLED - _default_visibility.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] - func set_default_visibility(value : bool) -> void: - _default_visibility.value = value + _is_hidden.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_is_hidden(value : bool) -> void: + _is_hidden.value = value var _tip_description: PBField func get_tip_description() -> String: @@ -992,10 +992,10 @@ class Icon: service.field = _maximum_size_on_screen data[_maximum_size_on_screen.tag] = service - _scale_on_map_with_zoom = PBField.new("scale_on_map_with_zoom", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 23, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + _constant_size_on_map = PBField.new("constant_size_on_map", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 23, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) service = PBServiceField.new() - service.field = _scale_on_map_with_zoom - data[_scale_on_map_with_zoom.tag] = service + service.field = _constant_size_on_map + data[_constant_size_on_map.tag] = service _tip_description = PBField.new("tip_description", PB_DATA_TYPE.STRING, PB_RULE.OPTIONAL, 24, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) service = PBServiceField.new() @@ -1053,25 +1053,25 @@ class Icon: service.field = _cull_chirality data[_cull_chirality.tag] = service - _tentative__scale = PBField.new("tentative__scale", PB_DATA_TYPE.FLOAT, PB_RULE.OPTIONAL, 2048, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT]) + _is_hidden_ingame = PBField.new("is_hidden_ingame", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 34, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) service = PBServiceField.new() - service.field = _tentative__scale - data[_tentative__scale.tag] = service + service.field = _is_hidden_ingame + data[_is_hidden_ingame.tag] = service - _tentative__render_ingame = PBField.new("tentative__render_ingame", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 2049, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + _is_hidden_on_map = PBField.new("is_hidden_on_map", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 35, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) service = PBServiceField.new() - service.field = _tentative__render_ingame - data[_tentative__render_ingame.tag] = service + service.field = _is_hidden_on_map + data[_is_hidden_on_map.tag] = service - _tentative__render_on_map = PBField.new("tentative__render_on_map", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 2050, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + _is_hidden_on_minimap = PBField.new("is_hidden_on_minimap", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 36, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) service = PBServiceField.new() - service.field = _tentative__render_on_map - data[_tentative__render_on_map.tag] = service + service.field = _is_hidden_on_minimap + data[_is_hidden_on_minimap.tag] = service - _tentative__render_on_minimap = PBField.new("tentative__render_on_minimap", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 2051, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + _tentative__scale = PBField.new("tentative__scale", PB_DATA_TYPE.FLOAT, PB_RULE.OPTIONAL, 2048, true, DEFAULT_VALUES_3[PB_DATA_TYPE.FLOAT]) service = PBServiceField.new() - service.field = _tentative__render_on_minimap - data[_tentative__render_on_minimap.tag] = service + service.field = _tentative__scale + data[_tentative__scale.tag] = service _bhdraft__schedule = PBField.new("bhdraft__schedule", PB_DATA_TYPE.STRING, PB_RULE.OPTIONAL, 2052, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) service = PBServiceField.new() @@ -1223,14 +1223,14 @@ class Icon: func set_maximum_size_on_screen(value : int) -> void: _maximum_size_on_screen.value = value - var _scale_on_map_with_zoom: PBField - func get_scale_on_map_with_zoom() -> bool: - return _scale_on_map_with_zoom.value - func clear_scale_on_map_with_zoom() -> void: + var _constant_size_on_map: PBField + func get_constant_size_on_map() -> bool: + return _constant_size_on_map.value + func clear_constant_size_on_map() -> void: data[23].state = PB_SERVICE_STATE.UNFILLED - _scale_on_map_with_zoom.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] - func set_scale_on_map_with_zoom(value : bool) -> void: - _scale_on_map_with_zoom.value = value + _constant_size_on_map.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_constant_size_on_map(value : bool) -> void: + _constant_size_on_map.value = value var _tip_description: PBField func get_tip_description() -> String: @@ -1328,6 +1328,33 @@ class Icon: func set_cull_chirality(value) -> void: _cull_chirality.value = value + var _is_hidden_ingame: PBField + func get_is_hidden_ingame() -> bool: + return _is_hidden_ingame.value + func clear_is_hidden_ingame() -> void: + data[34].state = PB_SERVICE_STATE.UNFILLED + _is_hidden_ingame.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_is_hidden_ingame(value : bool) -> void: + _is_hidden_ingame.value = value + + var _is_hidden_on_map: PBField + func get_is_hidden_on_map() -> bool: + return _is_hidden_on_map.value + func clear_is_hidden_on_map() -> void: + data[35].state = PB_SERVICE_STATE.UNFILLED + _is_hidden_on_map.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_is_hidden_on_map(value : bool) -> void: + _is_hidden_on_map.value = value + + var _is_hidden_on_minimap: PBField + func get_is_hidden_on_minimap() -> bool: + return _is_hidden_on_minimap.value + func clear_is_hidden_on_minimap() -> void: + data[36].state = PB_SERVICE_STATE.UNFILLED + _is_hidden_on_minimap.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_is_hidden_on_minimap(value : bool) -> void: + _is_hidden_on_minimap.value = value + var _tentative__scale: PBField func get_tentative__scale() -> float: return _tentative__scale.value @@ -1337,33 +1364,6 @@ class Icon: func set_tentative__scale(value : float) -> void: _tentative__scale.value = value - var _tentative__render_ingame: PBField - func get_tentative__render_ingame() -> bool: - return _tentative__render_ingame.value - func clear_tentative__render_ingame() -> void: - data[2049].state = PB_SERVICE_STATE.UNFILLED - _tentative__render_ingame.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] - func set_tentative__render_ingame(value : bool) -> void: - _tentative__render_ingame.value = value - - var _tentative__render_on_map: PBField - func get_tentative__render_on_map() -> bool: - return _tentative__render_on_map.value - func clear_tentative__render_on_map() -> void: - data[2050].state = PB_SERVICE_STATE.UNFILLED - _tentative__render_on_map.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] - func set_tentative__render_on_map(value : bool) -> void: - _tentative__render_on_map.value = value - - var _tentative__render_on_minimap: PBField - func get_tentative__render_on_minimap() -> bool: - return _tentative__render_on_minimap.value - func clear_tentative__render_on_minimap() -> void: - data[2051].state = PB_SERVICE_STATE.UNFILLED - _tentative__render_on_minimap.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] - func set_tentative__render_on_minimap(value : bool) -> void: - _tentative__render_on_minimap.value = value - var _bhdraft__schedule: PBField func get_bhdraft__schedule() -> String: return _bhdraft__schedule.value @@ -1519,20 +1519,20 @@ class Trail: service.field = _cull_chirality data[_cull_chirality.tag] = service - _tentative__render_ingame = PBField.new("tentative__render_ingame", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 2049, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + _is_hidden_ingame = PBField.new("is_hidden_ingame", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 31, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) service = PBServiceField.new() - service.field = _tentative__render_ingame - data[_tentative__render_ingame.tag] = service + service.field = _is_hidden_ingame + data[_is_hidden_ingame.tag] = service - _tentative__render_on_map = PBField.new("tentative__render_on_map", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 2050, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + _is_hidden_on_map = PBField.new("is_hidden_on_map", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 32, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) service = PBServiceField.new() - service.field = _tentative__render_on_map - data[_tentative__render_on_map.tag] = service + service.field = _is_hidden_on_map + data[_is_hidden_on_map.tag] = service - _tentative__render_on_minimap = PBField.new("tentative__render_on_minimap", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 2051, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) + _is_hidden_on_minimap = PBField.new("is_hidden_on_minimap", PB_DATA_TYPE.BOOL, PB_RULE.OPTIONAL, 33, true, DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL]) service = PBServiceField.new() - service.field = _tentative__render_on_minimap - data[_tentative__render_on_minimap.tag] = service + service.field = _is_hidden_on_minimap + data[_is_hidden_on_minimap.tag] = service _bhdraft__schedule = PBField.new("bhdraft__schedule", PB_DATA_TYPE.STRING, PB_RULE.OPTIONAL, 2052, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) service = PBServiceField.new() @@ -1742,32 +1742,32 @@ class Trail: func set_cull_chirality(value) -> void: _cull_chirality.value = value - var _tentative__render_ingame: PBField - func get_tentative__render_ingame() -> bool: - return _tentative__render_ingame.value - func clear_tentative__render_ingame() -> void: - data[2049].state = PB_SERVICE_STATE.UNFILLED - _tentative__render_ingame.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] - func set_tentative__render_ingame(value : bool) -> void: - _tentative__render_ingame.value = value - - var _tentative__render_on_map: PBField - func get_tentative__render_on_map() -> bool: - return _tentative__render_on_map.value - func clear_tentative__render_on_map() -> void: - data[2050].state = PB_SERVICE_STATE.UNFILLED - _tentative__render_on_map.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] - func set_tentative__render_on_map(value : bool) -> void: - _tentative__render_on_map.value = value - - var _tentative__render_on_minimap: PBField - func get_tentative__render_on_minimap() -> bool: - return _tentative__render_on_minimap.value - func clear_tentative__render_on_minimap() -> void: - data[2051].state = PB_SERVICE_STATE.UNFILLED - _tentative__render_on_minimap.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] - func set_tentative__render_on_minimap(value : bool) -> void: - _tentative__render_on_minimap.value = value + var _is_hidden_ingame: PBField + func get_is_hidden_ingame() -> bool: + return _is_hidden_ingame.value + func clear_is_hidden_ingame() -> void: + data[31].state = PB_SERVICE_STATE.UNFILLED + _is_hidden_ingame.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_is_hidden_ingame(value : bool) -> void: + _is_hidden_ingame.value = value + + var _is_hidden_on_map: PBField + func get_is_hidden_on_map() -> bool: + return _is_hidden_on_map.value + func clear_is_hidden_on_map() -> void: + data[32].state = PB_SERVICE_STATE.UNFILLED + _is_hidden_on_map.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_is_hidden_on_map(value : bool) -> void: + _is_hidden_on_map.value = value + + var _is_hidden_on_minimap: PBField + func get_is_hidden_on_minimap() -> bool: + return _is_hidden_on_minimap.value + func clear_is_hidden_on_minimap() -> void: + data[33].state = PB_SERVICE_STATE.UNFILLED + _is_hidden_on_minimap.value = DEFAULT_VALUES_3[PB_DATA_TYPE.BOOL] + func set_is_hidden_on_minimap(value : bool) -> void: + _is_hidden_on_minimap.value = value var _bhdraft__schedule: PBField func get_bhdraft__schedule() -> String: diff --git a/xml_converter/CMakeLists.txt b/xml_converter/CMakeLists.txt index 5824ed49..fe1a3ebc 100644 --- a/xml_converter/CMakeLists.txt +++ b/xml_converter/CMakeLists.txt @@ -15,7 +15,7 @@ set(CORE_LIB core_lib) FIND_PACKAGE(Protobuf REQUIRED) INCLUDE_DIRECTORIES(${PROTOBUF_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) -PROTOBUF_GENERATE_CPP(PROTO_SRC PROTO_HEADER proto/waypoint.proto) +PROTOBUF_GENERATE_CPP(PROTO_SRC PROTO_HEADER proto/guildpoint.proto) # Add Dependencies file(GLOB_RECURSE SOURCES "src/*.cpp") diff --git a/xml_converter/doc/disable_player_cutout/disable_player_cutout.md b/xml_converter/doc/disable_player_cutout/disable_player_cutout.md index f2b54cf6..35fb7490 100644 --- a/xml_converter/doc/disable_player_cutout/disable_player_cutout.md +++ b/xml_converter/doc/disable_player_cutout/disable_player_cutout.md @@ -14,7 +14,7 @@ custom_functions: --- A flag to determine if an object can be made transparent when it is possibly occluding the player. -This value is inverted between the waypoint format value of "Disable Player Cutout" and the TacO xml format of "Can Fade" +This value is inverted between the guildpoint format value of "Disable Player Cutout" and the TacO xml format of "Can Fade" Notes diff --git a/xml_converter/generators/cpp_templates/attribute_template.hpp b/xml_converter/generators/cpp_templates/attribute_template.hpp index 9dfb866c..39f5e78c 100644 --- a/xml_converter/generators/cpp_templates/attribute_template.hpp +++ b/xml_converter/generators/cpp_templates/attribute_template.hpp @@ -10,7 +10,7 @@ #include "../state_structs/xml_reader_state.hpp" #include "../state_structs/xml_writer_state.hpp" {% if type == "Enum" %} - #include "waypoint.pb.h" + #include "guildpoint.pb.h" class XMLError; diff --git a/xml_converter/generators/cpp_templates/attribute_template_compoundvalue.cpp b/xml_converter/generators/cpp_templates/attribute_template_compoundvalue.cpp index b7d868ca..9d928085 100644 --- a/xml_converter/generators/cpp_templates/attribute_template_compoundvalue.cpp +++ b/xml_converter/generators/cpp_templates/attribute_template_compoundvalue.cpp @@ -7,7 +7,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" using namespace std; diff --git a/xml_converter/generators/cpp_templates/attribute_template_enum.cpp b/xml_converter/generators/cpp_templates/attribute_template_enum.cpp index bbf8195e..240b8559 100644 --- a/xml_converter/generators/cpp_templates/attribute_template_enum.cpp +++ b/xml_converter/generators/cpp_templates/attribute_template_enum.cpp @@ -8,7 +8,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" using namespace std; diff --git a/xml_converter/generators/cpp_templates/attribute_template_multiflagvalue.cpp b/xml_converter/generators/cpp_templates/attribute_template_multiflagvalue.cpp index b45c65c2..7663dcb7 100644 --- a/xml_converter/generators/cpp_templates/attribute_template_multiflagvalue.cpp +++ b/xml_converter/generators/cpp_templates/attribute_template_multiflagvalue.cpp @@ -8,7 +8,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" using namespace std; diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index cba55e91..b19c20b9 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -100,8 +100,8 @@ vector {{cpp_class}}::as_xml(XMLWriterState* state) const { return xml_node_contents; } -waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf(ProtoWriterState* state) const { - waypoint::{{cpp_class}} proto_{{cpp_class_header}}; +guildpoint::{{cpp_class}} {{cpp_class}}::as_protobuf(ProtoWriterState* state) const { + guildpoint::{{cpp_class}} proto_{{cpp_class_header}}; {% for attribute_variable in attribute_variables %} {% if attribute_variable.is_component == false and attribute_variable.proto_info != None %} if (this->{{attribute_variable.attribute_flag_name}}) { @@ -117,7 +117,7 @@ waypoint::{{cpp_class}} {{cpp_class}}::as_protobuf(ProtoWriterState* state) cons return proto_{{cpp_class_header}}; } -void {{cpp_class}}::parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_header}}, ProtoReaderState* state) { +void {{cpp_class}}::parse_protobuf(guildpoint::{{cpp_class}} proto_{{cpp_class_header}}, ProtoReaderState* state) { {% for attribute_variable in attribute_variables %} {% if attribute_variable.is_component == false and attribute_variable.proto_info != None %} {% if not attribute_variable.proto_info.is_proto_field_scalar %} diff --git a/xml_converter/generators/cpp_templates/class_template.hpp b/xml_converter/generators/cpp_templates/class_template.hpp index 6ff5f12f..9c4616d1 100644 --- a/xml_converter/generators/cpp_templates/class_template.hpp +++ b/xml_converter/generators/cpp_templates/class_template.hpp @@ -35,8 +35,8 @@ class {{cpp_class}} : public Parseable { virtual std::vector as_xml(XMLWriterState* state) const; virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, XMLReaderState* state); - waypoint::{{cpp_class}} as_protobuf(ProtoWriterState* state) const; - void parse_protobuf(waypoint::{{cpp_class}} proto_{{cpp_class_header}}, ProtoReaderState* state); + guildpoint::{{cpp_class}} as_protobuf(ProtoWriterState* state) const; + void parse_protobuf(guildpoint::{{cpp_class}} proto_{{cpp_class_header}}, ProtoReaderState* state); {% if attributes_of_type_marker_category %} bool validate_attributes_of_type_marker_category(); {% endif %} diff --git a/xml_converter/generators/generate_cpp.py b/xml_converter/generators/generate_cpp.py index 0f74007a..b23ddc53 100644 --- a/xml_converter/generators/generate_cpp.py +++ b/xml_converter/generators/generate_cpp.py @@ -260,7 +260,7 @@ def generate_cpp_variable_data( cpp_includes.hpp_relative_includes.update([ "rapidxml-1.13/rapidxml.hpp", "parseable.hpp", - "waypoint.pb.h", + "guildpoint.pb.h", "state_structs/xml_reader_state.hpp", ]) cpp_includes.hpp_forward_declarations.update([ @@ -275,7 +275,7 @@ def generate_cpp_variable_data( "rapidxml-1.13/rapidxml.hpp", "string_helper.hpp", "rapid_helpers.hpp", - "waypoint.pb.h", + "guildpoint.pb.h", ]) if (doc_type == "Category"): diff --git a/xml_converter/generators/protobuf_types.py b/xml_converter/generators/protobuf_types.py index a855dffa..1d60c040 100644 --- a/xml_converter/generators/protobuf_types.py +++ b/xml_converter/generators/protobuf_types.py @@ -134,7 +134,7 @@ def proto_to_dict(proto_str): # type: ignore ################################################################################ # Gets all of the field types of the proto. ################################################################################ -with open("../proto/waypoint.proto") as f: +with open("../proto/guildpoint.proto") as f: proto_field_types = proto_to_dict(f.read()) # type: ignore @@ -176,7 +176,7 @@ def get_proto_field_cpp_type(message: str, field: str) -> str: return PROTO_TO_CPP_TYPES[value] # Otherwise assume this is a message or enum and return the qualified path to that instead. - return "waypoint::" + value + return "guildpoint::" + value def get_proto_field_cpp_prototype(message: str, field: str) -> Optional[str]: @@ -186,7 +186,7 @@ def get_proto_field_cpp_prototype(message: str, field: str) -> Optional[str]: return None return "namespace {package} {{\nclass {proto_field_type};\n}}".format( - package="waypoint", + package="guildpoint", proto_field_type=value, ) diff --git a/xml_converter/integration_tests/run_tests.py b/xml_converter/integration_tests/run_tests.py index 64589d29..4d99b9df 100755 --- a/xml_converter/integration_tests/run_tests.py +++ b/xml_converter/integration_tests/run_tests.py @@ -30,11 +30,11 @@ def run_xml_converter( if output_xml: cmd += ["--output-taco-path"] + output_xml if input_proto: - cmd += ["--input-waypoint-path"] + input_proto + cmd += ["--input-guildpoint-path"] + input_proto if output_proto: - cmd += ["--output-waypoint-path"] + output_proto + cmd += ["--output-guildpoint-path"] + output_proto if split_output_proto: - cmd += ["--output-split-waypoint-path"] + [split_output_proto] + cmd += ["--output-split-guildpoint-path"] + [split_output_proto] # Run the C++ program and capture its output result = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) @@ -118,7 +118,7 @@ def rebuild_xml_converter_binary() -> None: ################################################################################ line_patterns_to_ignore = [ r"^Loading taco pack .*$", - r"^Loading waypoint pack .*$", + r"^Loading guildpoint pack .*$", r"^The taco parse function took [0-9]+ milliseconds to run$", r"^The xml write function took [0-9]+ milliseconds to run$", r"^The protobuf read function took [0-9]+ milliseconds to run$", diff --git a/xml_converter/integration_tests/src/proto_utils.py b/xml_converter/integration_tests/src/proto_utils.py index 115689b1..6297fcf6 100644 --- a/xml_converter/integration_tests/src/proto_utils.py +++ b/xml_converter/integration_tests/src/proto_utils.py @@ -13,8 +13,8 @@ def compare_protos( if files_are_equal: return [] - expected_textproto = get_waypoint_textproto(expected_proto_path) - actual_textproto = get_waypoint_textproto(actual_proto_path) + expected_textproto = get_guildpoint_textproto(expected_proto_path) + actual_textproto = get_guildpoint_textproto(actual_proto_path) diff = list(difflib.unified_diff(actual_textproto.split("\n"), expected_textproto.split("\n"), fromfile=actual_proto_path, tofile=expected_proto_path, lineterm="")) @@ -39,14 +39,14 @@ def compare_binary_file(file_path_1: str, file_path_2: str) -> bool: ################################################################################ -# get_waypoint_textproto +# get_guildpoint_textproto # -# Reads a waypoint protobin and returns a stringy textproto value of the +# Reads a guildpoint protobin and returns a stringy textproto value of the # contents of the protobin. This makes it easier to diff the contents but also # can be used to easily inspect the values of the protobin. ################################################################################ -def get_waypoint_textproto(protobin_path: str) -> str: - proto_schema_path = "../proto/waypoint.proto" +def get_guildpoint_textproto(protobin_path: str) -> str: + proto_schema_path = "../proto/guildpoint.proto" proto_schema_basedir = "../proto" if not os.path.exists(protobin_path): @@ -56,7 +56,7 @@ def get_waypoint_textproto(protobin_path: str) -> str: result = subprocess.run( [ "protoc", - "--decode=waypoint.Waypoint", + "--decode=guildpoint.Guildpoint", "--proto_path=" + proto_schema_basedir, proto_schema_path ], diff --git a/xml_converter/proto/waypoint.proto b/xml_converter/proto/guildpoint.proto similarity index 99% rename from xml_converter/proto/waypoint.proto rename to xml_converter/proto/guildpoint.proto index fec043c6..427c8547 100644 --- a/xml_converter/proto/waypoint.proto +++ b/xml_converter/proto/guildpoint.proto @@ -1,8 +1,8 @@ syntax = "proto3"; -package waypoint; +package guildpoint; -message Waypoint { +message Guildpoint { repeated Category category = 1; repeated TextureData textures = 2; } diff --git a/xml_converter/src/attribute/color.cpp b/xml_converter/src/attribute/color.cpp index b4e6d358..637fba90 100644 --- a/xml_converter/src/attribute/color.cpp +++ b/xml_converter/src/attribute/color.cpp @@ -11,7 +11,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" using namespace std; diff --git a/xml_converter/src/attribute/color.hpp b/xml_converter/src/attribute/color.hpp index 837ffbdd..752f45dc 100644 --- a/xml_converter/src/attribute/color.hpp +++ b/xml_converter/src/attribute/color.hpp @@ -12,7 +12,7 @@ class XMLError; -namespace waypoint { +namespace guildpoint { class RGBAColor; } diff --git a/xml_converter/src/attribute/cull_chirality_gen.cpp b/xml_converter/src/attribute/cull_chirality_gen.cpp index 9d2c9243..6e5b076b 100644 --- a/xml_converter/src/attribute/cull_chirality_gen.cpp +++ b/xml_converter/src/attribute/cull_chirality_gen.cpp @@ -8,7 +8,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" using namespace std; @@ -56,20 +56,20 @@ string cull_chirality_to_xml_attribute( } void proto_to_cull_chirality( - waypoint::CullChirality input, + guildpoint::CullChirality input, ProtoReaderState*, CullChirality* value, bool* is_set) { switch (input) { - case waypoint::CullChirality::none: + case guildpoint::CullChirality::none: *value = CullChirality::none; *is_set = true; break; - case waypoint::CullChirality::clockwise: + case guildpoint::CullChirality::clockwise: *value = CullChirality::clockwise; *is_set = true; break; - case waypoint::CullChirality::counter_clockwise: + case guildpoint::CullChirality::counter_clockwise: *value = CullChirality::counter_clockwise; *is_set = true; break; @@ -83,19 +83,19 @@ void proto_to_cull_chirality( void cull_chirality_to_proto( CullChirality value, ProtoWriterState*, - std::function setter) { + std::function setter) { switch (value) { case CullChirality::none: - setter(waypoint::CullChirality::none); + setter(guildpoint::CullChirality::none); break; case CullChirality::clockwise: - setter(waypoint::CullChirality::clockwise); + setter(guildpoint::CullChirality::clockwise); break; case CullChirality::counter_clockwise: - setter(waypoint::CullChirality::counter_clockwise); + setter(guildpoint::CullChirality::counter_clockwise); break; default: - setter(waypoint::CullChirality::none); + setter(guildpoint::CullChirality::none); break; } } diff --git a/xml_converter/src/attribute/cull_chirality_gen.hpp b/xml_converter/src/attribute/cull_chirality_gen.hpp index 039bdefd..c50f95dc 100644 --- a/xml_converter/src/attribute/cull_chirality_gen.hpp +++ b/xml_converter/src/attribute/cull_chirality_gen.hpp @@ -9,7 +9,7 @@ #include "../state_structs/proto_writer_state.hpp" #include "../state_structs/xml_reader_state.hpp" #include "../state_structs/xml_writer_state.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" class XMLError; @@ -31,7 +31,7 @@ std::string cull_chirality_to_xml_attribute( const CullChirality* value); void proto_to_cull_chirality( - waypoint::CullChirality input, + guildpoint::CullChirality input, ProtoReaderState* state, CullChirality* value, bool* is_set); @@ -39,4 +39,4 @@ void proto_to_cull_chirality( void cull_chirality_to_proto( CullChirality value, ProtoWriterState* state, - std::function setter); + std::function setter); diff --git a/xml_converter/src/attribute/euler_rotation_gen.cpp b/xml_converter/src/attribute/euler_rotation_gen.cpp index 8e4a311e..17dc2789 100644 --- a/xml_converter/src/attribute/euler_rotation_gen.cpp +++ b/xml_converter/src/attribute/euler_rotation_gen.cpp @@ -7,7 +7,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" using namespace std; @@ -45,7 +45,7 @@ string euler_rotation_to_xml_attribute( } void proto_to_euler_rotation( - waypoint::EulerRotation input, + guildpoint::EulerRotation input, ProtoReaderState*, EulerRotation* value, bool* is_set) { @@ -60,8 +60,8 @@ void proto_to_euler_rotation( void euler_rotation_to_proto( EulerRotation value, ProtoWriterState*, - std::function setter) { - waypoint::EulerRotation* proto_euler_rotation = new waypoint::EulerRotation(); + std::function setter) { + guildpoint::EulerRotation* proto_euler_rotation = new guildpoint::EulerRotation(); proto_euler_rotation->set_x(value.x_rotation); proto_euler_rotation->set_y(value.y_rotation); proto_euler_rotation->set_z(value.z_rotation); diff --git a/xml_converter/src/attribute/euler_rotation_gen.hpp b/xml_converter/src/attribute/euler_rotation_gen.hpp index 91f5498c..c11951a8 100644 --- a/xml_converter/src/attribute/euler_rotation_gen.hpp +++ b/xml_converter/src/attribute/euler_rotation_gen.hpp @@ -11,7 +11,7 @@ #include "../state_structs/xml_writer_state.hpp" class XMLError; -namespace waypoint { +namespace guildpoint { class EulerRotation; } @@ -38,7 +38,7 @@ std::string euler_rotation_to_xml_attribute( const EulerRotation* value); void proto_to_euler_rotation( - waypoint::EulerRotation input, + guildpoint::EulerRotation input, ProtoReaderState* state, EulerRotation* value, bool* is_set); @@ -46,4 +46,4 @@ void proto_to_euler_rotation( void euler_rotation_to_proto( EulerRotation value, ProtoWriterState* state, - std::function setter); + std::function setter); diff --git a/xml_converter/src/attribute/festival_filter_gen.cpp b/xml_converter/src/attribute/festival_filter_gen.cpp index 86e44ec3..b21e67f1 100644 --- a/xml_converter/src/attribute/festival_filter_gen.cpp +++ b/xml_converter/src/attribute/festival_filter_gen.cpp @@ -8,7 +8,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" using namespace std; @@ -95,7 +95,7 @@ string festival_filter_to_xml_attribute( } void proto_to_festival_filter( - waypoint::FestivalFilter input, + guildpoint::FestivalFilter input, ProtoReaderState*, FestivalFilter* value, bool* is_set) { @@ -114,8 +114,8 @@ void proto_to_festival_filter( void festival_filter_to_proto( FestivalFilter value, ProtoWriterState*, - std::function setter) { - waypoint::FestivalFilter* proto_festival_filter = new waypoint::FestivalFilter(); + std::function setter) { + guildpoint::FestivalFilter* proto_festival_filter = new guildpoint::FestivalFilter(); bool should_write = false; proto_festival_filter->set_dragonbash(value.dragonbash); should_write |= value.dragonbash; diff --git a/xml_converter/src/attribute/festival_filter_gen.hpp b/xml_converter/src/attribute/festival_filter_gen.hpp index 42ddc123..da0f4278 100644 --- a/xml_converter/src/attribute/festival_filter_gen.hpp +++ b/xml_converter/src/attribute/festival_filter_gen.hpp @@ -11,7 +11,7 @@ #include "../state_structs/xml_writer_state.hpp" class XMLError; -namespace waypoint { +namespace guildpoint { class FestivalFilter; } @@ -42,7 +42,7 @@ std::string festival_filter_to_xml_attribute( const FestivalFilter* value); void proto_to_festival_filter( - waypoint::FestivalFilter input, + guildpoint::FestivalFilter input, ProtoReaderState* state, FestivalFilter* value, bool* is_set); @@ -50,4 +50,4 @@ void proto_to_festival_filter( void festival_filter_to_proto( FestivalFilter value, ProtoWriterState* state, - std::function setter); + std::function setter); diff --git a/xml_converter/src/attribute/map_type_filter_gen.cpp b/xml_converter/src/attribute/map_type_filter_gen.cpp index 15621c57..7a1f1c04 100644 --- a/xml_converter/src/attribute/map_type_filter_gen.cpp +++ b/xml_converter/src/attribute/map_type_filter_gen.cpp @@ -8,7 +8,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" using namespace std; @@ -211,7 +211,7 @@ string map_type_filter_to_xml_attribute( } void proto_to_map_type_filter( - waypoint::MapTypeFilter input, + guildpoint::MapTypeFilter input, ProtoReaderState*, MapTypeFilter* value, bool* is_set) { @@ -247,8 +247,8 @@ void proto_to_map_type_filter( void map_type_filter_to_proto( MapTypeFilter value, ProtoWriterState*, - std::function setter) { - waypoint::MapTypeFilter* proto_map_type_filter = new waypoint::MapTypeFilter(); + std::function setter) { + guildpoint::MapTypeFilter* proto_map_type_filter = new guildpoint::MapTypeFilter(); bool should_write = false; proto_map_type_filter->set_unknown_map(value.unknown_map); should_write |= value.unknown_map; diff --git a/xml_converter/src/attribute/map_type_filter_gen.hpp b/xml_converter/src/attribute/map_type_filter_gen.hpp index 05b5d749..c60952c4 100644 --- a/xml_converter/src/attribute/map_type_filter_gen.hpp +++ b/xml_converter/src/attribute/map_type_filter_gen.hpp @@ -11,7 +11,7 @@ #include "../state_structs/xml_writer_state.hpp" class XMLError; -namespace waypoint { +namespace guildpoint { class MapTypeFilter; } @@ -59,7 +59,7 @@ std::string map_type_filter_to_xml_attribute( const MapTypeFilter* value); void proto_to_map_type_filter( - waypoint::MapTypeFilter input, + guildpoint::MapTypeFilter input, ProtoReaderState* state, MapTypeFilter* value, bool* is_set); @@ -67,4 +67,4 @@ void proto_to_map_type_filter( void map_type_filter_to_proto( MapTypeFilter value, ProtoWriterState* state, - std::function setter); + std::function setter); diff --git a/xml_converter/src/attribute/marker_category.cpp b/xml_converter/src/attribute/marker_category.cpp index 36da71e0..5762e292 100644 --- a/xml_converter/src/attribute/marker_category.cpp +++ b/xml_converter/src/attribute/marker_category.cpp @@ -5,7 +5,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" //////////////////////////////////////////////////////////////////////////////// // parse_marker_category @@ -40,7 +40,7 @@ std::string marker_category_to_xml_attribute( // Parses a marker category from a proto field. //////////////////////////////////////////////////////////////////////////////// void proto_to_marker_category( - waypoint::Category input, + guildpoint::Category input, ProtoReaderState*, MarkerCategory* value, bool* is_set) { @@ -53,13 +53,13 @@ void proto_to_marker_category( //////////////////////////////////////////////////////////////////////////////// // to_proto_marker_category // -// Returns a waypoint::Category so that it can be saved to proto. +// Returns a guildpoint::Category so that it can be saved to proto. //////////////////////////////////////////////////////////////////////////////// void marker_category_to_proto( MarkerCategory value, ProtoWriterState*, - std::function setter) { - waypoint::Category* category = new waypoint::Category(); + std::function setter) { + guildpoint::Category* category = new guildpoint::Category(); category->set_name(value.category); setter(category); } diff --git a/xml_converter/src/attribute/marker_category.hpp b/xml_converter/src/attribute/marker_category.hpp index 4d1d1548..19f2ad52 100644 --- a/xml_converter/src/attribute/marker_category.hpp +++ b/xml_converter/src/attribute/marker_category.hpp @@ -12,7 +12,7 @@ class XMLError; -namespace waypoint { +namespace guildpoint { class Category; } @@ -34,7 +34,7 @@ std::string marker_category_to_xml_attribute( const MarkerCategory* value); void proto_to_marker_category( - waypoint::Category input, + guildpoint::Category input, ProtoReaderState* state, MarkerCategory* value, bool* is_set); @@ -42,4 +42,4 @@ void proto_to_marker_category( void marker_category_to_proto( MarkerCategory value, ProtoWriterState* state, - std::function setter); + std::function setter); diff --git a/xml_converter/src/attribute/mount_filter_gen.cpp b/xml_converter/src/attribute/mount_filter_gen.cpp index 5366b4db..f16a3561 100644 --- a/xml_converter/src/attribute/mount_filter_gen.cpp +++ b/xml_converter/src/attribute/mount_filter_gen.cpp @@ -8,7 +8,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" using namespace std; @@ -113,7 +113,7 @@ string mount_filter_to_xml_attribute( } void proto_to_mount_filter( - waypoint::MountFilter input, + guildpoint::MountFilter input, ProtoReaderState*, MountFilter* value, bool* is_set) { @@ -135,8 +135,8 @@ void proto_to_mount_filter( void mount_filter_to_proto( MountFilter value, ProtoWriterState*, - std::function setter) { - waypoint::MountFilter* proto_mount_filter = new waypoint::MountFilter(); + std::function setter) { + guildpoint::MountFilter* proto_mount_filter = new guildpoint::MountFilter(); bool should_write = false; proto_mount_filter->set_raptor(value.raptor); should_write |= value.raptor; diff --git a/xml_converter/src/attribute/mount_filter_gen.hpp b/xml_converter/src/attribute/mount_filter_gen.hpp index 6931c27c..45aa0013 100644 --- a/xml_converter/src/attribute/mount_filter_gen.hpp +++ b/xml_converter/src/attribute/mount_filter_gen.hpp @@ -11,7 +11,7 @@ #include "../state_structs/xml_writer_state.hpp" class XMLError; -namespace waypoint { +namespace guildpoint { class MountFilter; } @@ -45,7 +45,7 @@ std::string mount_filter_to_xml_attribute( const MountFilter* value); void proto_to_mount_filter( - waypoint::MountFilter input, + guildpoint::MountFilter input, ProtoReaderState* state, MountFilter* value, bool* is_set); @@ -53,4 +53,4 @@ void proto_to_mount_filter( void mount_filter_to_proto( MountFilter value, ProtoWriterState* state, - std::function setter); + std::function setter); diff --git a/xml_converter/src/attribute/position_gen.cpp b/xml_converter/src/attribute/position_gen.cpp index cf949a23..6256b5d5 100644 --- a/xml_converter/src/attribute/position_gen.cpp +++ b/xml_converter/src/attribute/position_gen.cpp @@ -7,7 +7,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" using namespace std; @@ -35,7 +35,7 @@ void xml_attribute_to_position( } void proto_to_position( - waypoint::Position input, + guildpoint::Position input, ProtoReaderState*, Position* value, bool* is_set) { @@ -50,8 +50,8 @@ void proto_to_position( void position_to_proto( Position value, ProtoWriterState*, - std::function setter) { - waypoint::Position* proto_position = new waypoint::Position(); + std::function setter) { + guildpoint::Position* proto_position = new guildpoint::Position(); proto_position->set_x(value.x_position); proto_position->set_y(value.y_position); proto_position->set_z(value.z_position); diff --git a/xml_converter/src/attribute/position_gen.hpp b/xml_converter/src/attribute/position_gen.hpp index c4a2c5a5..4db97b31 100644 --- a/xml_converter/src/attribute/position_gen.hpp +++ b/xml_converter/src/attribute/position_gen.hpp @@ -11,7 +11,7 @@ #include "../state_structs/xml_writer_state.hpp" class XMLError; -namespace waypoint { +namespace guildpoint { class Position; } @@ -38,7 +38,7 @@ std::string position_to_xml_attribute( const Position* value); void proto_to_position( - waypoint::Position input, + guildpoint::Position input, ProtoReaderState* state, Position* value, bool* is_set); @@ -46,4 +46,4 @@ void proto_to_position( void position_to_proto( Position value, ProtoWriterState* state, - std::function setter); + std::function setter); diff --git a/xml_converter/src/attribute/profession_filter_gen.cpp b/xml_converter/src/attribute/profession_filter_gen.cpp index 2f8e9eaf..3d424304 100644 --- a/xml_converter/src/attribute/profession_filter_gen.cpp +++ b/xml_converter/src/attribute/profession_filter_gen.cpp @@ -8,7 +8,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" using namespace std; @@ -106,7 +106,7 @@ string profession_filter_to_xml_attribute( } void proto_to_profession_filter( - waypoint::ProfessionFilter input, + guildpoint::ProfessionFilter input, ProtoReaderState*, ProfessionFilter* value, bool* is_set) { @@ -127,8 +127,8 @@ void proto_to_profession_filter( void profession_filter_to_proto( ProfessionFilter value, ProtoWriterState*, - std::function setter) { - waypoint::ProfessionFilter* proto_profession_filter = new waypoint::ProfessionFilter(); + std::function setter) { + guildpoint::ProfessionFilter* proto_profession_filter = new guildpoint::ProfessionFilter(); bool should_write = false; proto_profession_filter->set_guardian(value.guardian); should_write |= value.guardian; diff --git a/xml_converter/src/attribute/profession_filter_gen.hpp b/xml_converter/src/attribute/profession_filter_gen.hpp index 70ee4575..b9bcaaa3 100644 --- a/xml_converter/src/attribute/profession_filter_gen.hpp +++ b/xml_converter/src/attribute/profession_filter_gen.hpp @@ -11,7 +11,7 @@ #include "../state_structs/xml_writer_state.hpp" class XMLError; -namespace waypoint { +namespace guildpoint { class ProfessionFilter; } @@ -44,7 +44,7 @@ std::string profession_filter_to_xml_attribute( const ProfessionFilter* value); void proto_to_profession_filter( - waypoint::ProfessionFilter input, + guildpoint::ProfessionFilter input, ProtoReaderState* state, ProfessionFilter* value, bool* is_set); @@ -52,4 +52,4 @@ void proto_to_profession_filter( void profession_filter_to_proto( ProfessionFilter value, ProtoWriterState* state, - std::function setter); + std::function setter); diff --git a/xml_converter/src/attribute/reset_behavior_gen.cpp b/xml_converter/src/attribute/reset_behavior_gen.cpp index ec186d1f..af3b16b5 100644 --- a/xml_converter/src/attribute/reset_behavior_gen.cpp +++ b/xml_converter/src/attribute/reset_behavior_gen.cpp @@ -8,7 +8,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" using namespace std; @@ -146,44 +146,44 @@ string reset_behavior_to_xml_attribute( } void proto_to_reset_behavior( - waypoint::ResetBehavior input, + guildpoint::ResetBehavior input, ProtoReaderState*, ResetBehavior* value, bool* is_set) { switch (input) { - case waypoint::ResetBehavior::always_visible: + case guildpoint::ResetBehavior::always_visible: *value = ResetBehavior::always_visible; *is_set = true; break; - case waypoint::ResetBehavior::map_change: + case guildpoint::ResetBehavior::map_change: *value = ResetBehavior::map_change; *is_set = true; break; - case waypoint::ResetBehavior::daily_reset: + case guildpoint::ResetBehavior::daily_reset: *value = ResetBehavior::daily_reset; *is_set = true; break; - case waypoint::ResetBehavior::never: + case guildpoint::ResetBehavior::never: *value = ResetBehavior::never; *is_set = true; break; - case waypoint::ResetBehavior::timer: + case guildpoint::ResetBehavior::timer: *value = ResetBehavior::timer; *is_set = true; break; - case waypoint::ResetBehavior::map_reset: + case guildpoint::ResetBehavior::map_reset: *value = ResetBehavior::map_reset; *is_set = true; break; - case waypoint::ResetBehavior::instance_change: + case guildpoint::ResetBehavior::instance_change: *value = ResetBehavior::instance_change; *is_set = true; break; - case waypoint::ResetBehavior::daily_reset_per_character: + case guildpoint::ResetBehavior::daily_reset_per_character: *value = ResetBehavior::daily_reset_per_character; *is_set = true; break; - case waypoint::ResetBehavior::weekly_reset: + case guildpoint::ResetBehavior::weekly_reset: *value = ResetBehavior::weekly_reset; *is_set = true; break; @@ -197,37 +197,37 @@ void proto_to_reset_behavior( void reset_behavior_to_proto( ResetBehavior value, ProtoWriterState*, - std::function setter) { + std::function setter) { switch (value) { case ResetBehavior::always_visible: - setter(waypoint::ResetBehavior::always_visible); + setter(guildpoint::ResetBehavior::always_visible); break; case ResetBehavior::map_change: - setter(waypoint::ResetBehavior::map_change); + setter(guildpoint::ResetBehavior::map_change); break; case ResetBehavior::daily_reset: - setter(waypoint::ResetBehavior::daily_reset); + setter(guildpoint::ResetBehavior::daily_reset); break; case ResetBehavior::never: - setter(waypoint::ResetBehavior::never); + setter(guildpoint::ResetBehavior::never); break; case ResetBehavior::timer: - setter(waypoint::ResetBehavior::timer); + setter(guildpoint::ResetBehavior::timer); break; case ResetBehavior::map_reset: - setter(waypoint::ResetBehavior::map_reset); + setter(guildpoint::ResetBehavior::map_reset); break; case ResetBehavior::instance_change: - setter(waypoint::ResetBehavior::instance_change); + setter(guildpoint::ResetBehavior::instance_change); break; case ResetBehavior::daily_reset_per_character: - setter(waypoint::ResetBehavior::daily_reset_per_character); + setter(guildpoint::ResetBehavior::daily_reset_per_character); break; case ResetBehavior::weekly_reset: - setter(waypoint::ResetBehavior::weekly_reset); + setter(guildpoint::ResetBehavior::weekly_reset); break; default: - setter(waypoint::ResetBehavior::always_visible); + setter(guildpoint::ResetBehavior::always_visible); break; } } diff --git a/xml_converter/src/attribute/reset_behavior_gen.hpp b/xml_converter/src/attribute/reset_behavior_gen.hpp index 6e79adfd..2110082b 100644 --- a/xml_converter/src/attribute/reset_behavior_gen.hpp +++ b/xml_converter/src/attribute/reset_behavior_gen.hpp @@ -9,7 +9,7 @@ #include "../state_structs/proto_writer_state.hpp" #include "../state_structs/xml_reader_state.hpp" #include "../state_structs/xml_writer_state.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" class XMLError; @@ -37,7 +37,7 @@ std::string reset_behavior_to_xml_attribute( const ResetBehavior* value); void proto_to_reset_behavior( - waypoint::ResetBehavior input, + guildpoint::ResetBehavior input, ProtoReaderState* state, ResetBehavior* value, bool* is_set); @@ -45,4 +45,4 @@ void proto_to_reset_behavior( void reset_behavior_to_proto( ResetBehavior value, ProtoWriterState* state, - std::function setter); + std::function setter); diff --git a/xml_converter/src/attribute/specialization_filter_gen.cpp b/xml_converter/src/attribute/specialization_filter_gen.cpp index ffb25509..35638196 100644 --- a/xml_converter/src/attribute/specialization_filter_gen.cpp +++ b/xml_converter/src/attribute/specialization_filter_gen.cpp @@ -8,7 +8,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" using namespace std; @@ -628,7 +628,7 @@ string specialization_filter_to_xml_attribute( } void proto_to_specialization_filter( - waypoint::SpecializationFilter input, + guildpoint::SpecializationFilter input, ProtoReaderState*, SpecializationFilter* value, bool* is_set) { @@ -712,8 +712,8 @@ void proto_to_specialization_filter( void specialization_filter_to_proto( SpecializationFilter value, ProtoWriterState*, - std::function setter) { - waypoint::SpecializationFilter* proto_specialization_filter = new waypoint::SpecializationFilter(); + std::function setter) { + guildpoint::SpecializationFilter* proto_specialization_filter = new guildpoint::SpecializationFilter(); bool should_write = false; proto_specialization_filter->set_elementalist_tempest(value.elementalist_tempest); should_write |= value.elementalist_tempest; diff --git a/xml_converter/src/attribute/specialization_filter_gen.hpp b/xml_converter/src/attribute/specialization_filter_gen.hpp index 7661117d..0f8398db 100644 --- a/xml_converter/src/attribute/specialization_filter_gen.hpp +++ b/xml_converter/src/attribute/specialization_filter_gen.hpp @@ -11,7 +11,7 @@ #include "../state_structs/xml_writer_state.hpp" class XMLError; -namespace waypoint { +namespace guildpoint { class SpecializationFilter; } @@ -107,7 +107,7 @@ std::string specialization_filter_to_xml_attribute( const SpecializationFilter* value); void proto_to_specialization_filter( - waypoint::SpecializationFilter input, + guildpoint::SpecializationFilter input, ProtoReaderState* state, SpecializationFilter* value, bool* is_set); @@ -115,4 +115,4 @@ void proto_to_specialization_filter( void specialization_filter_to_proto( SpecializationFilter value, ProtoWriterState* state, - std::function setter); + std::function setter); diff --git a/xml_converter/src/attribute/species_filter_gen.cpp b/xml_converter/src/attribute/species_filter_gen.cpp index 1a9f79b3..906e324c 100644 --- a/xml_converter/src/attribute/species_filter_gen.cpp +++ b/xml_converter/src/attribute/species_filter_gen.cpp @@ -8,7 +8,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" using namespace std; @@ -78,7 +78,7 @@ string species_filter_to_xml_attribute( } void proto_to_species_filter( - waypoint::SpeciesFilter input, + guildpoint::SpeciesFilter input, ProtoReaderState*, SpeciesFilter* value, bool* is_set) { @@ -95,8 +95,8 @@ void proto_to_species_filter( void species_filter_to_proto( SpeciesFilter value, ProtoWriterState*, - std::function setter) { - waypoint::SpeciesFilter* proto_species_filter = new waypoint::SpeciesFilter(); + std::function setter) { + guildpoint::SpeciesFilter* proto_species_filter = new guildpoint::SpeciesFilter(); bool should_write = false; proto_species_filter->set_asura(value.asura); should_write |= value.asura; diff --git a/xml_converter/src/attribute/species_filter_gen.hpp b/xml_converter/src/attribute/species_filter_gen.hpp index 388bf206..14e48e94 100644 --- a/xml_converter/src/attribute/species_filter_gen.hpp +++ b/xml_converter/src/attribute/species_filter_gen.hpp @@ -11,7 +11,7 @@ #include "../state_structs/xml_writer_state.hpp" class XMLError; -namespace waypoint { +namespace guildpoint { class SpeciesFilter; } @@ -40,7 +40,7 @@ std::string species_filter_to_xml_attribute( const SpeciesFilter* value); void proto_to_species_filter( - waypoint::SpeciesFilter input, + guildpoint::SpeciesFilter input, ProtoReaderState* state, SpeciesFilter* value, bool* is_set); @@ -48,4 +48,4 @@ void proto_to_species_filter( void species_filter_to_proto( SpeciesFilter value, ProtoWriterState* state, - std::function setter); + std::function setter); diff --git a/xml_converter/src/attribute/trail_data.cpp b/xml_converter/src/attribute/trail_data.cpp index 341de3c3..f05b4c52 100644 --- a/xml_converter/src/attribute/trail_data.cpp +++ b/xml_converter/src/attribute/trail_data.cpp @@ -13,7 +13,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" using namespace std; @@ -152,7 +152,7 @@ string trail_data_to_xml_attribute( // Parses a TrailData from a proto field. //////////////////////////////////////////////////////////////////////////////// void proto_to_trail_data( - waypoint::TrailData input, + guildpoint::TrailData input, ProtoReaderState*, TrailData* value, bool* is_set) { @@ -172,8 +172,8 @@ void proto_to_trail_data( void trail_data_to_proto( TrailData value, ProtoWriterState*, - std::function setter) { - waypoint::TrailData* trail_data = new waypoint::TrailData(); + std::function setter) { + guildpoint::TrailData* trail_data = new guildpoint::TrailData(); *trail_data->mutable_points_x() = {value.points_x.begin(), value.points_x.end()}; *trail_data->mutable_points_y() = {value.points_y.begin(), value.points_y.end()}; *trail_data->mutable_points_z() = {value.points_z.begin(), value.points_z.end()}; diff --git a/xml_converter/src/attribute/trail_data.hpp b/xml_converter/src/attribute/trail_data.hpp index 29e96d05..a123f499 100644 --- a/xml_converter/src/attribute/trail_data.hpp +++ b/xml_converter/src/attribute/trail_data.hpp @@ -12,7 +12,7 @@ class XMLError; -namespace waypoint { +namespace guildpoint { class TrailData; } @@ -40,7 +40,7 @@ std::string trail_data_to_xml_attribute( const bool* is_map_id_set); void proto_to_trail_data( - waypoint::TrailData input, + guildpoint::TrailData input, ProtoReaderState* state, TrailData* value, bool* is_set); @@ -48,4 +48,4 @@ void proto_to_trail_data( void trail_data_to_proto( TrailData value, ProtoWriterState* state, - std::function setter); + std::function setter); diff --git a/xml_converter/src/attribute/unique_id.cpp b/xml_converter/src/attribute/unique_id.cpp index 107ec2f8..dfaf8b2c 100644 --- a/xml_converter/src/attribute/unique_id.cpp +++ b/xml_converter/src/attribute/unique_id.cpp @@ -8,7 +8,7 @@ #include "../rapid_helpers.hpp" #include "../rapidxml-1.13/rapidxml.hpp" #include "../string_helper.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" using namespace std; diff --git a/xml_converter/src/attribute/unique_id.hpp b/xml_converter/src/attribute/unique_id.hpp index e34a7df0..d535a612 100644 --- a/xml_converter/src/attribute/unique_id.hpp +++ b/xml_converter/src/attribute/unique_id.hpp @@ -13,7 +13,7 @@ class XMLError; -namespace waypoint { +namespace guildpoint { class GUID; } diff --git a/xml_converter/src/category_gen.cpp b/xml_converter/src/category_gen.cpp index 90be2254..f53f21d6 100644 --- a/xml_converter/src/category_gen.cpp +++ b/xml_converter/src/category_gen.cpp @@ -8,10 +8,10 @@ #include "attribute/bool.hpp" #include "attribute/string.hpp" +#include "guildpoint.pb.h" #include "rapid_helpers.hpp" #include "rapidxml-1.13/rapidxml.hpp" #include "string_helper.hpp" -#include "waypoint.pb.h" using namespace std; @@ -111,8 +111,8 @@ vector Category::as_xml(XMLWriterState* state) const { return xml_node_contents; } -waypoint::Category Category::as_protobuf(ProtoWriterState* state) const { - waypoint::Category proto_category; +guildpoint::Category Category::as_protobuf(ProtoWriterState* state) const { + guildpoint::Category proto_category; if (this->display_name_is_set) { std::function setter = [&proto_category](std::string val) { proto_category.set_name(val); }; display_name_and_name_to_proto_display_name(this->display_name, state, setter, &(this->name), &(this->name_is_set)); @@ -136,7 +136,7 @@ waypoint::Category Category::as_protobuf(ProtoWriterState* state) const { return proto_category; } -void Category::parse_protobuf(waypoint::Category proto_category, ProtoReaderState* state) { +void Category::parse_protobuf(guildpoint::Category proto_category, ProtoReaderState* state) { if (proto_category.name() != "") { proto_display_name_to_display_name_and_name(proto_category.name(), state, &(this->display_name), &(this->display_name_is_set), &(this->name), &(this->name_is_set)); } diff --git a/xml_converter/src/category_gen.hpp b/xml_converter/src/category_gen.hpp index 3bc738cf..9dd6ce4e 100644 --- a/xml_converter/src/category_gen.hpp +++ b/xml_converter/src/category_gen.hpp @@ -6,12 +6,12 @@ #include #include "attribute/unique_id.hpp" +#include "guildpoint.pb.h" #include "icon_gen.hpp" #include "parseable.hpp" #include "rapidxml-1.13/rapidxml.hpp" #include "state_structs/xml_reader_state.hpp" #include "trail_gen.hpp" -#include "waypoint.pb.h" class XMLError; @@ -38,6 +38,6 @@ class Category : public Parseable { virtual std::vector as_xml(XMLWriterState* state) const; virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, XMLReaderState* state); - waypoint::Category as_protobuf(ProtoWriterState* state) const; - void parse_protobuf(waypoint::Category proto_category, ProtoReaderState* state); + guildpoint::Category as_protobuf(ProtoWriterState* state) const; + void parse_protobuf(guildpoint::Category proto_category, ProtoReaderState* state); }; diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index a74ab840..ea4817b0 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -8,10 +8,10 @@ #include "attribute/float.hpp" #include "attribute/int.hpp" #include "attribute/string.hpp" +#include "guildpoint.pb.h" #include "rapid_helpers.hpp" #include "rapidxml-1.13/rapidxml.hpp" #include "string_helper.hpp" -#include "waypoint.pb.h" using namespace std; @@ -409,8 +409,8 @@ vector Icon::as_xml(XMLWriterState* state) const { return xml_node_contents; } -waypoint::Icon Icon::as_protobuf(ProtoWriterState* state) const { - waypoint::Icon proto_icon; +guildpoint::Icon Icon::as_protobuf(ProtoWriterState* state) const { + guildpoint::Icon proto_icon; if (this->achievement_bit_index_is_set) { std::function setter = [&proto_icon](int val) { proto_icon.set_achievement_bit_index(val); }; int_to_proto(this->achievement_bit_index, state, setter); @@ -452,7 +452,7 @@ waypoint::Icon Icon::as_protobuf(ProtoWriterState* state) const { string_to_proto(this->copy_message, state, setter); } if (this->cull_chirality_is_set) { - std::function setter = [&proto_icon](waypoint::CullChirality val) { proto_icon.set_cull_chirality(val); }; + std::function setter = [&proto_icon](guildpoint::CullChirality val) { proto_icon.set_cull_chirality(val); }; cull_chirality_to_proto(this->cull_chirality, state, setter); } if (this->disable_player_cutout_is_set) { @@ -468,11 +468,11 @@ waypoint::Icon Icon::as_protobuf(ProtoWriterState* state) const { float_to_proto(this->distance_fade_start, state, setter); } if (this->euler_rotation_is_set) { - std::function setter = [&proto_icon](waypoint::EulerRotation* val) { proto_icon.set_allocated_euler_rotation(val); }; + std::function setter = [&proto_icon](guildpoint::EulerRotation* val) { proto_icon.set_allocated_euler_rotation(val); }; euler_rotation_to_proto(this->euler_rotation, state, setter); } if (this->festival_filter_is_set) { - std::function setter = [&proto_icon](waypoint::FestivalFilter* val) { proto_icon.set_allocated_festival_filter(val); }; + std::function setter = [&proto_icon](guildpoint::FestivalFilter* val) { proto_icon.set_allocated_festival_filter(val); }; festival_filter_to_proto(this->festival_filter, state, setter); } if (this->guid_is_set) { @@ -488,7 +488,7 @@ waypoint::Icon Icon::as_protobuf(ProtoWriterState* state) const { float_to_proto(this->height_offset, state, setter); } if (this->hide_category_is_set) { - std::function setter = [&proto_icon](waypoint::Category* val) { proto_icon.mutable_trigger()->set_allocated_action_hide_category(val); }; + std::function setter = [&proto_icon](guildpoint::Category* val) { proto_icon.mutable_trigger()->set_allocated_action_hide_category(val); }; marker_category_to_proto(this->hide_category, state, setter); } if (this->icon_is_set) { @@ -516,7 +516,7 @@ waypoint::Icon Icon::as_protobuf(ProtoWriterState* state) const { int_to_proto(this->map_id, state, setter); } if (this->map_type_filter_is_set) { - std::function setter = [&proto_icon](waypoint::MapTypeFilter* val) { proto_icon.set_allocated_map_type_filter(val); }; + std::function setter = [&proto_icon](guildpoint::MapTypeFilter* val) { proto_icon.set_allocated_map_type_filter(val); }; map_type_filter_to_proto(this->map_type_filter, state, setter); } if (this->maximum_size_on_screen_is_set) { @@ -528,15 +528,15 @@ waypoint::Icon Icon::as_protobuf(ProtoWriterState* state) const { int_to_proto(this->minimum_size_on_screen, state, setter); } if (this->mount_filter_is_set) { - std::function setter = [&proto_icon](waypoint::MountFilter* val) { proto_icon.set_allocated_mount_filter(val); }; + std::function setter = [&proto_icon](guildpoint::MountFilter* val) { proto_icon.set_allocated_mount_filter(val); }; mount_filter_to_proto(this->mount_filter, state, setter); } if (this->position_is_set) { - std::function setter = [&proto_icon](waypoint::Position* val) { proto_icon.set_allocated_position(val); }; + std::function setter = [&proto_icon](guildpoint::Position* val) { proto_icon.set_allocated_position(val); }; position_to_proto(this->position, state, setter); } if (this->profession_filter_is_set) { - std::function setter = [&proto_icon](waypoint::ProfessionFilter* val) { proto_icon.set_allocated_profession_filter(val); }; + std::function setter = [&proto_icon](guildpoint::ProfessionFilter* val) { proto_icon.set_allocated_profession_filter(val); }; profession_filter_to_proto(this->profession_filter, state, setter); } if (this->render_ingame_is_set) { @@ -552,7 +552,7 @@ waypoint::Icon Icon::as_protobuf(ProtoWriterState* state) const { bool_to_proto(this->render_on_minimap, state, setter); } if (this->reset_behavior_is_set) { - std::function setter = [&proto_icon](waypoint::ResetBehavior val) { proto_icon.mutable_trigger()->set_reset_behavior(val); }; + std::function setter = [&proto_icon](guildpoint::ResetBehavior val) { proto_icon.mutable_trigger()->set_reset_behavior(val); }; reset_behavior_to_proto(this->reset_behavior, state, setter); } if (this->reset_length_is_set) { @@ -568,19 +568,19 @@ waypoint::Icon Icon::as_protobuf(ProtoWriterState* state) const { float_to_proto(this->schedule_duration, state, setter); } if (this->show_category_is_set) { - std::function setter = [&proto_icon](waypoint::Category* val) { proto_icon.mutable_trigger()->set_allocated_action_show_category(val); }; + std::function setter = [&proto_icon](guildpoint::Category* val) { proto_icon.mutable_trigger()->set_allocated_action_show_category(val); }; marker_category_to_proto(this->show_category, state, setter); } if (this->specialization_filter_is_set) { - std::function setter = [&proto_icon](waypoint::SpecializationFilter* val) { proto_icon.set_allocated_specialization_filter(val); }; + std::function setter = [&proto_icon](guildpoint::SpecializationFilter* val) { proto_icon.set_allocated_specialization_filter(val); }; specialization_filter_to_proto(this->specialization_filter, state, setter); } if (this->species_filter_is_set) { - std::function setter = [&proto_icon](waypoint::SpeciesFilter* val) { proto_icon.set_allocated_species_filter(val); }; + std::function setter = [&proto_icon](guildpoint::SpeciesFilter* val) { proto_icon.set_allocated_species_filter(val); }; species_filter_to_proto(this->species_filter, state, setter); } if (this->toggle_category_is_set) { - std::function setter = [&proto_icon](waypoint::Category* val) { proto_icon.mutable_trigger()->set_allocated_action_toggle_category(val); }; + std::function setter = [&proto_icon](guildpoint::Category* val) { proto_icon.mutable_trigger()->set_allocated_action_toggle_category(val); }; marker_category_to_proto(this->toggle_category, state, setter); } if (this->tooltip_description_is_set) { @@ -598,7 +598,7 @@ waypoint::Icon Icon::as_protobuf(ProtoWriterState* state) const { return proto_icon; } -void Icon::parse_protobuf(waypoint::Icon proto_icon, ProtoReaderState* state) { +void Icon::parse_protobuf(guildpoint::Icon proto_icon, ProtoReaderState* state) { if (proto_icon.achievement_bit_index() != 0) { proto_to_int(proto_icon.achievement_bit_index(), state, &(this->achievement_bit_index), &(this->achievement_bit_index_is_set)); } diff --git a/xml_converter/src/icon_gen.hpp b/xml_converter/src/icon_gen.hpp index a49d9c44..fe2a8c10 100644 --- a/xml_converter/src/icon_gen.hpp +++ b/xml_converter/src/icon_gen.hpp @@ -18,10 +18,10 @@ #include "attribute/specialization_filter_gen.hpp" #include "attribute/species_filter_gen.hpp" #include "attribute/unique_id.hpp" +#include "guildpoint.pb.h" #include "parseable.hpp" #include "rapidxml-1.13/rapidxml.hpp" #include "state_structs/xml_reader_state.hpp" -#include "waypoint.pb.h" class XMLError; @@ -124,7 +124,7 @@ class Icon : public Parseable { virtual std::vector as_xml(XMLWriterState* state) const; virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, XMLReaderState* state); - waypoint::Icon as_protobuf(ProtoWriterState* state) const; - void parse_protobuf(waypoint::Icon proto_icon, ProtoReaderState* state); + guildpoint::Icon as_protobuf(ProtoWriterState* state) const; + void parse_protobuf(guildpoint::Icon proto_icon, ProtoReaderState* state); bool validate_attributes_of_type_marker_category(); }; diff --git a/xml_converter/src/packaging_protobin.cpp b/xml_converter/src/packaging_protobin.cpp index 3fe1b03a..7d0dbc4e 100644 --- a/xml_converter/src/packaging_protobin.cpp +++ b/xml_converter/src/packaging_protobin.cpp @@ -12,7 +12,7 @@ #include "state_structs/proto_writer_state.hpp" #include "string_helper.hpp" #include "string_hierarchy.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" using namespace std; @@ -23,9 +23,9 @@ using namespace std; //////////////////////////////////////////////////////////////////////////////// // //////////////////////////////////////////////////////////////////////////////// -void parse_waypoint_categories( +void parse_guildpoint_categories( string full_category_name, - ::waypoint::Category proto_category, + ::guildpoint::Category proto_category, map* marker_categories, vector* parsed_pois, ProtoReaderState* state) { @@ -55,7 +55,7 @@ void parse_waypoint_categories( } for (int i = 0; i < proto_category.children_size(); i++) { - parse_waypoint_categories(full_category_name + ".", proto_category.children(i), &(this_category->children), parsed_pois, state); + parse_guildpoint_categories(full_category_name + ".", proto_category.children(i), &(this_category->children), parsed_pois, state); } } @@ -64,7 +64,7 @@ void parse_waypoint_categories( //////////////////////////////////////////////////////////////////////////////// void read_protobuf_file(string proto_filepath, const string marker_pack_root_directory, map* marker_categories, vector* parsed_pois) { fstream infile; - waypoint::Waypoint proto_message; + guildpoint::Guildpoint proto_message; ProtoReaderState state; state.marker_pack_root_directory = marker_pack_root_directory; @@ -74,7 +74,7 @@ void read_protobuf_file(string proto_filepath, const string marker_pack_root_dir state.textures = proto_message.textures(); for (int i = 0; i < proto_message.category_size(); i++) { - parse_waypoint_categories("", proto_message.category(i), marker_categories, parsed_pois, &state); + parse_guildpoint_categories("", proto_message.category(i), marker_categories, parsed_pois, &state); } } @@ -89,7 +89,7 @@ void read_protobuf_file(string proto_filepath, const string marker_pack_root_dir // has contents that exist in the category filter. //////////////////////////////////////////////////////////////////////////////// struct MaybeCategory { - waypoint::Category category; + guildpoint::Category category; bool is_category; }; MaybeCategory build_category_objects( @@ -98,10 +98,10 @@ MaybeCategory build_category_objects( const std::map>& category_to_pois, vector* category_vector, ProtoWriterState* state) { - waypoint::Category category_proto = category->as_protobuf(state); + guildpoint::Category category_proto = category->as_protobuf(state); bool has_valid_contents = false; - vector categories_to_write; + vector categories_to_write; for (map::const_iterator it = category->children.begin(); it != category->children.end(); it++) { // This is currently a copy operation which is kind expensive @@ -156,13 +156,13 @@ MaybeCategory build_category_objects( return return_value; } -void proto_post_processing(ProtoWriterState* state, waypoint::Waypoint* proto) { +void proto_post_processing(ProtoWriterState* state, guildpoint::Guildpoint* proto) { if (state->textures.size() > 1) { // Handle the 0th index null value independently. proto->add_textures(); for (size_t i = 1; i < state->textures.size(); i++) { - waypoint::TextureData* texture_data = proto->add_textures(); + guildpoint::TextureData* texture_data = proto->add_textures(); texture_data->set_filepath(state->textures[i]->filename); } } @@ -181,7 +181,7 @@ void _write_protobuf_file( cout << "Unable to open " << filepath << endl; } - waypoint::Waypoint output_message; + guildpoint::Guildpoint output_message; for (map::const_iterator it = marker_categories->begin(); it != marker_categories->end(); it++) { string category_name = it->first; diff --git a/xml_converter/src/packaging_protobin.hpp b/xml_converter/src/packaging_protobin.hpp index 495ef54e..dffad592 100644 --- a/xml_converter/src/packaging_protobin.hpp +++ b/xml_converter/src/packaging_protobin.hpp @@ -8,7 +8,7 @@ #include "category_gen.hpp" #include "parseable.hpp" #include "string_hierarchy.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" void read_protobuf_file( std::string proto_filepath, diff --git a/xml_converter/src/state_structs/proto_reader_state.hpp b/xml_converter/src/state_structs/proto_reader_state.hpp index 161fa1b2..e334a495 100644 --- a/xml_converter/src/state_structs/proto_reader_state.hpp +++ b/xml_converter/src/state_structs/proto_reader_state.hpp @@ -2,10 +2,10 @@ #include -#include "waypoint.pb.h" +#include "guildpoint.pb.h" struct ProtoReaderState { // A list of all of the textures with their paths. - google::protobuf::RepeatedPtrField<::waypoint::TextureData> textures; + google::protobuf::RepeatedPtrField<::guildpoint::TextureData> textures; std::string marker_pack_root_directory; }; diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index a8e45ad7..86856d61 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -8,10 +8,10 @@ #include "attribute/float.hpp" #include "attribute/int.hpp" #include "attribute/string.hpp" +#include "guildpoint.pb.h" #include "rapid_helpers.hpp" #include "rapidxml-1.13/rapidxml.hpp" #include "string_helper.hpp" -#include "waypoint.pb.h" using namespace std; @@ -247,8 +247,8 @@ vector Trail::as_xml(XMLWriterState* state) const { return xml_node_contents; } -waypoint::Trail Trail::as_protobuf(ProtoWriterState* state) const { - waypoint::Trail proto_trail; +guildpoint::Trail Trail::as_protobuf(ProtoWriterState* state) const { + guildpoint::Trail proto_trail; if (this->achievement_bit_index_is_set) { std::function setter = [&proto_trail](int val) { proto_trail.set_achievement_bit_index(val); }; int_to_proto(this->achievement_bit_index, state, setter); @@ -266,7 +266,7 @@ waypoint::Trail Trail::as_protobuf(ProtoWriterState* state) const { color_to_proto(this->color, state, setter); } if (this->cull_chirality_is_set) { - std::function setter = [&proto_trail](waypoint::CullChirality val) { proto_trail.set_cull_chirality(val); }; + std::function setter = [&proto_trail](guildpoint::CullChirality val) { proto_trail.set_cull_chirality(val); }; cull_chirality_to_proto(this->cull_chirality, state, setter); } if (this->disable_player_cutout_is_set) { @@ -282,7 +282,7 @@ waypoint::Trail Trail::as_protobuf(ProtoWriterState* state) const { float_to_proto(this->distance_fade_start, state, setter); } if (this->festival_filter_is_set) { - std::function setter = [&proto_trail](waypoint::FestivalFilter* val) { proto_trail.set_allocated_festival_filter(val); }; + std::function setter = [&proto_trail](guildpoint::FestivalFilter* val) { proto_trail.set_allocated_festival_filter(val); }; festival_filter_to_proto(this->festival_filter, state, setter); } if (this->guid_is_set) { @@ -302,15 +302,15 @@ waypoint::Trail Trail::as_protobuf(ProtoWriterState* state) const { int_to_proto(this->map_id, state, setter); } if (this->map_type_filter_is_set) { - std::function setter = [&proto_trail](waypoint::MapTypeFilter* val) { proto_trail.set_allocated_map_type_filter(val); }; + std::function setter = [&proto_trail](guildpoint::MapTypeFilter* val) { proto_trail.set_allocated_map_type_filter(val); }; map_type_filter_to_proto(this->map_type_filter, state, setter); } if (this->mount_filter_is_set) { - std::function setter = [&proto_trail](waypoint::MountFilter* val) { proto_trail.set_allocated_mount_filter(val); }; + std::function setter = [&proto_trail](guildpoint::MountFilter* val) { proto_trail.set_allocated_mount_filter(val); }; mount_filter_to_proto(this->mount_filter, state, setter); } if (this->profession_filter_is_set) { - std::function setter = [&proto_trail](waypoint::ProfessionFilter* val) { proto_trail.set_allocated_profession_filter(val); }; + std::function setter = [&proto_trail](guildpoint::ProfessionFilter* val) { proto_trail.set_allocated_profession_filter(val); }; profession_filter_to_proto(this->profession_filter, state, setter); } if (this->render_ingame_is_set) { @@ -334,11 +334,11 @@ waypoint::Trail Trail::as_protobuf(ProtoWriterState* state) const { float_to_proto(this->schedule_duration, state, setter); } if (this->specialization_filter_is_set) { - std::function setter = [&proto_trail](waypoint::SpecializationFilter* val) { proto_trail.set_allocated_specialization_filter(val); }; + std::function setter = [&proto_trail](guildpoint::SpecializationFilter* val) { proto_trail.set_allocated_specialization_filter(val); }; specialization_filter_to_proto(this->specialization_filter, state, setter); } if (this->species_filter_is_set) { - std::function setter = [&proto_trail](waypoint::SpeciesFilter* val) { proto_trail.set_allocated_species_filter(val); }; + std::function setter = [&proto_trail](guildpoint::SpeciesFilter* val) { proto_trail.set_allocated_species_filter(val); }; species_filter_to_proto(this->species_filter, state, setter); } if (this->texture_is_set) { @@ -346,7 +346,7 @@ waypoint::Trail Trail::as_protobuf(ProtoWriterState* state) const { image_to_proto(this->texture, state, setter); } if (this->trail_data_is_set) { - std::function setter = [&proto_trail](waypoint::TrailData* val) { proto_trail.set_allocated_trail_data(val); }; + std::function setter = [&proto_trail](guildpoint::TrailData* val) { proto_trail.set_allocated_trail_data(val); }; trail_data_to_proto(this->trail_data, state, setter); } if (this->trail_scale_is_set) { @@ -356,7 +356,7 @@ waypoint::Trail Trail::as_protobuf(ProtoWriterState* state) const { return proto_trail; } -void Trail::parse_protobuf(waypoint::Trail proto_trail, ProtoReaderState* state) { +void Trail::parse_protobuf(guildpoint::Trail proto_trail, ProtoReaderState* state) { if (proto_trail.achievement_bit_index() != 0) { proto_to_int(proto_trail.achievement_bit_index(), state, &(this->achievement_bit_index), &(this->achievement_bit_index_is_set)); } diff --git a/xml_converter/src/trail_gen.hpp b/xml_converter/src/trail_gen.hpp index 5d14ff10..73ac163d 100644 --- a/xml_converter/src/trail_gen.hpp +++ b/xml_converter/src/trail_gen.hpp @@ -16,10 +16,10 @@ #include "attribute/species_filter_gen.hpp" #include "attribute/trail_data.hpp" #include "attribute/unique_id.hpp" +#include "guildpoint.pb.h" #include "parseable.hpp" #include "rapidxml-1.13/rapidxml.hpp" #include "state_structs/xml_reader_state.hpp" -#include "waypoint.pb.h" class XMLError; @@ -82,7 +82,7 @@ class Trail : public Parseable { virtual std::vector as_xml(XMLWriterState* state) const; virtual std::string classname(); bool init_xml_attribute(rapidxml::xml_attribute<>* attribute, std::vector* errors, XMLReaderState* state); - waypoint::Trail as_protobuf(ProtoWriterState* state) const; - void parse_protobuf(waypoint::Trail proto_trail, ProtoReaderState* state); + guildpoint::Trail as_protobuf(ProtoWriterState* state) const; + void parse_protobuf(guildpoint::Trail proto_trail, ProtoReaderState* state); bool validate_attributes_of_type_marker_category(); }; diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 7f081d1f..66f1418e 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -28,7 +28,7 @@ #include "rapidxml-1.13/rapidxml_utils.hpp" #include "string_helper.hpp" #include "trail_gen.hpp" -#include "waypoint.pb.h" +#include "guildpoint.pb.h" using namespace std; @@ -135,16 +135,16 @@ void write_burrito_directory( //////////////////////////////////////////////////////////////////////////////// void process_data( vector input_taco_paths, - vector input_waypoint_paths, + vector input_guildpoint_paths, // These will eventually have additional arguments for each output path to // allow for splitting out a single markerpack vector output_taco_paths, - vector output_waypoint_paths, + vector output_guildpoint_paths, // This is a special output path used for burrito internal use that splits - // the waypoint protobins by map id. - string output_split_waypoint_dir) { + // the guildpoint protobins by map id. + string output_split_guildpoint_dir) { // All of the loaded pois and categories vector parsed_pois; map marker_categories; @@ -164,12 +164,12 @@ void process_data( auto ms = std::chrono::duration_cast(dur).count(); cout << "The taco parse function took " << ms << " milliseconds to run" << endl; - // Read in all the protobin waypoint markerpacks - for (size_t i = 0; i < input_waypoint_paths.size(); i++) { - cout << "Loading waypoint pack " << input_waypoint_paths[i] << endl; + // Read in all the protobin guildpoint markerpacks + for (size_t i = 0; i < input_guildpoint_paths.size(); i++) { + cout << "Loading guildpoint pack " << input_guildpoint_paths[i] << endl; read_burrito_directory( - input_waypoint_paths[i], + input_guildpoint_paths[i], &marker_categories, &parsed_pois); } @@ -184,17 +184,17 @@ void process_data( ms = std::chrono::duration_cast(dur).count(); cout << "The xml write function took " << ms << " milliseconds to run" << endl; - // Write all of the protobin waypoint paths - for (size_t i = 0; i < output_waypoint_paths.size(); i++) { - write_burrito_directory(output_waypoint_paths[i], &marker_categories, &parsed_pois); + // Write all of the protobin guildpoint paths + for (size_t i = 0; i < output_guildpoint_paths.size(); i++) { + write_burrito_directory(output_guildpoint_paths[i], &marker_categories, &parsed_pois); } - // Write the special map-split protbin waypoint file + // Write the special map-split protbin guildpoint file begin = chrono::high_resolution_clock::now(); - if (output_split_waypoint_dir != "") { + if (output_split_guildpoint_dir != "") { StringHierarchy category_filter; category_filter.add_path({}, true); - write_protobuf_file_per_map_id(output_split_waypoint_dir, category_filter, &marker_categories, &parsed_pois); + write_protobuf_file_per_map_id(output_split_guildpoint_dir, category_filter, &marker_categories, &parsed_pois); } end = chrono::high_resolution_clock::now(); dur = end - begin; @@ -210,18 +210,18 @@ void process_data( // receive. // // Example usage -// ./xml_converter --input-taco-paths ../packs/marker_pack --output-split-waypoint-path ../output_packs -// ./xml_converter --input-taco-paths ../packs/* --output-split-waypoint-path ../output_packs +// ./xml_converter --input-taco-paths ../packs/marker_pack --output-split-guildpoint-path ../output_packs +// ./xml_converter --input-taco-paths ../packs/* --output-split-guildpoint-path ../output_packs //////////////////////////////////////////////////////////////////////////////// int main(int argc, char* argv[]) { vector input_taco_paths; vector output_taco_paths; - vector input_waypoint_paths; - vector output_waypoint_paths; + vector input_guildpoint_paths; + vector output_guildpoint_paths; // Typically "~/.local/share/godot/app_userdata/Burrito/protobins" for // converting from xml markerpacks to internal protobuf files. - vector output_split_waypoint_paths; + vector output_split_guildpoint_paths; vector* arg_target = &input_taco_paths; @@ -232,39 +232,39 @@ int main(int argc, char* argv[]) { else if (!strcmp(argv[i], "--output-taco-path")) { arg_target = &output_taco_paths; } - else if (!strcmp(argv[i], "--input-waypoint-path")) { - arg_target = &input_waypoint_paths; + else if (!strcmp(argv[i], "--input-guildpoint-path")) { + arg_target = &input_guildpoint_paths; } - else if (!strcmp(argv[i], "--output-waypoint-path")) { - arg_target = &output_waypoint_paths; + else if (!strcmp(argv[i], "--output-guildpoint-path")) { + arg_target = &output_guildpoint_paths; } - else if (!strcmp(argv[i], "--output-split-waypoint-path")) { + else if (!strcmp(argv[i], "--output-split-guildpoint-path")) { // We dont actually support multiple values for this argument but // I am leaving this as-is because it is simpler. We can adjust the // CLI arg parsing later to properly capture this. - arg_target = &output_split_waypoint_paths; + arg_target = &output_split_guildpoint_paths; } else { arg_target->push_back(argv[i]); } } - // Strip all but the first output split waypoint argument, because we dont + // Strip all but the first output split guildpoint argument, because we dont // actually support multiple arguments. - string output_split_waypoint_dir = ""; - if (output_split_waypoint_paths.size() > 0) { - output_split_waypoint_dir = output_split_waypoint_paths[0]; + string output_split_guildpoint_dir = ""; + if (output_split_guildpoint_paths.size() > 0) { + output_split_guildpoint_dir = output_split_guildpoint_paths[0]; } - else if (output_split_waypoint_paths.size() > 1) { - cout << "Only one --output-split-waypoint-path is accepted" << endl; + else if (output_split_guildpoint_paths.size() > 1) { + cout << "Only one --output-split-guildpoint-path is accepted" << endl; } process_data( input_taco_paths, - input_waypoint_paths, + input_guildpoint_paths, output_taco_paths, - output_waypoint_paths, - output_split_waypoint_dir); + output_guildpoint_paths, + output_split_guildpoint_dir); return 0; } From cd209d558eaba50a670a0d77bc5808f17ca6808d Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sat, 21 Sep 2024 22:30:31 -0400 Subject: [PATCH 2/2] clang formating --- xml_converter/src/packaging_protobin.cpp | 2 +- xml_converter/src/packaging_protobin.hpp | 2 +- xml_converter/src/xml_converter.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/xml_converter/src/packaging_protobin.cpp b/xml_converter/src/packaging_protobin.cpp index 7d0dbc4e..2b2f0911 100644 --- a/xml_converter/src/packaging_protobin.cpp +++ b/xml_converter/src/packaging_protobin.cpp @@ -8,11 +8,11 @@ #include #include "category_gen.hpp" +#include "guildpoint.pb.h" #include "parseable.hpp" #include "state_structs/proto_writer_state.hpp" #include "string_helper.hpp" #include "string_hierarchy.hpp" -#include "guildpoint.pb.h" using namespace std; diff --git a/xml_converter/src/packaging_protobin.hpp b/xml_converter/src/packaging_protobin.hpp index dffad592..9cdc27a4 100644 --- a/xml_converter/src/packaging_protobin.hpp +++ b/xml_converter/src/packaging_protobin.hpp @@ -6,9 +6,9 @@ #include #include "category_gen.hpp" +#include "guildpoint.pb.h" #include "parseable.hpp" #include "string_hierarchy.hpp" -#include "guildpoint.pb.h" void read_protobuf_file( std::string proto_filepath, diff --git a/xml_converter/src/xml_converter.cpp b/xml_converter/src/xml_converter.cpp index 66f1418e..4dbeb2cc 100644 --- a/xml_converter/src/xml_converter.cpp +++ b/xml_converter/src/xml_converter.cpp @@ -19,6 +19,7 @@ #include "attribute/marker_category.hpp" #include "category_gen.hpp" #include "file_helper.hpp" +#include "guildpoint.pb.h" #include "icon_gen.hpp" #include "packaging_protobin.hpp" #include "packaging_xml.hpp" @@ -28,7 +29,6 @@ #include "rapidxml-1.13/rapidxml_utils.hpp" #include "string_helper.hpp" #include "trail_gen.hpp" -#include "guildpoint.pb.h" using namespace std;