mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-18 01:15:26 +00:00
Changed EGame to an enum class. Created NGameList and NPropertyMap to change how templates are managed/saved/loaded. Added support for property map keeping track of ID/type pairs.
This commit is contained in:
@@ -141,7 +141,7 @@ public:
|
||||
}
|
||||
|
||||
// Animation dependencies
|
||||
if (Game() <= eEchoes)
|
||||
if (Game() <= EGame::Echoes)
|
||||
{
|
||||
for (u32 iAnim = 0; iAnim < mAnimations.size(); iAnim++)
|
||||
{
|
||||
@@ -151,7 +151,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
else if (Game() <= eCorruption)
|
||||
else if (Game() <= EGame::Corruption)
|
||||
{
|
||||
const SSetCharacter& rkChar = mCharacters[0];
|
||||
std::set<CAnimPrimitive> PrimitiveSet;
|
||||
@@ -228,7 +228,7 @@ public:
|
||||
{
|
||||
ASSERT(Index >= 0 && Index < NumAnimations());
|
||||
|
||||
if (Game() <= ePrime)
|
||||
if (Game() <= EGame::Prime)
|
||||
{
|
||||
const CAnimPrimitive& rkPrim = mAnimPrimitives[Index];
|
||||
return rkPrim.Animation() ? rkPrim.Animation()->EventData() : nullptr;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <iostream>
|
||||
|
||||
CAnimationParameters::CAnimationParameters()
|
||||
: mGame(ePrime)
|
||||
: mGame(EGame::Prime)
|
||||
, mCharIndex(0)
|
||||
, mAnimIndex(0)
|
||||
, mUnknown2(0)
|
||||
@@ -30,20 +30,20 @@ CAnimationParameters::CAnimationParameters(IInputStream& rSCLY, EGame Game)
|
||||
, mUnknown2(0)
|
||||
, mUnknown3(0)
|
||||
{
|
||||
if (Game <= eEchoes)
|
||||
if (Game <= EGame::Echoes)
|
||||
{
|
||||
mCharacterID = CAssetID(rSCLY, Game);
|
||||
mCharIndex = rSCLY.ReadLong();
|
||||
mAnimIndex = rSCLY.ReadLong();
|
||||
}
|
||||
|
||||
else if (Game <= eCorruption)
|
||||
else if (Game <= EGame::Corruption)
|
||||
{
|
||||
mCharacterID = CAssetID(rSCLY, Game);
|
||||
mAnimIndex = rSCLY.ReadLong();
|
||||
}
|
||||
|
||||
else if (Game == eReturns)
|
||||
else if (Game == EGame::DKCReturns)
|
||||
{
|
||||
u8 Flags = rSCLY.ReadByte();
|
||||
|
||||
@@ -80,7 +80,7 @@ CAnimationParameters::CAnimationParameters(IInputStream& rSCLY, EGame Game)
|
||||
|
||||
void CAnimationParameters::Write(IOutputStream& rSCLY)
|
||||
{
|
||||
if (mGame <= eEchoes)
|
||||
if (mGame <= EGame::Echoes)
|
||||
{
|
||||
if (mCharacterID.IsValid())
|
||||
{
|
||||
@@ -96,7 +96,7 @@ void CAnimationParameters::Write(IOutputStream& rSCLY)
|
||||
}
|
||||
}
|
||||
|
||||
else if (mGame <= eCorruption)
|
||||
else if (mGame <= EGame::Corruption)
|
||||
{
|
||||
if (mCharacterID.IsValid())
|
||||
{
|
||||
@@ -144,12 +144,12 @@ void CAnimationParameters::Serialize(IArchive& rArc)
|
||||
|
||||
rArc << SerialParameter("AnimationSetAsset", mCharacterID);
|
||||
|
||||
if (mGame <= eEchoes)
|
||||
if (mGame <= EGame::Echoes)
|
||||
rArc << SerialParameter("CharacterID", mCharIndex);
|
||||
|
||||
rArc << SerialParameter("AnimationID", mAnimIndex);
|
||||
|
||||
if (mGame >= eReturns)
|
||||
if (mGame >= EGame::DKCReturns)
|
||||
{
|
||||
rArc << SerialParameter("Unknown0", mUnknown2)
|
||||
<< SerialParameter("Unknown1", mUnknown3);
|
||||
|
||||
@@ -56,7 +56,7 @@ CMetaTransTrans::CMetaTransTrans(EMetaTransitionType Type, IInputStream& rInput,
|
||||
ASSERT(Type == eMTT_Trans || Type == eMTT_PhaseTrans);
|
||||
mType = Type;
|
||||
|
||||
if (Game <= eEchoes)
|
||||
if (Game <= EGame::Echoes)
|
||||
{
|
||||
mUnknownA = rInput.ReadFloat();
|
||||
mUnknownB = rInput.ReadLong();
|
||||
|
||||
Reference in New Issue
Block a user