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

Use template function for SAVW

This commit is contained in:
2016-07-23 19:07:36 -07:00
parent b188c4892a
commit 162994ca39
7 changed files with 16 additions and 33 deletions

View File

@@ -1,6 +1,7 @@
#ifndef __COMMON_SAVWCOMMON_HPP__
#define __COMMON_SAVWCOMMON_HPP__
#include "DNACommon.hpp"
#include "PAK.hpp"
namespace DataSpec
{
@@ -38,6 +39,18 @@ struct Layer : BigYAML
Value<atUint32> areaId;
Value<atUint32> layer;
};
template <class SAVW>
static bool ExtractSAVW(PAKEntryReadStream& rs, const hecl::ProjectPath& outPath)
{
SAVW savw;
savw.read(rs);
FILE* fp = hecl::Fopen(outPath.getAbsolutePath().c_str(), _S("wb"));
savw.toYAMLFile(fp);
fclose(fp);
return true;
}
}
}