mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-12 07:48:16 -05:00
Unlinker: Make parsing specified command line arguments its own class
This commit is contained in:
@ -8,7 +8,7 @@ class IZoneDumper
|
||||
public:
|
||||
virtual ~IZoneDumper() = default;
|
||||
|
||||
virtual bool CanHandleZone(Zone* zone) = 0;
|
||||
virtual bool DumpZone(Zone* zone, const std::string& basePath) = 0;
|
||||
virtual bool WriteZoneDefinition(Zone* zone, FileAPI::File* file, bool minimalistic) = 0;
|
||||
virtual bool CanHandleZone(Zone* zone) const = 0;
|
||||
virtual bool DumpZone(Zone* zone, const std::string& basePath) const = 0;
|
||||
virtual bool WriteZoneDefinition(Zone* zone, FileAPI::File* file) const = 0;
|
||||
};
|
@ -10,12 +10,12 @@
|
||||
#include "AssetDumpers/AssetDumperLocalizeEntry.h"
|
||||
#include "AssetDumpers/AssetDumperGfxImage.h"
|
||||
|
||||
bool ZoneDumperT6::CanHandleZone(Zone* zone)
|
||||
bool ZoneDumperT6::CanHandleZone(Zone* zone) const
|
||||
{
|
||||
return zone->m_game == &g_GameT6;
|
||||
}
|
||||
|
||||
bool ZoneDumperT6::DumpZone(Zone* zone, const std::string& basePath)
|
||||
bool ZoneDumperT6::DumpZone(Zone* zone, const std::string& basePath) const
|
||||
{
|
||||
#define DUMP_ASSET_POOL(dumperType, poolName) \
|
||||
if(assetPools->poolName) \
|
||||
@ -80,7 +80,7 @@ bool ZoneDumperT6::DumpZone(Zone* zone, const std::string& basePath)
|
||||
#undef DUMP_ASSET_POOL
|
||||
}
|
||||
|
||||
bool ZoneDumperT6::WriteZoneDefinition(Zone* zone, FileAPI::File* file, bool minimalistic)
|
||||
bool ZoneDumperT6::WriteZoneDefinition(Zone* zone, FileAPI::File* file) const
|
||||
{
|
||||
return true;
|
||||
}
|
@ -4,7 +4,7 @@
|
||||
class ZoneDumperT6 final : public IZoneDumper
|
||||
{
|
||||
public:
|
||||
bool CanHandleZone(Zone* zone) override;
|
||||
bool DumpZone(Zone* zone, const std::string& basePath) override;
|
||||
bool WriteZoneDefinition(Zone* zone, FileAPI::File* file, bool minimalistic) override;
|
||||
bool CanHandleZone(Zone* zone) const override;
|
||||
bool DumpZone(Zone* zone, const std::string& basePath) const override;
|
||||
bool WriteZoneDefinition(Zone* zone, FileAPI::File* file) const override;
|
||||
};
|
||||
|
@ -2,14 +2,16 @@
|
||||
#include "Dumping/IZoneDumper.h"
|
||||
#include "Game/T6/ZoneDumperT6.h"
|
||||
|
||||
IZoneDumper* zoneDumper[]
|
||||
ObjWriting::Configuration_t ObjWriting::Configuration;
|
||||
|
||||
const IZoneDumper* const ZONE_DUMPER[]
|
||||
{
|
||||
new ZoneDumperT6()
|
||||
};
|
||||
|
||||
bool ObjWriting::DumpZone(Zone* zone, const std::string& basePath)
|
||||
{
|
||||
for (auto dumper : zoneDumper)
|
||||
for (auto dumper : ZONE_DUMPER)
|
||||
{
|
||||
if (dumper->CanHandleZone(zone))
|
||||
{
|
||||
@ -26,7 +28,7 @@ bool ObjWriting::DumpZone(Zone* zone, const std::string& basePath)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ObjWriting::WriteZoneDefinition(Zone* zone, FileAPI::File* file, bool minimalistic)
|
||||
bool ObjWriting::WriteZoneDefinition(Zone* zone, FileAPI::File* file)
|
||||
{
|
||||
return file->Printf("// %s", "Insert zone definition here") > 0;
|
||||
}
|
@ -7,6 +7,21 @@
|
||||
class ObjWriting
|
||||
{
|
||||
public:
|
||||
static class Configuration_t
|
||||
{
|
||||
public:
|
||||
enum class ImageOutputFormat_e
|
||||
{
|
||||
DDS,
|
||||
IWI
|
||||
};
|
||||
|
||||
bool Verbose = false;
|
||||
ImageOutputFormat_e ImageOutputFormat = ImageOutputFormat_e::DDS;
|
||||
bool MinimalZoneFileOutput = false;
|
||||
|
||||
} Configuration;
|
||||
|
||||
static bool DumpZone(Zone* zone, const std::string& basePath);
|
||||
static bool WriteZoneDefinition(Zone* zone, FileAPI::File* file, bool minimalistic);
|
||||
static bool WriteZoneDefinition(Zone* zone, FileAPI::File* file);
|
||||
};
|
||||
|
Reference in New Issue
Block a user