chore: use RawTemplater to template XModel loading code for t5 and t6

This commit is contained in:
Jan
2024-09-14 12:21:43 +02:00
parent a2735b4f23
commit 7227c84cde
17 changed files with 192 additions and 142 deletions

View File

@ -0,0 +1,33 @@
#pragma once
#include "Json/JsonCommon.h"
#include <memory>
#include <optional>
#include <string>
#include <vector>
namespace T6
{
class JsonXModelLod
{
public:
std::string file;
float distance;
};
NLOHMANN_DEFINE_TYPE_EXTENSION(JsonXModelLod, file, distance);
class JsonXModel
{
public:
std::vector<JsonXModelLod> lods;
std::optional<int> collLod;
std::optional<std::string> physPreset;
std::optional<std::string> physConstraints;
unsigned flags;
JsonVec3 lightingOriginOffset;
float lightingOriginRange;
};
NLOHMANN_DEFINE_TYPE_EXTENSION(JsonXModel, lods, collLod, physPreset, physConstraints, flags, lightingOriginOffset, lightingOriginRange);
} // namespace T6