mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-11 07:18:11 -05:00
chore: use IObjWriter directly instead of indirection of ObjWriting
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
#include "ContentLister/ContentPrinter.h"
|
||||
#include "ContentLister/ZoneDefWriter.h"
|
||||
#include "IObjLoader.h"
|
||||
#include "IObjWriter.h"
|
||||
#include "ObjContainer/IWD/IWD.h"
|
||||
#include "ObjLoading.h"
|
||||
#include "ObjWriting.h"
|
||||
@ -288,13 +289,22 @@ private:
|
||||
}
|
||||
|
||||
UpdateAssetIncludesAndExcludes(context);
|
||||
ObjWriting::DumpZone(context);
|
||||
|
||||
const auto* objWriter = IObjWriter::GetObjWriterForGame(zone.m_game->GetId());
|
||||
|
||||
auto result = objWriter->DumpZone(context);
|
||||
|
||||
if (m_args.m_use_gdt)
|
||||
{
|
||||
context.m_gdt->EndStream();
|
||||
gdtStream.close();
|
||||
}
|
||||
|
||||
if (!result)
|
||||
{
|
||||
std::cerr << "Dumping zone failed!\n";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user