1
0
mirror of https://github.com/borgesdan/xn65 synced 2024-12-29 21:54:47 +01:00

Corrige Cmakelist e adiciona tinyxml2

This commit is contained in:
Danilo 2024-11-16 19:07:04 -03:00
parent 31c9cdfb3e
commit 38fbc5ea59
4 changed files with 2420 additions and 5 deletions

View File

@ -24,7 +24,7 @@ namespace xna {
//Accesses a statically typed ContentImporter instance from generic code using dynamic typing.
struct IContentImporter {
//Imports an asset from the specified file.
virtual std::any Import(std::string const& filename, ContentImporterContext& context) = 0;
virtual std::any ImportObject(std::string const& filename, ContentImporterContext& context) = 0;
};
//Implements a file format importer for use with game assets.
@ -34,15 +34,15 @@ namespace xna {
virtual T Import(std::string const& filename, ContentImporterContext& context) = 0;
//Imports an asset from the specified file.
std::any Import(std::string const& filename, ContentImporterContext& context) override {
std::any obj = Import<T>(filename, context);
std::any ImportObject(std::string const& filename, ContentImporterContext& context) override {
std::any obj = Import(filename, context);
return obj;
}
};
//rovides properties that identify and provide metadata about the importer, such as supported file extensions and caching information.
struct ContentImporterAttribute {
bool CacheImportedData;
bool CacheImportedData{ false };
std::string DisplayName;
std::string DefaultProcessor;
@ -62,6 +62,25 @@ namespace xna {
private:
std::vector<std::string> fileExtensions;
};
struct ImporterRegistration {
inline static auto Importers = std::vector<IContentImporter>();
};
class ImporterManager {
public:
private:
};
struct XmlImporter : ContentImporter_T<std::any> {
std::any Import(std::string const& filename, ContentImporterContext& context) override {
//TODO: XmlReader
return { };
}
};
}
#endif

2380
includes/tinyxml2.h Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,12 @@
#ifndef XNA_CSHARP_XML_HPP
#define XNA_CSHARP_XML_HPP
namespace xna {
class XmlReader {
};
}
#endif

View File

@ -17,9 +17,13 @@ add_library (Xn65 STATIC
"common/gjk.cpp"
"common/numerics.cpp"
"common/packedvalue.cpp"
"graphics/displaymode"
"graphics/displaymode.cpp"
"exception.cpp")
if (CMAKE_VERSION VERSION_GREATER 3.12)
set_property(TARGET Xn65 PROPERTY CXX_STANDARD 20)
endif()
#find_package(tinyxml2 CONFIG REQUIRED)
target_link_libraries(Xn65 "${PROJECT_VCPKG_DIRECTORY}/installed/x64-windows/lib/tinyxml2.lib")