diff --git a/Runtime/CDvdFile.hpp b/Runtime/CDvdFile.hpp index 999b677ab..9a222bf2f 100644 --- a/Runtime/CDvdFile.hpp +++ b/Runtime/CDvdFile.hpp @@ -6,7 +6,10 @@ namespace Retro { -const char* DecodeARAMFile(const char* name); +static const char* DecodeARAMFile(const char* name) +{ + return (strncmp(name, "aram:", 5) == 0 ? name + 5 : name); +} enum class ESeekOrigin { @@ -44,7 +47,6 @@ public: static void ARAMARAMXferCallback(u32) {} static void DVDARAMXferCallback(s32, DVDFileInfo*) {} }; - } #endif // __RETRO_CDVDFILE_HPP__ diff --git a/Runtime/Particle/CElementGen.cpp b/Runtime/Particle/CElementGen.cpp index 747db371b..da050385a 100644 --- a/Runtime/Particle/CElementGen.cpp +++ b/Runtime/Particle/CElementGen.cpp @@ -896,6 +896,35 @@ void CElementGen::BuildParticleSystemBounds() x2c4_systemBounds.accumulateBounds(aabb); } +u32 CElementGen::GetSystemCount() +{ + u32 ret = 0; + for (const CElementGen& child : x234_children) + ret += child.GetSystemCount(); + + for (const CElementGen& child : x248_children) + ret += child.GetSystemCount(); + + return (ret + (x208_activeParticleCount != 0)); +} + +u32 CElementGen::GetParticleCountAll() +{ + return x20c; +} + +u32 CElementGen::GetParticleCountAllInternal() +{ + u32 ret = x208_activeParticleCount; + for (const CElementGen& child : x234_children) + ret += child.GetParticleCountAll(); + + for (const CElementGen& child : x248_children) + ret += child.GetParticleCountAll(); + + return ret; +} + void CElementGen::Render() { } @@ -934,10 +963,12 @@ void CElementGen::SetModulationColor(const Zeus::CColor&) const Zeus::CTransform& CElementGen::GetOrientation() const { + return x178_orientation; } const Zeus::CVector3f& CElementGen::GetTranslation() const { + return x7c_translation; } const Zeus::CVector3f& CElementGen::GetGlobalScale() const diff --git a/Runtime/Particle/CElementGen.hpp b/Runtime/Particle/CElementGen.hpp index e86539024..39c16c983 100644 --- a/Runtime/Particle/CElementGen.hpp +++ b/Runtime/Particle/CElementGen.hpp @@ -177,6 +177,7 @@ public: CElementGen* ConstructChildParticleSystem(const TToken&); void UpdateLightParameters(); void BuildParticleSystemBounds(); + u32 GetSystemCount(); u32 GetParticleCountAllInternal() const; u32 GetParticleCountAll() const {return x20c_recursiveParticleCount;} diff --git a/Runtime/Particle/CIntElement.cpp b/Runtime/Particle/CIntElement.cpp index d7223a6cd..cd11e8583 100644 --- a/Runtime/Particle/CIntElement.cpp +++ b/Runtime/Particle/CIntElement.cpp @@ -207,6 +207,18 @@ bool CIEGTCP::GetValue(int frame, int& valOut) const return false; } +bool CIEGAPC::GetValue(int frame, int &valOut) const +{ + /* TODO: Do */ + return false; +} + +bool CIEGEMT::GetValue(int frame, int &valOut) const +{ + /* TODO: Do */ + return false; +} + bool CIEModulo::GetValue(int frame, int& valOut) const { int a, b; diff --git a/Runtime/Particle/CIntElement.hpp b/Runtime/Particle/CIntElement.hpp index 61bd45b4b..d29fac435 100644 --- a/Runtime/Particle/CIntElement.hpp +++ b/Runtime/Particle/CIntElement.hpp @@ -158,6 +158,18 @@ public: bool GetValue(int frame, int& valOut) const; }; +class CIEGAPC : public CIntElement +{ +public: + bool GetValue(int frame, int &valOut) const; +}; + +class CIEGEMT : public CIntElement +{ +public: + bool GetValue(int frame, int &valOut) const; +}; + class CIEModulo : public CIntElement { std::unique_ptr x4_a; diff --git a/Runtime/Particle/CParticleDataFactory.cpp b/Runtime/Particle/CParticleDataFactory.cpp index 3b9586c17..46dd9665f 100644 --- a/Runtime/Particle/CParticleDataFactory.cpp +++ b/Runtime/Particle/CParticleDataFactory.cpp @@ -739,10 +739,18 @@ CIntElement* CParticleDataFactory::GetIntElement(CInputStream& in) CRealElement* a = GetRealElement(in); return new CIETimeScale(a); } + case SBIG('GAPC'): + { + return new CIEGAPC; + } case SBIG('GTCP'): { return new CIEGTCP; } + case SBIG('GEMT'): + { + return new GIEGEMT; + } case SBIG('MODU'): { CIntElement* a = GetIntElement(in);