mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-14 08:47:57 -05:00
ZoneLoading: Extract all obj dumping relevant parts to ObjWriting component
This commit is contained in:
@ -1,20 +1,12 @@
|
||||
#include "ZoneLoading.h"
|
||||
#include "Utils/PathUtils.h"
|
||||
#include "Dumping/IZoneDumper.h"
|
||||
|
||||
#include "Game/T6/ZoneLoaderFactoryT6.h"
|
||||
#include "Game/T6/ZoneDumperT6.h"
|
||||
|
||||
IZoneLoaderFactory* zoneLoaderFactories[]
|
||||
{
|
||||
new ZoneLoaderFactoryT6()
|
||||
};
|
||||
|
||||
IZoneDumper* zoneDumper[]
|
||||
{
|
||||
new ZoneDumperT6()
|
||||
};
|
||||
|
||||
Zone* ZoneLoading::LoadZone(const std::string& path)
|
||||
{
|
||||
std::string zoneName = utils::Path::GetFilenameWithoutExtension(path);
|
||||
@ -48,28 +40,4 @@ Zone* ZoneLoading::LoadZone(const std::string& path)
|
||||
|
||||
file.Close();
|
||||
return loadedZone;
|
||||
}
|
||||
|
||||
bool ZoneLoading::DumpZone(Zone* zone, const std::string& basePath)
|
||||
{
|
||||
for(auto dumper : zoneDumper)
|
||||
{
|
||||
if(dumper->CanHandleZone(zone))
|
||||
{
|
||||
if(dumper->DumpZone(zone, basePath))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
printf("Dumper for zone '%s' failed!\n", zone->m_name.c_str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ZoneLoading::WriteZoneDefinition(Zone* zone, FileAPI::File* file, bool minimalistic)
|
||||
{
|
||||
return file->Printf("// %s", "Insert zone definition here") > 0;
|
||||
}
|
Reference in New Issue
Block a user