diff --git a/Runtime/Graphics/CTexture.hpp b/Runtime/Graphics/CTexture.hpp index e17db48f8..cd85a7a86 100644 --- a/Runtime/Graphics/CTexture.hpp +++ b/Runtime/Graphics/CTexture.hpp @@ -2,6 +2,7 @@ #define __PSHAG_CTEXTURE_HPP__ #include "GCNTypes.hpp" +#include "CFactoryMgr.hpp" #include "IObj.hpp" #include "IOStreams.hpp" #include "Graphics/CGraphics.hpp" @@ -48,7 +49,7 @@ public: boo::ITexture* GetBooTexture() {return m_booTex;} }; -std::unique_ptr FTextureFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& vparms); +CFactoryFnReturn FTextureFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& vparms); } diff --git a/Runtime/Graphics/CTextureBoo.cpp b/Runtime/Graphics/CTextureBoo.cpp index 960b1e92a..1a3ceedcd 100644 --- a/Runtime/Graphics/CTextureBoo.cpp +++ b/Runtime/Graphics/CTextureBoo.cpp @@ -697,7 +697,7 @@ void CTexture::Load(int slot, EClampMode clamp) } -std::unique_ptr FTextureFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& vparms) +CFactoryFnReturn FTextureFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& vparms) { return TToken::GetIObjObjectFor(std::make_unique(in)); } diff --git a/Runtime/Particle/CCollisionResponseData.cpp b/Runtime/Particle/CCollisionResponseData.cpp index 64b17589a..4b23f4069 100644 --- a/Runtime/Particle/CCollisionResponseData.cpp +++ b/Runtime/Particle/CCollisionResponseData.cpp @@ -187,7 +187,7 @@ CCollisionResponseData::CCollisionResponseData(CInputStream& in, CSimplePool* re } } -std::unique_ptr FCollisionResponseDataFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& vparms) +CFactoryFnReturn FCollisionResponseDataFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& vparms) { CSimplePool* sp = static_cast(static_cast*>(vparms.GetObj())->GetParam()); return TToken::GetIObjObjectFor(std::unique_ptr(new CCollisionResponseData(in, sp))); diff --git a/Runtime/Particle/CCollisionResponseData.hpp b/Runtime/Particle/CCollisionResponseData.hpp index 392759458..cd983d8c3 100644 --- a/Runtime/Particle/CCollisionResponseData.hpp +++ b/Runtime/Particle/CCollisionResponseData.hpp @@ -2,6 +2,7 @@ #define __PSHAG_CCOLLISIONRESPONSEDATA_HPP__ #include "RetroTypes.hpp" +#include "CFactoryMgr.hpp" #include "IObj.hpp" #include "CToken.hpp" #include "IOStreams.hpp" @@ -54,7 +55,7 @@ public: CCollisionResponseData(CInputStream& in, CSimplePool* resPool); }; -std::unique_ptr FCollisionResponseDataFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& vparms); +CFactoryFnReturn FCollisionResponseDataFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& vparms); } #endif // __PSHAG_CCOLLISIONRESPONSEDATA_HPP__ diff --git a/Runtime/Particle/CDecalDataFactory.cpp b/Runtime/Particle/CDecalDataFactory.cpp index 8635cc804..525589ad8 100644 --- a/Runtime/Particle/CDecalDataFactory.cpp +++ b/Runtime/Particle/CDecalDataFactory.cpp @@ -137,7 +137,7 @@ void CDecalDataFactory::GetQuadDecalInfo(CInputStream& in, CSimplePool* resPool, } } -std::unique_ptr FDecalDataFactory(const SObjectTag &tag, CInputStream &in, const CVParamTransfer &vparms) +CFactoryFnReturn FDecalDataFactory(const SObjectTag &tag, CInputStream &in, const CVParamTransfer &vparms) { CSimplePool* sp = static_cast(static_cast*>(vparms.GetObj())->GetParam()); return TToken::GetIObjObjectFor(std::unique_ptr(CDecalDataFactory::GetGeneratorDesc(in, sp))); diff --git a/Runtime/Particle/CDecalDataFactory.hpp b/Runtime/Particle/CDecalDataFactory.hpp index 1c2237c3d..d7c5c80ae 100644 --- a/Runtime/Particle/CDecalDataFactory.hpp +++ b/Runtime/Particle/CDecalDataFactory.hpp @@ -2,6 +2,7 @@ #define __PSHAG_CDECALDATAFACTORY_HPP__ #include "RetroTypes.hpp" +#include "CFactoryMgr.hpp" #include "IObj.hpp" #include "CToken.hpp" #include "IOStreams.hpp" @@ -22,6 +23,6 @@ public: static CDecalDescription* GetGeneratorDesc(CInputStream& in,CSimplePool* resPool); }; -std::unique_ptr FDecalDataFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& vparms); +CFactoryFnReturn FDecalDataFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& vparms); } #endif // __PSHAG_CDECALDATAFACTORY_HPP__ diff --git a/Runtime/Particle/CParticleDataFactory.cpp b/Runtime/Particle/CParticleDataFactory.cpp index bff870ba6..ac1e5adf2 100644 --- a/Runtime/Particle/CParticleDataFactory.cpp +++ b/Runtime/Particle/CParticleDataFactory.cpp @@ -1156,7 +1156,7 @@ void CParticleDataFactory::LoadGPSMTokens(CGenDescription* desc) desc->xd4_xc0_SSWH.m_swoosh = desc->xd4_xc0_SSWH.m_token.GetObj(); } -std::unique_ptr FParticleFactory(const SObjectTag& tag, CInputStream& in, +CFactoryFnReturn FParticleFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& vparms) { CSimplePool* sp = static_cast(static_cast*>(vparms.GetObj())->GetParam()); diff --git a/Runtime/Particle/CParticleDataFactory.hpp b/Runtime/Particle/CParticleDataFactory.hpp index db2bfc55e..0ee40880e 100644 --- a/Runtime/Particle/CParticleDataFactory.hpp +++ b/Runtime/Particle/CParticleDataFactory.hpp @@ -2,6 +2,7 @@ #define __PSHAG_CPARTICLEDATAFACTORY_HPP__ #include "RetroTypes.hpp" +#include "CFactoryMgr.hpp" #include "IObj.hpp" #include "CToken.hpp" #include "IOStreams.hpp" @@ -96,7 +97,7 @@ public: static CGenDescription* GetGeneratorDesc(CInputStream& in, CSimplePool* resPool); }; -std::unique_ptr FParticleFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& vparms); +CFactoryFnReturn FParticleFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& vparms); } diff --git a/Runtime/Particle/CParticleElectricDataFactory.cpp b/Runtime/Particle/CParticleElectricDataFactory.cpp index 956c334f1..36780d3b8 100644 --- a/Runtime/Particle/CParticleElectricDataFactory.cpp +++ b/Runtime/Particle/CParticleElectricDataFactory.cpp @@ -132,7 +132,7 @@ void CParticleElectricDataFactory::LoadELSMTokens(CElectricDescription* desc) desc->x60_EPSM.m_gen = desc->x60_EPSM.m_token.GetObj(); } -std::unique_ptr FParticleElectricDataFactory(const SObjectTag &tag, CInputStream &in, const CVParamTransfer &vparms) +CFactoryFnReturn FParticleElectricDataFactory(const SObjectTag &tag, CInputStream &in, const CVParamTransfer &vparms) { CSimplePool* sp = static_cast(static_cast*>(vparms.GetObj())->GetParam()); return TToken::GetIObjObjectFor(std::unique_ptr(CParticleElectricDataFactory::GetGeneratorDesc(in, sp))); diff --git a/Runtime/Particle/CParticleElectricDataFactory.hpp b/Runtime/Particle/CParticleElectricDataFactory.hpp index 3740f00d9..0e420e06d 100644 --- a/Runtime/Particle/CParticleElectricDataFactory.hpp +++ b/Runtime/Particle/CParticleElectricDataFactory.hpp @@ -2,6 +2,7 @@ #define __PSHAG_CPARTICLEELECTRICDATAFACTORY_HPP__ #include "RetroTypes.hpp" +#include "CFactoryMgr.hpp" #include "IObj.hpp" #include "CToken.hpp" #include "IOStreams.hpp" @@ -19,7 +20,7 @@ public: static CElectricDescription* GetGeneratorDesc(CInputStream& in, CSimplePool* resPool); }; -std::unique_ptr FParticleElectricDataFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& vparms); +CFactoryFnReturn FParticleElectricDataFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& vparms); } #endif // __PSHAG_CPARTICLEELECTRICDATAFACTORY_HPP__ diff --git a/Runtime/Particle/CParticleSwooshDataFactory.cpp b/Runtime/Particle/CParticleSwooshDataFactory.cpp index 8feaea22e..6f0334ffc 100644 --- a/Runtime/Particle/CParticleSwooshDataFactory.cpp +++ b/Runtime/Particle/CParticleSwooshDataFactory.cpp @@ -137,7 +137,7 @@ bool CParticleSwooshDataFactory::CreateWPSM(CSwooshDescription* desc, CInputStre return true; } -std::unique_ptr FParticleSwooshDataFactory(const SObjectTag &tag, CInputStream &in, const CVParamTransfer &vparms) +CFactoryFnReturn FParticleSwooshDataFactory(const SObjectTag &tag, CInputStream &in, const CVParamTransfer &vparms) { CSimplePool* sp = static_cast(static_cast*>(vparms.GetObj())->GetParam()); return TToken::GetIObjObjectFor(std::unique_ptr(CParticleSwooshDataFactory::GetGeneratorDesc(in, sp))); diff --git a/Runtime/Particle/CParticleSwooshDataFactory.hpp b/Runtime/Particle/CParticleSwooshDataFactory.hpp index 52a59d39a..410386866 100644 --- a/Runtime/Particle/CParticleSwooshDataFactory.hpp +++ b/Runtime/Particle/CParticleSwooshDataFactory.hpp @@ -2,6 +2,7 @@ #define __PSHAG_CPARTICLESWOOSHDATAFACTORY_HPP__ #include "RetroTypes.hpp" +#include "CFactoryMgr.hpp" #include "IObj.hpp" #include "CToken.hpp" #include "IOStreams.hpp" @@ -18,7 +19,7 @@ public: static CSwooshDescription* GetGeneratorDesc(CInputStream& in, CSimplePool* resPool); }; -std::unique_ptr FParticleSwooshDataFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& vparms); +CFactoryFnReturn FParticleSwooshDataFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& vparms); } #endif // __PSHAG_CPARTICLESWOOSHDATAFACTORY_HPP__ diff --git a/Runtime/Particle/CProjectileWeaponDataFactory.cpp b/Runtime/Particle/CProjectileWeaponDataFactory.cpp index 58ca818c8..52c708fb3 100644 --- a/Runtime/Particle/CProjectileWeaponDataFactory.cpp +++ b/Runtime/Particle/CProjectileWeaponDataFactory.cpp @@ -164,7 +164,7 @@ bool CProjectileWeaponDataFactory::CreateWPSM(CWeaponDescription* desc, CInputSt return true; } -std::unique_ptr FProjectileWeaponDataFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& vparms) +CFactoryFnReturn FProjectileWeaponDataFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& vparms) { CSimplePool* sp = static_cast(static_cast*>(vparms.GetObj())->GetParam()); return TToken::GetIObjObjectFor(std::unique_ptr(CProjectileWeaponDataFactory::GetGeneratorDesc(in, sp))); diff --git a/Runtime/Particle/CProjectileWeaponDataFactory.hpp b/Runtime/Particle/CProjectileWeaponDataFactory.hpp index 0e3d331c4..543e638e4 100644 --- a/Runtime/Particle/CProjectileWeaponDataFactory.hpp +++ b/Runtime/Particle/CProjectileWeaponDataFactory.hpp @@ -2,6 +2,7 @@ #define __PSHAG_CPROJECTILEWEAPONDATAFACTORY_HPP__ #include "RetroTypes.hpp" +#include "CFactoryMgr.hpp" #include "IObj.hpp" #include "CToken.hpp" #include "IOStreams.hpp" @@ -18,7 +19,7 @@ public: static CWeaponDescription* GetGeneratorDesc(CInputStream& in, CSimplePool* resPool); }; -std::unique_ptr FProjectileWeaponDataFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& vparms); +CFactoryFnReturn FProjectileWeaponDataFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& vparms); } #endif // __PSHAG_CPROJECTILEWEAPONDATAFACTORY_HPP__