mirror of https://github.com/AxioDL/metaforce.git
Merge branch 'master' of https://github.com/AxioDL/PathShagged
This commit is contained in:
commit
af2b5c86de
|
@ -0,0 +1,12 @@
|
||||||
|
#include "CDecalDataFactory.hpp"
|
||||||
|
#include "CDecalDescription.hpp"
|
||||||
|
#include "CSimplePool.hpp"
|
||||||
|
|
||||||
|
namespace Retro
|
||||||
|
{
|
||||||
|
std::unique_ptr<IObj> FDealDataFactory(const SObjectTag &tag, CInputStream &in, const CVParamTransfer &vparms)
|
||||||
|
{
|
||||||
|
CSimplePool* sp = static_cast<CSimplePool*>(static_cast<TObjOwnerParam<IObjectStore*>*>(vparms.GetObj())->GetParam());
|
||||||
|
return TToken<CDecalDescription>::GetIObjObjectFor(std::unique_ptr<CDecalDescription>(CDecalDataFactory::GetGeneratorDesc(in, sp)));
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,4 +1,25 @@
|
||||||
#ifndef __RETRO_CDECALDATAFACTORY_HPP__
|
#ifndef __RETRO_CDECALDATAFACTORY_HPP__
|
||||||
#define __RETRO_CDECALDATAFACTORY_HPP__
|
#define __RETRO_CDECALDATAFACTORY_HPP__
|
||||||
|
|
||||||
|
#include "RetroTypes.hpp"
|
||||||
|
#include "IObj.hpp"
|
||||||
|
#include "CToken.hpp"
|
||||||
|
#include "IOStreams.hpp"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Retro
|
||||||
|
{
|
||||||
|
class CDecalDescription;
|
||||||
|
class CSimplePool;
|
||||||
|
|
||||||
|
class CDecalDataFactory
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
static CDecalDescription* GetGeneratorDesc(CInputStream& in,CSimplePool* resPool);
|
||||||
|
static CDecalDescription* CreateGeneratorDescription(CInputStream& in, CSimplePool* resPool);
|
||||||
|
static bool CreateDPSM(CDecalDescription* desc,CInputStream& in,CSimplePool* resPool);
|
||||||
|
};
|
||||||
|
|
||||||
|
std::unique_ptr<IObj> FDealDataFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& vparms);
|
||||||
|
}
|
||||||
#endif // __RETRO_CDECALDATAFACTORY_HPP__
|
#endif // __RETRO_CDECALDATAFACTORY_HPP__
|
||||||
|
|
|
@ -1,4 +1,11 @@
|
||||||
#ifndef __RETRO_CDECALDESCRIPTION_HPP__
|
#ifndef __RETRO_CDECALDESCRIPTION_HPP__
|
||||||
#define __RETRO_CDECALDESCRIPTION_HPP__
|
#define __RETRO_CDECALDESCRIPTION_HPP__
|
||||||
|
|
||||||
|
namespace Retro
|
||||||
|
{
|
||||||
|
class CDecalDescription
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
#endif // __RETRO_CDECALDESCRIPTION_HPP__
|
#endif // __RETRO_CDECALDESCRIPTION_HPP__
|
||||||
|
|
|
@ -1,4 +1,11 @@
|
||||||
#ifndef __RETRO_CELECTRICDESCRIPTION_HPP__
|
#ifndef __RETRO_CELECTRICDESCRIPTION_HPP__
|
||||||
#define __RETRO_CELECTRICDESCRIPTION_HPP__
|
#define __RETRO_CELECTRICDESCRIPTION_HPP__
|
||||||
|
|
||||||
|
namespace Retro
|
||||||
|
{
|
||||||
|
namespace CElectricDescription
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endif // __RETRO_CELECTRICDESCRIPTION_HPP__
|
#endif // __RETRO_CELECTRICDESCRIPTION_HPP__
|
||||||
|
|
|
@ -15,7 +15,9 @@ add_library(RuntimeCommonParticle
|
||||||
CWeaponDescription.hpp CWeaponDescription.cpp
|
CWeaponDescription.hpp CWeaponDescription.cpp
|
||||||
CDecalDataFactory.hpp CDecalDataFactory.cpp
|
CDecalDataFactory.hpp CDecalDataFactory.cpp
|
||||||
CElementGen.hpp CElementGen.cpp
|
CElementGen.hpp CElementGen.cpp
|
||||||
|
CParticleSwooshDataFactory.hpp CParticleSwooshDataFactory.cpp
|
||||||
CParticleSwoosh.hpp CParticleSwoosh.cpp
|
CParticleSwoosh.hpp CParticleSwoosh.cpp
|
||||||
|
CParticleElectricDataFactory.hpp CParticleElectricDataFactory.cpp
|
||||||
CParticleElectric.hpp CParticleElectric.cpp
|
CParticleElectric.hpp CParticleElectric.cpp
|
||||||
CDecalManager.hpp CDecalManager.cpp
|
CDecalManager.hpp CDecalManager.cpp
|
||||||
CSpawnSystemKeyframeData.hpp CSpawnSystemKeyframeData.cpp
|
CSpawnSystemKeyframeData.hpp CSpawnSystemKeyframeData.cpp
|
||||||
|
|
|
@ -48,6 +48,10 @@ struct SElectricGeneratorDesc
|
||||||
|
|
||||||
class CParticleDataFactory
|
class CParticleDataFactory
|
||||||
{
|
{
|
||||||
|
friend class CDecalDataFactory;
|
||||||
|
friend class CParticleElectricDataFactory;
|
||||||
|
friend class CParticleSwooshDataFactory;
|
||||||
|
|
||||||
static SParticleModel GetModel(CInputStream& in, CSimplePool* resPool);
|
static SParticleModel GetModel(CInputStream& in, CSimplePool* resPool);
|
||||||
static SChildGeneratorDesc GetChildGeneratorDesc(TResId res, CSimplePool* resPool, const std::vector<TResId>& tracker);
|
static SChildGeneratorDesc GetChildGeneratorDesc(TResId res, CSimplePool* resPool, const std::vector<TResId>& tracker);
|
||||||
static SChildGeneratorDesc GetChildGeneratorDesc(CInputStream& in, CSimplePool* resPool, const std::vector<TResId>& tracker);
|
static SChildGeneratorDesc GetChildGeneratorDesc(CInputStream& in, CSimplePool* resPool, const std::vector<TResId>& tracker);
|
||||||
|
@ -65,7 +69,6 @@ class CParticleDataFactory
|
||||||
static int32_t GetInt(CInputStream& in);
|
static int32_t GetInt(CInputStream& in);
|
||||||
static bool GetBool(CInputStream& in);
|
static bool GetBool(CInputStream& in);
|
||||||
static FourCC GetClassID(CInputStream& in);
|
static FourCC GetClassID(CInputStream& in);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static CGenDescription* GetGeneratorDesc(CInputStream& in, CSimplePool* resPool);
|
static CGenDescription* GetGeneratorDesc(CInputStream& in, CSimplePool* resPool);
|
||||||
static CGenDescription* CreateGeneratorDescription(CInputStream& in, std::vector<TResId>& tracker,
|
static CGenDescription* CreateGeneratorDescription(CInputStream& in, std::vector<TResId>& tracker,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef __RETRO_CPARTICLEELECTRIC_HPP__
|
#ifndef __RETRO_CPARTICLEELECTRIC_HPP__
|
||||||
#define __RETRO_CPARTICLEELECTRIC_HPP__
|
#define __RETRO_CPARTICLEELECTRIC_HPP__
|
||||||
|
|
||||||
#include "CParticleGen.hpp"
|
#include "CElementGen.hpp"
|
||||||
|
|
||||||
namespace Retro
|
namespace Retro
|
||||||
{
|
{
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
#include "CParticleElectricDataFactory.hpp"
|
||||||
|
#include "CElectricDescription.hpp"
|
||||||
|
#include "CSimplePool.hpp"
|
||||||
|
|
||||||
|
namespace Retro
|
||||||
|
{
|
||||||
|
|
||||||
|
CElectricDescription* CParticleElectricDataFactory::GetGeneratorDesc(CInputStream &in, CSimplePool *resPool)
|
||||||
|
{
|
||||||
|
return CreateElectricDescription(in, resPool);
|
||||||
|
}
|
||||||
|
|
||||||
|
CElectricDescription* CParticleElectricDataFactory::CreateElectricDescription(CInputStream &in, CSimplePool *resPool)
|
||||||
|
{
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::unique_ptr<Retro::IObj> FParticleElecrticFactory(const Retro::SObjectTag &tag, Retro::CInputStream &in, const Retro::CVParamTransfer &vparms)
|
||||||
|
{
|
||||||
|
CSimplePool* sp = static_cast<CSimplePool*>(static_cast<TObjOwnerParam<IObjectStore*>*>(vparms.GetObj())->GetParam());
|
||||||
|
return TToken<CElectricDescription>::GetIObjObjectFor(std::unique_ptr<CElectricDescription>(CParticleElectricDataFactory::GetGeneratorDesc(in, sp)));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
#ifndef __RETRO_CPARTICLEELECTRICDATAFACTORY_HPP__
|
||||||
|
#define __RETRO_CPARTICLEELECTRICDATAFACTORY_HPP__
|
||||||
|
|
||||||
|
#include "RetroTypes.hpp"
|
||||||
|
#include "IObj.hpp"
|
||||||
|
#include "CToken.hpp"
|
||||||
|
#include "IOStreams.hpp"
|
||||||
|
|
||||||
|
namespace Retro
|
||||||
|
{
|
||||||
|
class CElectricDescription;
|
||||||
|
class CSimplePool;
|
||||||
|
class CParticleElectricDataFactory
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
static CElectricDescription* GetGeneratorDesc(CInputStream& in, CSimplePool* resPool);
|
||||||
|
static CElectricDescription* CreateElectricDescription(CInputStream& in, CSimplePool* resPool);
|
||||||
|
|
||||||
|
static bool CreateELSM(CElectricDescription* desc, CInputStream& in, CSimplePool* resPool) { return false; }
|
||||||
|
static bool LoadELSMTokens(CElectricDescription* desc);
|
||||||
|
};
|
||||||
|
|
||||||
|
std::unique_ptr<IObj> FParticleElectricDataFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& vparms);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // __RETRO_CPARTICLEELECTRICDATAFACTORY_HPP__
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef __RETRO_CPARTICLESWOOSH_HPP__
|
#ifndef __RETRO_CPARTICLESWOOSH_HPP__
|
||||||
#define __RETRO_CPARTICLESWOOSH_HPP__
|
#define __RETRO_CPARTICLESWOOSH_HPP__
|
||||||
|
|
||||||
#include "CParticleGen.hpp"
|
#include "CElementGen.hpp"
|
||||||
|
|
||||||
namespace Retro
|
namespace Retro
|
||||||
{
|
{
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
#include "CParticleSwooshDataFactory.hpp"
|
||||||
|
#include "CSwooshDescription.hpp"
|
||||||
|
|
||||||
|
#include "CSimplePool.hpp"
|
||||||
|
|
||||||
|
namespace Retro
|
||||||
|
{
|
||||||
|
|
||||||
|
std::unique_ptr<Retro::IObj> FParticleSwooshDataFactory(const SObjectTag &tag, CInputStream &in, const CVParamTransfer &vparms)
|
||||||
|
{
|
||||||
|
CSimplePool* sp = static_cast<CSimplePool*>(static_cast<TObjOwnerParam<IObjectStore*>*>(vparms.GetObj())->GetParam());
|
||||||
|
return TToken<CSwooshDescription>::GetIObjObjectFor(std::unique_ptr<CSwooshDescription>(CParticleSwooshDataFactory::GetGeneratorDesc(in, sp)));
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
#ifndef __RETRO_CPARTICLESWOOSHDATAFACTORY_HPP__
|
||||||
|
#define __RETRO_CPARTICLESWOOSHDATAFACTORY_HPP__
|
||||||
|
|
||||||
|
#include "RetroTypes.hpp"
|
||||||
|
#include "IObj.hpp"
|
||||||
|
#include "CToken.hpp"
|
||||||
|
#include "IOStreams.hpp"
|
||||||
|
|
||||||
|
namespace Retro
|
||||||
|
{
|
||||||
|
class CSwooshDescription;
|
||||||
|
class CSimplePool;
|
||||||
|
class CParticleSwooshDataFactory
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
static CSwooshDescription* GetGeneratorDesc(CInputStream& in, CSimplePool* resPool);
|
||||||
|
static CSwooshDescription* CreateGeneratorDescription(CInputStream& resPool, CSimplePool* resPool);
|
||||||
|
static bool CreateWPSM(CSwooshDescription* desc, CInputStream& in, CSimplePool* resPool);
|
||||||
|
};
|
||||||
|
|
||||||
|
std::unique_ptr<IObj> FParticleSwooshDataFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& vparms);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // __RETRO_CPARTICLESWOOSHDATAFACTORY_HPP__
|
|
@ -1,4 +1,11 @@
|
||||||
#ifndef __RETRO_CSWOOSHDESCRIPTION_HPP__
|
#ifndef __RETRO_CSWOOSHDESCRIPTION_HPP__
|
||||||
#define __RETRO_CSWOOSHDESCRIPTION_HPP__
|
#define __RETRO_CSWOOSHDESCRIPTION_HPP__
|
||||||
|
|
||||||
|
namespace Retro
|
||||||
|
{
|
||||||
|
namespace CSwooshDescription
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endif // __RETRO_CSWOOSHDESCRIPTION_HPP__
|
#endif // __RETRO_CSWOOSHDESCRIPTION_HPP__
|
||||||
|
|
|
@ -67,17 +67,6 @@ using TAreaId = u32;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
T GetAverageValue(const T* v, int count)
|
|
||||||
{
|
|
||||||
u32 unk = count * sizeof(T);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T, int Count>
|
|
||||||
class TReservedAverage
|
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
namespace std
|
namespace std
|
||||||
{
|
{
|
||||||
template<>
|
template<>
|
||||||
|
|
Loading…
Reference in New Issue