2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2026-04-21 10:58:44 +00:00
This commit is contained in:
Jan Laupetin
2026-03-21 12:17:00 +01:00
parent 6d6ce20919
commit d79ad412fd
3 changed files with 41 additions and 1 deletions

View File

@@ -7,6 +7,7 @@
#include "Localize/LocalizeDumperT5.h"
#include "RawFile/RawFileDumperT5.h"
#include "StringTable/StringTableDumperT5.h"
#include "XAnim/XAnimDumperT5.h"
using namespace T5;
@@ -15,7 +16,7 @@ void ObjWriter::RegisterAssetDumpers(AssetDumpingContext& context)
// REGISTER_DUMPER(AssetDumperPhysPreset, m_phys_preset)
// REGISTER_DUMPER(AssetDumperPhysConstraints, m_phys_constraints)
// REGISTER_DUMPER(AssetDumperDestructibleDef, m_destructible_def)
// REGISTER_DUMPER(AssetDumperXAnimParts, m_xanim_parts)
RegisterAssetDumper(std::make_unique<xanim::DumperT5>());
RegisterAssetDumper(std::make_unique<xmodel::DumperT5>());
RegisterAssetDumper(std::make_unique<material::JsonDumperT5>());
RegisterAssetDumper(std::make_unique<techset::DumperT5>(

View File

@@ -0,0 +1,26 @@
#include "XAnimDumperT5.h"
#include "Utils/Logging/Log.h"
using namespace T5;
namespace xanim
{
void DumperT5::DumpAsset(AssetDumpingContext& context, const XAssetInfo<AssetXAnim::Type>& asset)
{
auto* anim = asset.Asset();
const auto& scriptStrings = context.m_zone.m_script_strings;
con::info("Anim {}", anim->name);
if (anim->names)
{
for (auto boneIndex = 0u; boneIndex < anim->boneCount[PART_TYPE_ALL]; boneIndex++)
{
const auto* boneName = scriptStrings.CValue(anim->names[boneIndex]);
con::info(" Bone {}: {}", boneIndex, boneName ? boneName : "<nullptr>");
}
}
con::info("");
}
} // namespace xanim

View File

@@ -0,0 +1,13 @@
#pragma once
#include "Dumping/AbstractAssetDumper.h"
#include "Game/T5/T5.h"
namespace xanim
{
class DumperT5 final : public AbstractAssetDumper<T5::AssetXAnim>
{
protected:
void DumpAsset(AssetDumpingContext& context, const XAssetInfo<T5::AssetXAnim::Type>& asset) override;
};
} // namespace xanim