mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-20 16:15:43 +00:00
ZoneLoading: Make ZoneDumper also generate a game specific zone file
This commit is contained in:
parent
73489ee455
commit
d220aa8fde
@ -1,12 +1,14 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Zone/Zone.h"
|
#include "Zone/Zone.h"
|
||||||
|
#include "Utils/FileAPI.h"
|
||||||
|
|
||||||
class IZoneDumper
|
class IZoneDumper
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~IZoneDumper() = default;
|
virtual ~IZoneDumper() = default;
|
||||||
|
|
||||||
virtual bool CanDumpZone(Zone* zone) = 0;
|
virtual bool CanHandleZone(Zone* zone) = 0;
|
||||||
virtual bool DumpZone(Zone* zone, const std::string& basePath) = 0;
|
virtual bool DumpZone(Zone* zone, const std::string& basePath) = 0;
|
||||||
|
virtual bool WriteZoneDefinition(Zone* zone, FileAPI::File* file, bool minimalistic) = 0;
|
||||||
};
|
};
|
@ -7,7 +7,7 @@
|
|||||||
#include "AssetDumpers/AssetDumperQdb.h"
|
#include "AssetDumpers/AssetDumperQdb.h"
|
||||||
#include "AssetDumpers/AssetDumperScriptParseTree.h"
|
#include "AssetDumpers/AssetDumperScriptParseTree.h"
|
||||||
|
|
||||||
bool ZoneDumperT6::CanDumpZone(Zone* zone)
|
bool ZoneDumperT6::CanHandleZone(Zone* zone)
|
||||||
{
|
{
|
||||||
return zone->m_game == &game_t6;
|
return zone->m_game == &game_t6;
|
||||||
}
|
}
|
||||||
@ -76,3 +76,8 @@ bool ZoneDumperT6::DumpZone(Zone* zone, const std::string& basePath)
|
|||||||
|
|
||||||
#undef DUMP_ASSET_POOL
|
#undef DUMP_ASSET_POOL
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ZoneDumperT6::WriteZoneDefinition(Zone* zone, FileAPI::File* file, bool minimalistic)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
@ -4,6 +4,7 @@
|
|||||||
class ZoneDumperT6 final : public IZoneDumper
|
class ZoneDumperT6 final : public IZoneDumper
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
bool CanDumpZone(Zone* zone) override;
|
bool CanHandleZone(Zone* zone) override;
|
||||||
bool DumpZone(Zone* zone, const std::string& basePath) override;
|
bool DumpZone(Zone* zone, const std::string& basePath) override;
|
||||||
|
bool WriteZoneDefinition(Zone* zone, FileAPI::File* file, bool minimalistic) override;
|
||||||
};
|
};
|
||||||
|
@ -54,7 +54,7 @@ bool ZoneLoading::DumpZone(Zone* zone, const std::string& basePath)
|
|||||||
{
|
{
|
||||||
for(auto dumper : zoneDumper)
|
for(auto dumper : zoneDumper)
|
||||||
{
|
{
|
||||||
if(dumper->CanDumpZone(zone))
|
if(dumper->CanHandleZone(zone))
|
||||||
{
|
{
|
||||||
if(dumper->DumpZone(zone, basePath))
|
if(dumper->DumpZone(zone, basePath))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user