metaforce/DataSpec/DNACommon/SAVWCommon.hpp

53 lines
865 B
C++
Raw Normal View History

2018-10-07 03:42:33 +00:00
#pragma once
2016-07-24 01:51:15 +00:00
#include "DNACommon.hpp"
2016-07-24 02:07:36 +00:00
#include "PAK.hpp"
2016-07-24 01:51:15 +00:00
2017-12-29 08:08:12 +00:00
namespace DataSpec::SAVWCommon
2016-07-24 01:51:15 +00:00
{
enum class EScanCategory
{
None,
Data,
Lore,
Creature,
2017-05-14 19:58:44 +00:00
Research,
Artifact
2016-07-24 01:51:15 +00:00
};
2018-02-22 07:24:51 +00:00
struct Header : BigDNA
2016-07-24 01:51:15 +00:00
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-07-24 01:51:15 +00:00
Value<atUint32> magic;
Value<atUint32> version;
Value<atUint32> areaCount;
};
2018-02-22 07:24:51 +00:00
struct EnvironmentVariable : BigDNA
2016-07-24 01:51:15 +00:00
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-07-24 01:51:15 +00:00
String<-1> name;
Value<atUint32> unk1;
Value<atUint32> unk2;
Value<atUint32> unk3;
};
2018-02-22 07:24:51 +00:00
struct Layer : BigDNA
2016-07-24 01:51:15 +00:00
{
2018-02-22 07:24:51 +00:00
AT_DECL_DNA_YAML
2016-07-24 01:51:15 +00:00
Value<atUint32> areaId;
Value<atUint32> layer;
};
2016-07-24 02:07:36 +00:00
template <class SAVW>
static bool ExtractSAVW(PAKEntryReadStream& rs, const hecl::ProjectPath& outPath)
{
SAVW savw;
savw.read(rs);
2016-08-22 03:47:48 +00:00
athena::io::FileWriter writer(outPath.getAbsolutePath());
2018-02-22 07:24:51 +00:00
athena::io::ToYAMLStream(savw, writer);
2016-07-24 02:07:36 +00:00
return true;
}
2016-07-24 01:51:15 +00:00
}