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
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
namespace DataSpec::SAVWCommon {
|
|
|
|
enum class EScanCategory { None, Data, Lore, Creature, Research, Artifact };
|
2016-07-24 01:51:15 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
struct Header : BigDNA {
|
|
|
|
AT_DECL_DNA_YAML
|
|
|
|
Value<atUint32> magic;
|
|
|
|
Value<atUint32> version;
|
|
|
|
Value<atUint32> areaCount;
|
2016-07-24 01:51:15 +00:00
|
|
|
};
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
struct EnvironmentVariable : BigDNA {
|
|
|
|
AT_DECL_DNA_YAML
|
|
|
|
String<-1> name;
|
|
|
|
Value<atUint32> unk1;
|
|
|
|
Value<atUint32> unk2;
|
|
|
|
Value<atUint32> unk3;
|
2016-07-24 01:51:15 +00:00
|
|
|
};
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
struct Layer : BigDNA {
|
|
|
|
AT_DECL_DNA_YAML
|
|
|
|
Value<atUint32> areaId;
|
|
|
|
Value<atUint32> layer;
|
2016-07-24 01:51:15 +00:00
|
|
|
};
|
2016-07-24 02:07:36 +00:00
|
|
|
|
|
|
|
template <class SAVW>
|
2018-12-08 05:30:43 +00:00
|
|
|
static bool ExtractSAVW(PAKEntryReadStream& rs, const hecl::ProjectPath& outPath) {
|
|
|
|
SAVW savw;
|
|
|
|
savw.read(rs);
|
|
|
|
athena::io::FileWriter writer(outPath.getAbsolutePath());
|
|
|
|
athena::io::ToYAMLStream(savw, writer);
|
|
|
|
return true;
|
2016-07-24 01:51:15 +00:00
|
|
|
}
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
} // namespace DataSpec::SAVWCommon
|