Moved C++ tools out
This commit is contained in:
34
archive/dawntools/util/parser/SceneAssetParser.hpp
Normal file
34
archive/dawntools/util/parser/SceneAssetParser.hpp
Normal file
@ -0,0 +1,34 @@
|
||||
// Copyright (c) 2023 Dominic Masters
|
||||
//
|
||||
// This software is released under the MIT License.
|
||||
// https://opensource.org/licenses/MIT
|
||||
|
||||
#pragma once
|
||||
#include "util/XmlParser.hpp"
|
||||
|
||||
namespace Dawn {
|
||||
enum SceneAssetType {
|
||||
SCENE_ASSET_TYPE_TEXTURE,
|
||||
SCENE_ASSET_TYPE_TRUETYPE_FONT
|
||||
};
|
||||
|
||||
struct SceneAsset {
|
||||
SceneAssetType type;
|
||||
std::string fileName;
|
||||
std::string usageName;
|
||||
std::string ref;
|
||||
};
|
||||
|
||||
class SceneAssetParser : public XmlParser<SceneAsset> {
|
||||
public:
|
||||
virtual std::vector<std::string> getRequiredAttributes();
|
||||
virtual std::map<std::string, std::string> getOptionalAttributes();
|
||||
|
||||
virtual int32_t onParse(
|
||||
Xml *node,
|
||||
std::map<std::string, std::string> values,
|
||||
struct SceneAsset *out,
|
||||
std::string *error
|
||||
);
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user