Moved C++ tools out
This commit is contained in:
28
archive/dawntools/prefabtool/PrefabParser.cpp
Normal file
28
archive/dawntools/prefabtool/PrefabParser.cpp
Normal file
@ -0,0 +1,28 @@
|
||||
// Copyright (c) 2023 Dominic Masters
|
||||
//
|
||||
// This software is released under the MIT License.
|
||||
// https://opensource.org/licenses/MIT
|
||||
|
||||
#include "PrefabParser.hpp"
|
||||
|
||||
using namespace Dawn;
|
||||
|
||||
std::vector<std::string> PrefabParser::getRequiredAttributes() {
|
||||
return { "name", "type" };
|
||||
}
|
||||
|
||||
std::map<std::string, std::string> PrefabParser::getOptionalAttributes() {
|
||||
return { };
|
||||
}
|
||||
|
||||
int32_t PrefabParser::onParse(
|
||||
Xml *node,
|
||||
std::map<std::string, std::string> values,
|
||||
struct Prefab *out,
|
||||
std::string *error
|
||||
) {
|
||||
out->name = values["name"];
|
||||
out->type = values["type"];
|
||||
out->root.registry = out->registry;
|
||||
return (SceneItemParser()).parse(node, &out->root, error);
|
||||
}
|
Reference in New Issue
Block a user