2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 11:07:44 +00:00

Began migration to MLVL blend representation

This commit is contained in:
Jack Andersen
2015-10-23 15:23:45 -10:00
parent 07392938d8
commit b207db8c27
13 changed files with 159 additions and 47 deletions

View File

@@ -9,6 +9,7 @@
#include "CINF.hpp"
#include "CSKR.hpp"
#include "ANIM.hpp"
#include "Athena/FileReader.hpp"
namespace Retro
{
@@ -418,6 +419,20 @@ struct ANCS : BigYAML
const HECL::ProjectPath& inPath,
const DNAANCS::Actor& actor)
{
/* Search for yaml */
HECL::ProjectPath yamlPath = inPath.getWithExtension(_S(".yaml"), true);
if (yamlPath.getPathType() != HECL::ProjectPath::PT_FILE)
Log.report(LogVisor::FatalError, _S("'%s' not found as file"),
yamlPath.getRelativePath().c_str());
Athena::io::FileReader yamlReader(yamlPath.getAbsolutePath());
if (!BigYAML::ValidateFromYAMLFile<ANCS>(yamlReader))
Log.report(LogVisor::FatalError, _S("'%s' is not Retro::DNAMP1::ANCS type"),
yamlPath.getRelativePath().c_str());
ANCS ancs;
ancs.read(yamlReader);
return true;
}
};