// Copyright (c) 2023 Dominic Masters // // This software is released under the MIT License. // https://opensource.org/licenses/MIT #include "VnSceneParseHeader.hpp" using namespace Dawn; int32_t parseHeader(struct HeaderInformation *info, Xml *node) { auto itChildren = node->children.begin(); while(itChildren != node->children.end()) { auto c = *itChildren; int32_t ret = 0; if(c->node == "include") { ret = parseInclude(&info->includes, c); } else if(c->node == "character") { ret = parseCharacter(&info->characters, c); } else if(c->node == "scene") { ret = parseScene(&info->sceneInfo, c); } else if (c->node == "asset") { ret = parseAsset(&info->assets, c); } else { std::cout << "Parsing VN Scene header, unknown node " << c->node << std::endl; } if(ret != 0) return ret; ++itChildren; } return 0; }