YAML update

This commit is contained in:
Jack Andersen 2015-08-01 18:25:38 -10:00
parent df2adc10da
commit a3db545b01
2 changed files with 12 additions and 0 deletions

View File

@ -55,6 +55,8 @@ ResExtractor PAKBridge::LookupExtractor(const PAK::Entry& entry)
return {TXTR::Extract, ".png"};
case SBIG('CMDL'):
return {CMDL::Extract, ".blend", 1};
case SBIG('MLVL'):
return {MLVL::Extract, ".yaml"};
}
return {};
}

View File

@ -103,6 +103,16 @@ struct MLVL : BigYAML
Value<atUint32> layerNameOffsetCount;
Vector<atUint32, DNA_COUNT(layerNameOffsetCount)> layerNameOffsets;
static bool Extract(PAKEntryReadStream& rs, const HECL::ProjectPath& outPath)
{
MLVL mlvl;
mlvl.read(rs);
FILE* fp = HECL::Fopen(outPath.getAbsolutePath().c_str(), _S("wb"));
mlvl.toYAMLFile(fp);
fclose(fp);
return true;
}
};
}