mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-04-21 10:58:44 +00:00
wip
This commit is contained in:
@@ -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>(
|
||||
|
||||
26
src/ObjWriting/Game/T5/XAnim/XAnimDumperT5.cpp
Normal file
26
src/ObjWriting/Game/T5/XAnim/XAnimDumperT5.cpp
Normal 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
|
||||
13
src/ObjWriting/Game/T5/XAnim/XAnimDumperT5.h
Normal file
13
src/ObjWriting/Game/T5/XAnim/XAnimDumperT5.h
Normal 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
|
||||
Reference in New Issue
Block a user