2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-09-04 07:47:25 +00:00

refactor: streamline slug, qdb and script dumper

This commit is contained in:
Jan Laupetin
2025-07-30 21:41:39 +01:00
parent bcb52391dc
commit 0eb14890ab
14 changed files with 122 additions and 110 deletions

View File

@@ -0,0 +1,23 @@
#include "QdbDumperT6.h"
using namespace T6;
namespace T6::qdb
{
bool Dumper::ShouldDump(XAssetInfo<Qdb>* asset)
{
return true;
}
void Dumper::DumpAsset(AssetDumpingContext& context, XAssetInfo<Qdb>* asset)
{
const auto* qdb = asset->Asset();
const auto assetFile = context.OpenAssetFile(asset->m_name);
if (!assetFile)
return;
auto& stream = *assetFile;
stream.write(qdb->buffer, qdb->len);
}
} // namespace T6::qdb