Cleaned prefab parser a lot

This commit is contained in:
2023-03-29 18:44:28 -07:00
parent ec8ec5bbb4
commit 87c1ac3710
14 changed files with 311 additions and 152 deletions

View File

@@ -4,7 +4,27 @@
// https://opensource.org/licenses/MIT
#pragma once
#include "PrefabParser.hpp"
#include "PrefabComponentParser.hpp"
namespace Dawn {
}
struct PrefabChild {
struct PrefabRegistry *registry;
std::string ref;
std::string position;
std::string scale;
std::vector<struct PrefabComponent> components;
std::vector<struct PrefabChild> children;
};
class PrefabChildParser : public XmlParser<struct PrefabChild> {
protected:
std::vector<std::string> getRequiredAttributes() override;
std::map<std::string, std::string> getOptionalAttributes() override;
int32_t onParse(
Xml *node,
std::map<std::string, std::string> values,
struct PrefabChild *out,
std::string *error
) override;
};
}