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:
23
src/ObjWriting/Game/T6/Qdb/QdbDumperT6.cpp
Normal file
23
src/ObjWriting/Game/T6/Qdb/QdbDumperT6.cpp
Normal 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
|
Reference in New Issue
Block a user