2016-09-08 02:01:29 +00:00
|
|
|
#ifndef _DNAMP1_HINT_HPP_
|
|
|
|
#define _DNAMP1_HINT_HPP_
|
|
|
|
|
|
|
|
#include "../DNACommon/DNACommon.hpp"
|
|
|
|
#include "../DNACommon/PAK.hpp"
|
|
|
|
|
2017-12-29 08:08:12 +00:00
|
|
|
namespace DataSpec::DNAMP1
|
2016-09-08 02:01:29 +00:00
|
|
|
{
|
|
|
|
struct HINT : BigYAML
|
|
|
|
{
|
|
|
|
DECL_YAML
|
|
|
|
Value<atUint32> magic;
|
|
|
|
Value<atUint32> version;
|
|
|
|
|
|
|
|
struct Hint : BigYAML
|
|
|
|
{
|
|
|
|
DECL_YAML
|
|
|
|
String<-1> name;
|
2017-02-18 02:19:50 +00:00
|
|
|
Value<float> immediateTime;
|
|
|
|
Value<float> normalTime;
|
2016-09-08 02:01:29 +00:00
|
|
|
UniqueID32 stringID;
|
2017-02-19 09:27:01 +00:00
|
|
|
Value<atUint32> textPageCount;
|
2016-09-08 02:01:29 +00:00
|
|
|
struct Location : BigYAML
|
|
|
|
{
|
|
|
|
DECL_YAML
|
|
|
|
UniqueID32 worldAssetID;
|
|
|
|
UniqueID32 areaAssetID;
|
|
|
|
Value<atUint32> areaID;
|
|
|
|
UniqueID32 stringID;
|
|
|
|
};
|
|
|
|
|
|
|
|
Value<atUint32> locationCount;
|
|
|
|
Vector<Location, DNA_COUNT(locationCount)> locations;
|
|
|
|
};
|
|
|
|
Value<atUint32> hintCount;
|
|
|
|
Vector<Hint, DNA_COUNT(hintCount)> hints;
|
|
|
|
|
|
|
|
|
|
|
|
static bool Extract(PAKEntryReadStream& rs, const hecl::ProjectPath& outPath)
|
|
|
|
{
|
|
|
|
HINT hint;
|
|
|
|
hint.read(rs);
|
|
|
|
athena::io::FileWriter writer(outPath.getAbsolutePath());
|
|
|
|
hint.toYAMLStream(writer);
|
|
|
|
return true;
|
|
|
|
}
|
2016-09-10 04:50:00 +00:00
|
|
|
|
|
|
|
static bool Cook(const hecl::ProjectPath& inPath, const hecl::ProjectPath& outPath)
|
|
|
|
{
|
|
|
|
HINT hint;
|
|
|
|
athena::io::FileReader reader(inPath.getAbsolutePath());
|
|
|
|
hint.fromYAMLStream(reader);
|
|
|
|
athena::io::FileWriter ws(outPath.getAbsolutePath());
|
|
|
|
hint.write(ws);
|
|
|
|
return true;
|
|
|
|
}
|
2016-09-08 02:01:29 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
#endif // _DNAMP1_HINT_HPP_
|