Make dumpers works as gdt dumpers and raw dumpers

This commit is contained in:
Jan
2021-03-06 13:25:08 +01:00
parent fc59a09d02
commit ea7b1eadae
46 changed files with 783 additions and 449 deletions

View File

@ -1,17 +1,26 @@
#pragma once
#include "Dumping/AbstractFileDumper.h"
#include "Dumping/AbstractAssetDumper.h"
#include "Game/T6/T6.h"
#include "Utils/InfoString.h"
namespace T6
{
class AssetDumperPhysConstraints final : public AbstractFileDumper<PhysConstraints>
class AssetDumperPhysConstraints final : public AbstractAssetDumper<PhysConstraints>
{
static constexpr const char* FILE_TYPE_STR = "PHYSCONSTRAINTS";
static constexpr const char* GDF_NAME = "physconstraints.gdf";
static cspField_t phys_constraints_fields[];
static InfoString CreateInfoString(XAssetInfo<PhysConstraints>* asset);
protected:
bool ShouldDump(XAssetInfo<PhysConstraints>* asset) override;
bool CanDumpAsRaw() override;
bool CanDumpAsGdtEntry() override;
std::string GetFileNameForAsset(Zone* zone, XAssetInfo<PhysConstraints>* asset) override;
void DumpAsset(AssetDumpingContext& context, XAssetInfo<PhysConstraints>* asset, std::ostream& stream) override;
GdtEntry DumpGdtEntry(AssetDumpingContext& context, XAssetInfo<PhysConstraints>* asset) override;
void DumpRaw(AssetDumpingContext& context, XAssetInfo<PhysConstraints>* asset, std::ostream& stream) override;
};
}