mirror of https://github.com/AxioDL/metaforce.git
Merge branch 'master' of https://github.com/AxioDL/urde
This commit is contained in:
commit
0b69c63e98
|
@ -32,20 +32,6 @@ struct AnimationResInfo
|
||||||
bool additive;
|
bool additive;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void WriteOutAnimId(athena::io::YAMLDocWriter& __dna_docout,
|
|
||||||
const UniqueID32& ancsId,
|
|
||||||
const std::string& animName)
|
|
||||||
{
|
|
||||||
__dna_docout.enterSubRecord("animId");
|
|
||||||
hecl::ProjectPath path = UniqueIDBridge::TranslatePakIdToPath(ancsId);
|
|
||||||
if (path)
|
|
||||||
{
|
|
||||||
path = path.getWithExtension(_S(".blend"));
|
|
||||||
__dna_docout.writeString(nullptr, path.getRelativePathUTF8() + _S('|') + animName);
|
|
||||||
}
|
|
||||||
__dna_docout.leaveSubRecord();
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class PAKRouter, class ANCSDNA, class MaterialSet, class SurfaceHeader, atUint32 CMDLVersion>
|
template <class PAKRouter, class ANCSDNA, class MaterialSet, class SurfaceHeader, atUint32 CMDLVersion>
|
||||||
bool ReadANCSToBlender(hecl::BlenderConnection& conn,
|
bool ReadANCSToBlender(hecl::BlenderConnection& conn,
|
||||||
const ANCSDNA& ancs,
|
const ANCSDNA& ancs,
|
||||||
|
|
|
@ -40,6 +40,8 @@ struct ANCS : BigYAML
|
||||||
atUint32 idx;
|
atUint32 idx;
|
||||||
std::string name;
|
std::string name;
|
||||||
UniqueID32 cmdl;
|
UniqueID32 cmdl;
|
||||||
|
UniqueID32 _cskrOld;
|
||||||
|
UniqueID32 _cinfOld;
|
||||||
AuxiliaryID32 cskr = _S("skin");
|
AuxiliaryID32 cskr = _S("skin");
|
||||||
AuxiliaryID32 cinf = {_S("layout"), _S(".blend")};
|
AuxiliaryID32 cinf = {_S("layout"), _S(".blend")};
|
||||||
|
|
||||||
|
@ -145,6 +147,7 @@ struct ANCS : BigYAML
|
||||||
std::vector<Effect> effects;
|
std::vector<Effect> effects;
|
||||||
|
|
||||||
UniqueID32 cmdlOverlay;
|
UniqueID32 cmdlOverlay;
|
||||||
|
UniqueID32 _cskrOverlayOld;
|
||||||
AuxiliaryID32 cskrOverlay = _S("skin");
|
AuxiliaryID32 cskrOverlay = _S("skin");
|
||||||
|
|
||||||
std::vector<atUint32> animIdxs;
|
std::vector<atUint32> animIdxs;
|
||||||
|
@ -227,8 +230,6 @@ struct ANCS : BigYAML
|
||||||
|
|
||||||
void read(athena::io::YAMLDocReader& __dna_docin)
|
void read(athena::io::YAMLDocReader& __dna_docin)
|
||||||
{
|
{
|
||||||
/* animId */
|
|
||||||
__dna_docin.enumerate("animId", animId);
|
|
||||||
/* animIdx */
|
/* animIdx */
|
||||||
animIdx = __dna_docin.readUint32("animIdx");
|
animIdx = __dna_docin.readUint32("animIdx");
|
||||||
/* animName */
|
/* animName */
|
||||||
|
@ -237,12 +238,17 @@ struct ANCS : BigYAML
|
||||||
unk1 = __dna_docin.readFloat("unk1");
|
unk1 = __dna_docin.readFloat("unk1");
|
||||||
/* unk2 */
|
/* unk2 */
|
||||||
unk2 = __dna_docin.readUint32("unk2");
|
unk2 = __dna_docin.readUint32("unk2");
|
||||||
|
|
||||||
|
hecl::ProjectPath path = UniqueIDBridge::TranslatePakIdToPath(m_ancsId);
|
||||||
|
if (path)
|
||||||
|
{
|
||||||
|
hecl::SystemStringView sysView(animName);
|
||||||
|
animId = path.ensureAuxInfo(sysView.sys_str().c_str());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void write(athena::io::YAMLDocWriter& __dna_docout) const
|
void write(athena::io::YAMLDocWriter& __dna_docout) const
|
||||||
{
|
{
|
||||||
/* animId */
|
|
||||||
DNAANCS::WriteOutAnimId(__dna_docout, m_ancsId, animName);
|
|
||||||
/* animIdx */
|
/* animIdx */
|
||||||
__dna_docout.writeUint32("animIdx", animIdx);
|
__dna_docout.writeUint32("animIdx", animIdx);
|
||||||
/* animName */
|
/* animName */
|
||||||
|
@ -569,11 +575,11 @@ struct ANCS : BigYAML
|
||||||
DNAANCS::CharacterResInfo<UniqueID32>& chOut = out.back();
|
DNAANCS::CharacterResInfo<UniqueID32>& chOut = out.back();
|
||||||
chOut.name = ci.name;
|
chOut.name = ci.name;
|
||||||
chOut.cmdl = ci.cmdl;
|
chOut.cmdl = ci.cmdl;
|
||||||
chOut.cskr = ci.cskr;
|
chOut.cskr = ci._cskrOld;
|
||||||
chOut.cinf = ci.cinf;
|
chOut.cinf = ci._cinfOld;
|
||||||
|
|
||||||
if (ci.cmdlOverlay)
|
if (ci.cmdlOverlay)
|
||||||
chOut.overlays.emplace_back(FOURCC('OVER'), std::make_pair(ci.cmdlOverlay, ci.cskrOverlay));
|
chOut.overlays.emplace_back(FOURCC('OVER'), std::make_pair(ci.cmdlOverlay, ci._cskrOverlayOld));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -599,8 +605,11 @@ struct ANCS : BigYAML
|
||||||
{
|
{
|
||||||
for (CharacterSet::CharacterInfo& character : characterSet.characters)
|
for (CharacterSet::CharacterInfo& character : characterSet.characters)
|
||||||
{
|
{
|
||||||
|
character._cskrOld = character.cskr;
|
||||||
|
character._cinfOld = character.cinf;
|
||||||
character.cskr = character.cmdl;
|
character.cskr = character.cmdl;
|
||||||
character.cinf = ancsId;
|
character.cinf = ancsId;
|
||||||
|
character._cskrOverlayOld = character.cskrOverlay;
|
||||||
character.cskrOverlay = character.cmdlOverlay;
|
character.cskrOverlay = character.cmdlOverlay;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,6 +41,8 @@ struct ANCS : BigYAML
|
||||||
atUint32 idx;
|
atUint32 idx;
|
||||||
std::string name;
|
std::string name;
|
||||||
UniqueID32 cmdl;
|
UniqueID32 cmdl;
|
||||||
|
UniqueID32 _cskrOld;
|
||||||
|
UniqueID32 _cinfOld;
|
||||||
AuxiliaryID32 cskr = _S("skin");
|
AuxiliaryID32 cskr = _S("skin");
|
||||||
AuxiliaryID32 cinf = {_S("layout"), _S("skin")};
|
AuxiliaryID32 cinf = {_S("layout"), _S("skin")};
|
||||||
|
|
||||||
|
@ -88,6 +90,7 @@ struct ANCS : BigYAML
|
||||||
std::vector<Effect> effects;
|
std::vector<Effect> effects;
|
||||||
|
|
||||||
UniqueID32 cmdlOverlay;
|
UniqueID32 cmdlOverlay;
|
||||||
|
UniqueID32 _cskrOverlayOld;
|
||||||
AuxiliaryID32 cskrOverlay = _S("skin");
|
AuxiliaryID32 cskrOverlay = _S("skin");
|
||||||
|
|
||||||
std::vector<atUint32> animIdxs;
|
std::vector<atUint32> animIdxs;
|
||||||
|
@ -201,11 +204,11 @@ struct ANCS : BigYAML
|
||||||
DNAANCS::CharacterResInfo<UniqueID32>& chOut = out.back();
|
DNAANCS::CharacterResInfo<UniqueID32>& chOut = out.back();
|
||||||
chOut.name = ci.name;
|
chOut.name = ci.name;
|
||||||
chOut.cmdl = ci.cmdl;
|
chOut.cmdl = ci.cmdl;
|
||||||
chOut.cskr = ci.cskr;
|
chOut.cskr = ci._cskrOld;
|
||||||
chOut.cinf = ci.cinf;
|
chOut.cinf = ci._cinfOld;
|
||||||
|
|
||||||
if (ci.cmdlOverlay)
|
if (ci.cmdlOverlay)
|
||||||
chOut.overlays.emplace_back(FOURCC('OVER'), std::make_pair(ci.cmdlOverlay, ci.cskrOverlay));
|
chOut.overlays.emplace_back(FOURCC('OVER'), std::make_pair(ci.cmdlOverlay, ci._cskrOverlayOld));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
2
hecl
2
hecl
|
@ -1 +1 @@
|
||||||
Subproject commit de043503e5d2312ccc10876b0ac3d5ebb91bb768
|
Subproject commit 22d1a5a98969e82bc314e9908f7f0d677eb4a9d5
|
Loading…
Reference in New Issue