mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-14 00:38:15 -05:00
Move XChunk processors to ZoneCommon
This commit is contained in:
@ -12,5 +12,21 @@ IZoneWriterFactory* ZoneWriterFactories[]
|
||||
|
||||
bool ZoneWriting::WriteZone(std::ostream& stream, Zone* zone)
|
||||
{
|
||||
return true;
|
||||
std::unique_ptr<ZoneWriter> zoneWriter;
|
||||
for (auto* factory : ZoneWriterFactories)
|
||||
{
|
||||
if(factory->SupportsZone(zone))
|
||||
{
|
||||
zoneWriter = factory->CreateWriter(zone);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (zoneWriter == nullptr)
|
||||
{
|
||||
printf("Could not create ZoneWriter for zone '%s'.\n", zone->m_name.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
return zoneWriter->WriteZone(stream);
|
||||
}
|
||||
|
Reference in New Issue
Block a user