mirror of https://github.com/AxioDL/metaforce.git
Add SAVW DNAs
This commit is contained in:
parent
9298ca7b99
commit
b188c4892a
|
@ -2,6 +2,7 @@ make_dnalist(liblist
|
|||
CMDL
|
||||
MAPA
|
||||
EGMC
|
||||
SAVWCommon
|
||||
ParticleCommon)
|
||||
|
||||
add_library(DNACommon
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
#ifndef __COMMON_SAVWCOMMON_HPP__
|
||||
#define __COMMON_SAVWCOMMON_HPP__
|
||||
#include "DNACommon.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace SAVWCommon
|
||||
{
|
||||
enum class EScanCategory
|
||||
{
|
||||
None,
|
||||
Data,
|
||||
Lore,
|
||||
Creature,
|
||||
Research
|
||||
};
|
||||
|
||||
struct Header : BigYAML
|
||||
{
|
||||
DECL_YAML
|
||||
Value<atUint32> magic;
|
||||
Value<atUint32> version;
|
||||
Value<atUint32> areaCount;
|
||||
};
|
||||
|
||||
struct EnvironmentVariable : BigYAML
|
||||
{
|
||||
DECL_YAML
|
||||
String<-1> name;
|
||||
Value<atUint32> unk1;
|
||||
Value<atUint32> unk2;
|
||||
Value<atUint32> unk3;
|
||||
};
|
||||
|
||||
struct Layer : BigYAML
|
||||
{
|
||||
DECL_YAML
|
||||
Value<atUint32> areaId;
|
||||
Value<atUint32> layer;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __COMMON_SAVWCOMMON_HPP__
|
|
@ -14,6 +14,7 @@ make_dnalist(liblist
|
|||
DeafBabe
|
||||
SCAN
|
||||
FRME
|
||||
SAVW
|
||||
Tweaks/CTweakGame
|
||||
Tweaks/CTweakParticle
|
||||
Tweaks/CTweakPlayer
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include "../DNACommon/DGRP.hpp"
|
||||
#include "CMDL.hpp"
|
||||
#include "AFSM.hpp"
|
||||
#include "SAVW.hpp"
|
||||
#include "ANCS.hpp"
|
||||
#include "MREA.hpp"
|
||||
#include "MAPA.hpp"
|
||||
|
@ -277,6 +278,8 @@ ResExtractor<PAKBridge> PAKBridge::LookupExtractor(const PAK::Entry& entry)
|
|||
return {STRG::Extract, nullptr, {_S(".yaml")}};
|
||||
case SBIG('SCAN'):
|
||||
return {SCAN::Extract, nullptr, {_S(".yaml")}, 0, SCAN::Name};
|
||||
case SBIG('SAVW'):
|
||||
return {DNAMP1::ExtractSAVW, nullptr, {_S(".yaml")}};
|
||||
case SBIG('TXTR'):
|
||||
return {TXTR::Extract, nullptr, {_S(".png")}};
|
||||
case SBIG('AFSM'):
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
#ifndef __DNAMP1_SAVW_HPP__
|
||||
#define __DNAMP1_SAVW_HPP__
|
||||
|
||||
#include "../DNACommon/SAVWCommon.hpp"
|
||||
#include "DNAMP1.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP1
|
||||
{
|
||||
struct Scan : BigYAML
|
||||
{
|
||||
DECL_YAML
|
||||
UniqueID32 scanId;
|
||||
Value<SAVWCommon::EScanCategory> category;
|
||||
};
|
||||
|
||||
struct SAVW : BigYAML
|
||||
{
|
||||
DECL_YAML
|
||||
SAVWCommon::Header header;
|
||||
Value<atUint32> skippableCutsceneCount;
|
||||
Vector<atUint32, DNA_COUNT(skippableCutsceneCount)> skippableCutscenes;
|
||||
Value<atUint32> relayCount;
|
||||
Vector<atUint32, DNA_COUNT(relayCount)> relays;
|
||||
Value<atUint32> layerCount;
|
||||
Vector<SAVWCommon::Layer, DNA_COUNT(layerCount)> layers;
|
||||
Value<atUint32> doorCount;
|
||||
Vector<atUint32, DNA_COUNT(doorCount)> doors;
|
||||
Value<atUint32> scanCount;
|
||||
Vector<Scan, DNA_COUNT(scanCount)> scans;
|
||||
};
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __DNAMP1_SAVW_HPP__
|
|
@ -7,6 +7,7 @@ make_dnalist(liblist
|
|||
CSKR
|
||||
MREA
|
||||
PTLA
|
||||
SAVW
|
||||
DeafBabe)
|
||||
add_library(DNAMP2
|
||||
DNAMP2.hpp DNAMP2.cpp
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "MREA.hpp"
|
||||
#include "MAPA.hpp"
|
||||
#include "AFSM.hpp"
|
||||
#include "SAVW.hpp"
|
||||
#include "../DNACommon/FSM2.hpp"
|
||||
#include "../DNACommon/TXTR.hpp"
|
||||
#include "../DNACommon/FONT.hpp"
|
||||
|
@ -222,6 +223,8 @@ ResExtractor<PAKBridge> PAKBridge::LookupExtractor(const DNAMP1::PAK::Entry& ent
|
|||
return {TXTR::Extract, nullptr, {_S(".png")}};
|
||||
case SBIG('AFSM'):
|
||||
return {AFSM::Extract, nullptr, {_S(".yaml")}};
|
||||
case SBIG('SAVW'):
|
||||
return {DNAMP2::ExtractSAVW, nullptr, {_S(".yaml")}};
|
||||
case SBIG('CMDL'):
|
||||
return {nullptr, CMDL::Extract, {_S(".blend")}, 1};
|
||||
case SBIG('ANCS'):
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef PTLA_HPP
|
||||
#define PTLA_HPP
|
||||
#ifndef __DNAMP2_PTLA_HPP__
|
||||
#define __DNAMP2_PTLA_HPP__
|
||||
|
||||
#include "../DNACommon/DNACommon.hpp"
|
||||
|
||||
|
@ -69,4 +69,4 @@ struct PTLA : BigDNA
|
|||
};
|
||||
}
|
||||
}
|
||||
#endif // PTLA_HPP
|
||||
#endif // __DNAMP2_PTLA_HPP__
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
#ifndef __DNAMP2_SAVW_HPP__
|
||||
#define __DNAMP2_SAVW_HPP__
|
||||
|
||||
#include "../DNAMP1/SAVW.hpp"
|
||||
#include "DNAMP2.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP2
|
||||
{
|
||||
struct SAVW : DNAMP1::SAVW
|
||||
{
|
||||
DECL_YAML
|
||||
Value<atUint32> systemVarCount;
|
||||
Vector<SAVWCommon::EnvironmentVariable, DNA_COUNT(systemVarCount)> systemVars;
|
||||
Value<atUint32> gameVarCount;
|
||||
Vector<SAVWCommon::EnvironmentVariable, DNA_COUNT(gameVarCount)> gameVars;
|
||||
Value<atUint32> gameObjectCount;
|
||||
Vector<atUint32, DNA_COUNT(gameObjectCount)> gameObjects;
|
||||
};
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __DNAMP2_SAVW_HPP__
|
|
@ -6,7 +6,8 @@ make_dnalist(liblist
|
|||
CMDLMaterials
|
||||
CINF
|
||||
CSKR
|
||||
MREA)
|
||||
MREA
|
||||
SAVW)
|
||||
add_library(DNAMP3
|
||||
DNAMP3.hpp DNAMP3.cpp
|
||||
${liblist}
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include "CHAR.hpp"
|
||||
#include "MREA.hpp"
|
||||
#include "MAPA.hpp"
|
||||
#include "SAVW.hpp"
|
||||
#include "../DNACommon/TXTR.hpp"
|
||||
#include "../DNACommon/FONT.hpp"
|
||||
#include "../DNACommon/FSM2.hpp"
|
||||
|
@ -230,6 +231,8 @@ ResExtractor<PAKBridge> PAKBridge::LookupExtractor(const PAK::Entry& entry)
|
|||
return {STRG::Extract, nullptr, {_S(".yaml")}};
|
||||
case SBIG('TXTR'):
|
||||
return {TXTR::Extract, nullptr, {_S(".png")}};
|
||||
case SBIG('SAVW'):
|
||||
return {DNAMP3::ExtractSAVW, nullptr, {_S(".yaml")}};
|
||||
case SBIG('CMDL'):
|
||||
return {nullptr, CMDL::Extract, {_S(".blend")}, 1};
|
||||
case SBIG('CHAR'):
|
||||
|
|
|
@ -0,0 +1,64 @@
|
|||
#ifndef __DNAMP3_SAVW_HPP__
|
||||
#define __DNAMP3_SAVW_HPP__
|
||||
|
||||
#include "../DNACommon/SAVWCommon.hpp"
|
||||
#include "DNAMP3.hpp"
|
||||
|
||||
namespace DataSpec
|
||||
{
|
||||
namespace DNAMP3
|
||||
{
|
||||
struct Scan : BigYAML
|
||||
{
|
||||
DECL_YAML
|
||||
UniqueID64 scanId;
|
||||
Value<SAVWCommon::EScanCategory> category;
|
||||
};
|
||||
|
||||
struct SavedState : BigYAML
|
||||
{
|
||||
DECL_YAML
|
||||
struct ID : BigYAML
|
||||
{
|
||||
DECL_YAML
|
||||
Value<atUint64> id[2];
|
||||
};
|
||||
ID id;
|
||||
Value<atUint32> instance;
|
||||
};
|
||||
|
||||
struct SAVW : BigYAML
|
||||
{
|
||||
DECL_YAML
|
||||
SAVWCommon::Header header;
|
||||
Value<atUint32> skippableCutsceneCount;
|
||||
Vector<SavedState, DNA_COUNT(skippableCutsceneCount)> skippableCutscenes;
|
||||
Value<atUint32> relayCount;
|
||||
Vector<SavedState, DNA_COUNT(relayCount)> relays;
|
||||
Value<atUint32> layerCount;
|
||||
Vector<SAVWCommon::Layer, DNA_COUNT(layerCount)> layers;
|
||||
Value<atUint32> doorCount;
|
||||
Vector<SavedState, DNA_COUNT(doorCount)> doors;
|
||||
Value<atUint32> scanCount;
|
||||
Vector<Scan, DNA_COUNT(scanCount)> scans;
|
||||
Value<atUint32> systemVarCount;
|
||||
Vector<SAVWCommon::EnvironmentVariable, DNA_COUNT(systemVarCount)> systemVars;
|
||||
Value<atUint32> gameVarCount;
|
||||
Vector<SAVWCommon::EnvironmentVariable, DNA_COUNT(gameVarCount)> gameVars;
|
||||
Value<atUint32> gameObjectCount;
|
||||
Vector<SavedState, DNA_COUNT(gameObjectCount)> gameObjects;
|
||||
};
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __DNAMP3_SAVW_HPP__
|
|
@ -0,0 +1,9 @@
|
|||
#include "CSaveWorld.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
CSaveWorld::CSaveWorld(CInputStream &in)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef __URDE_CSAVEWORLD_HPP__
|
||||
#define __URDE_CSAVEWORLD_HPP__
|
||||
|
||||
#include "RetroTypes.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
class CSaveWorld
|
||||
|
|
2
hecl
2
hecl
|
@ -1 +1 @@
|
|||
Subproject commit 778dfaad0e133fe3126910204e97f7157c7a0492
|
||||
Subproject commit c4bdd92138ccc5de801bb109f9761605e3b81f74
|
Loading…
Reference in New Issue