2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 21:47:59 +00:00

Initial HINT support

This commit is contained in:
2016-09-07 19:01:29 -07:00
parent 9b436b4b23
commit f5db2527e4
11 changed files with 202 additions and 5 deletions

View File

@@ -8,7 +8,8 @@ make_dnalist(liblist
CSKR
MREA
SAVW
CAUD)
CAUD
HINT)
add_library(DNAMP3
DNAMP3.hpp DNAMP3.cpp
${liblist}

View File

@@ -10,6 +10,7 @@
#include "MREA.hpp"
#include "MAPA.hpp"
#include "SAVW.hpp"
#include "HINT.hpp"
#include "../DNACommon/TXTR.hpp"
#include "../DNACommon/FONT.hpp"
#include "../DNACommon/FSM2.hpp"
@@ -236,6 +237,8 @@ ResExtractor<PAKBridge> PAKBridge::LookupExtractor(const PAK& pak, const PAK::En
return {TXTR::Extract, nullptr, {_S(".png")}};
case SBIG('SAVW'):
return {SAVWCommon::ExtractSAVW<SAVW>, nullptr, {_S(".yaml")}};
case SBIG('HINT'):
return {HINT::Extract, nullptr, {_S(".yaml")}};
case SBIG('CMDL'):
return {nullptr, CMDL::Extract, {_S(".blend")}, 1};
case SBIG('CHAR'):

52
DataSpec/DNAMP3/HINT.hpp Normal file
View File

@@ -0,0 +1,52 @@
#ifndef _DNAMP3_HINT_HPP_
#define _DNAMP3_HINT_HPP_
#include "../DNACommon/DNACommon.hpp"
#include "PAK.hpp"
namespace DataSpec
{
namespace DNAMP3
{
struct HINT : BigYAML
{
DECL_YAML
Value<atUint32> magic;
Value<atUint32> version;
struct Hint : BigYAML
{
DECL_YAML
String<-1> name;
Value<float> unknown1;
Value<float> fadeInTime;
UniqueID64 stringID;
Value<atUint32> unknown2;
struct Location : BigYAML
{
DECL_YAML
UniqueID64 worldAssetID;
UniqueID64 areaAssetID;
Value<atUint32> areaID;
UniqueID64 stringID;
Value<atUint32> unknown[3];
};
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;
}
};
}
}
#endif // _DNAMP1_HINT_HPP_