Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[XML Markers] Convert XML Parser Standalone Binary to GDNative Library #79

Open
Tracked by #64
AsherGlick opened this issue Jul 25, 2022 · 1 comment
Open
Tracked by #64
Labels
enhancement New feature or request

Comments

@AsherGlick
Copy link
Owner

AsherGlick commented Jul 25, 2022

Eventually the XML parser needs to have hooks that are callable from inside gdscript. The best way for this to happen is to migrate the C++ Standalone XML parser to instead be compiled as a gdnative library.

@AsherGlick AsherGlick added the enhancement New feature or request label Jul 25, 2022
@AsherGlick
Copy link
Owner Author

The API for this interface should be pretty similar to what is possible over a theoretical CLI interface.

We want to have these four functions

  • read_taco(file)
  • write_taco(file, root_category)
  • read_waypoint_file(file)
  • write_waypoint_file(file, root category, mapid)

So if we were to make a single interface that could be called via ipc or the cli it could look like this:

struct TacoOutput{
    string file; // A .zip, .taco file or a folder
    ? root_category; // Some variable denoting the category
}
struct WaypointOutput {
    string file; // A ?.waypoint? or a folder
    ? root_category: // Some variable denoting the category
    int32 mapid_filter; // A way to filter out data not in a map
}


void run(
    vector<string> xml_inputs
    vector<TacoOutput> xml_outputs,
    vector<string> waypoint_inputs
    vector<WaypointOutput> waypoint_outputs
) {
    for (xml_input in xml_inputs) {
        read_taco(xml_input);
    }
    for (waypoint_input in waypoint_inputs) {
        load_waypoint(waypoint_input);
    }
    for (xml_output in xml_outputs) {
        write_taco(xml_output.file, xml_output.root_category);
    }
    for (waypoint_output in waypoint_outputs) {
        write_waypoint(waypoint_output.file, waypoint_output.root_category, waypoint_output.mapid_filter);
    }
}

The type of the marker category identifier will be determined after the protobuf schema as it exists today is finalized, because it is changing how marker categories are stored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant