AsherGlick / Burrito

An overlay tool for Guild Wars 2 that works on linux
GNU General Public License v2.0
79 stars 18 forks source link

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

Open AsherGlick opened 2 years ago

AsherGlick commented 2 years ago

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 commented 1 year ago

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

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.