mirror of
https://github.com/PrimeDecomp/prime.git
synced 2025-08-14 13:39:07 +00:00
CParticleDataFactory progress
This commit is contained in:
parent
590eadf51a
commit
19ed9e1b28
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
#include "Kyoto/Particles/CIntElement.hpp"
|
#include "Kyoto/Particles/CIntElement.hpp"
|
||||||
#include "Kyoto/Particles/CModVectorElement.hpp"
|
#include "Kyoto/Particles/CModVectorElement.hpp"
|
||||||
|
#include "Kyoto/Particles/CRealElement.hpp"
|
||||||
|
#include "Kyoto/Particles/IElement.hpp"
|
||||||
#include "Kyoto/Streams/CInputStream.hpp"
|
#include "Kyoto/Streams/CInputStream.hpp"
|
||||||
|
|
||||||
#define SBIG(v) v
|
#define SBIG(v) v
|
||||||
@ -117,6 +119,188 @@ CIntElement* CParticleDataFactory::GetIntElement(CInputStream& in) {
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CRealElement* CParticleDataFactory::GetRealElement(CInputStream& in) {
|
||||||
|
FourCC clsId = GetClassID(in);
|
||||||
|
switch (clsId) {
|
||||||
|
case SBIG('CNST'): {
|
||||||
|
return rs_new CREConstant(GetReal(in));
|
||||||
|
}
|
||||||
|
case SBIG('KEYP'): {
|
||||||
|
return rs_new CREKeyframeEmitter(in);
|
||||||
|
}
|
||||||
|
case SBIG('SCAL'): {
|
||||||
|
return rs_new CRETimeScale(GetRealElement(in));
|
||||||
|
}
|
||||||
|
case SBIG('SINE'): {
|
||||||
|
CRealElement* a = GetRealElement(in);
|
||||||
|
CRealElement* b = GetRealElement(in);
|
||||||
|
CRealElement* c = GetRealElement(in);
|
||||||
|
return rs_new CRESineWave(c, a,b);
|
||||||
|
}
|
||||||
|
case SBIG('ADD_'): {
|
||||||
|
CRealElement* a = GetRealElement(in);
|
||||||
|
CRealElement* b = GetRealElement(in);
|
||||||
|
return rs_new CREAdd(a, b);
|
||||||
|
}
|
||||||
|
case SBIG('MULT'): {
|
||||||
|
CRealElement* a = GetRealElement(in);
|
||||||
|
CRealElement* b = GetRealElement(in);
|
||||||
|
return rs_new CREMultiply(a, b);
|
||||||
|
}
|
||||||
|
case SBIG('DOTP'): {
|
||||||
|
CVectorElement* a = GetVectorElement(in);
|
||||||
|
CVectorElement* b = GetVectorElement(in);
|
||||||
|
return rs_new CREDotProduct(a, b);
|
||||||
|
}
|
||||||
|
case SBIG('RAND'): {
|
||||||
|
CRealElement* min = GetRealElement(in);
|
||||||
|
CRealElement* max = GetRealElement(in);
|
||||||
|
return rs_new CRERandom(min, max);
|
||||||
|
}
|
||||||
|
case SBIG('IRND'): {
|
||||||
|
CRealElement* min = GetRealElement(in);
|
||||||
|
CRealElement* max = GetRealElement(in);
|
||||||
|
return rs_new CREInitialRandom(min, max);
|
||||||
|
}
|
||||||
|
case SBIG('CHAN'): {
|
||||||
|
CRealElement* a = GetRealElement(in);
|
||||||
|
CRealElement* b = GetRealElement(in);
|
||||||
|
CIntElement* c = GetIntElement(in);
|
||||||
|
return rs_new CRETimeChain(a, b, c);
|
||||||
|
}
|
||||||
|
case SBIG('CLMP'): {
|
||||||
|
CRealElement* a = GetRealElement(in);
|
||||||
|
CRealElement* b = GetRealElement(in);
|
||||||
|
CRealElement* c = GetRealElement(in);
|
||||||
|
return rs_new CREClamp(a, b, c);
|
||||||
|
}
|
||||||
|
case SBIG('PULS'): {
|
||||||
|
CIntElement* a = GetIntElement(in);
|
||||||
|
CIntElement* b = GetIntElement(in);
|
||||||
|
CRealElement* c = GetRealElement(in);
|
||||||
|
CRealElement* d = GetRealElement(in);
|
||||||
|
return rs_new CREPulse(a, b, c, d);
|
||||||
|
}
|
||||||
|
case SBIG('RLPT'): {
|
||||||
|
CRealElement* a = GetRealElement(in);
|
||||||
|
return rs_new CRELifetimePercent(a);
|
||||||
|
}
|
||||||
|
case SBIG('LFTW'): {
|
||||||
|
CRealElement* a = GetRealElement(in);
|
||||||
|
CRealElement* b = GetRealElement(in);
|
||||||
|
return rs_new CRELifetimeTween(a, b);
|
||||||
|
}
|
||||||
|
case SBIG('PRLW'): {
|
||||||
|
return rs_new CREParticleRotationOrLineWidth();
|
||||||
|
}
|
||||||
|
case SBIG('PSLL'): {
|
||||||
|
return rs_new CREParticleSizeOrLineLength();
|
||||||
|
}
|
||||||
|
case SBIG('PAP1'): {
|
||||||
|
return rs_new CREParticleAccessParameter1();
|
||||||
|
}
|
||||||
|
case SBIG('PAP2'): {
|
||||||
|
return rs_new CREParticleAccessParameter2();
|
||||||
|
}
|
||||||
|
case SBIG('PAP3'): {
|
||||||
|
return rs_new CREParticleAccessParameter3();
|
||||||
|
}
|
||||||
|
case SBIG('PAP4'): {
|
||||||
|
return rs_new CREParticleAccessParameter4();
|
||||||
|
}
|
||||||
|
case SBIG('PAP5'): {
|
||||||
|
return rs_new CREParticleAccessParameter5();
|
||||||
|
}
|
||||||
|
case SBIG('PAP6'): {
|
||||||
|
return rs_new CREParticleAccessParameter6();
|
||||||
|
}
|
||||||
|
case SBIG('PAP7'): {
|
||||||
|
return rs_new CREParticleAccessParameter7();
|
||||||
|
}
|
||||||
|
case SBIG('PAP8'): {
|
||||||
|
return rs_new CREParticleAccessParameter8();
|
||||||
|
}
|
||||||
|
case SBIG('VXTR'): {
|
||||||
|
CVectorElement* a = GetVectorElement(in);
|
||||||
|
return rs_new CREVectorXToReal(a);
|
||||||
|
}
|
||||||
|
case SBIG('VYTR'): {
|
||||||
|
CVectorElement* a = GetVectorElement(in);
|
||||||
|
return rs_new CREVectorYToReal(a);
|
||||||
|
}
|
||||||
|
case SBIG('VZTR'): {
|
||||||
|
CVectorElement* a = GetVectorElement(in);
|
||||||
|
return rs_new CREVectorZToReal(a);
|
||||||
|
}
|
||||||
|
case SBIG('VMAG'): {
|
||||||
|
CVectorElement* a = GetVectorElement(in);
|
||||||
|
return rs_new CREVectorMagnitude(a);
|
||||||
|
}
|
||||||
|
case SBIG('ISWT'): {
|
||||||
|
CRealElement* a = GetRealElement(in);
|
||||||
|
CRealElement* b = GetRealElement(in);
|
||||||
|
return rs_new CREInitialSwitch(a, b);
|
||||||
|
}
|
||||||
|
case SBIG('CLTN'): {
|
||||||
|
CRealElement* a = GetRealElement(in);
|
||||||
|
CRealElement* b = GetRealElement(in);
|
||||||
|
CRealElement* c = GetRealElement(in);
|
||||||
|
CRealElement* d = GetRealElement(in);
|
||||||
|
return rs_new CRECompareLessThan(a, b, c, d);
|
||||||
|
}
|
||||||
|
case SBIG('CEQL'): {
|
||||||
|
CRealElement* a = GetRealElement(in);
|
||||||
|
CRealElement* b = GetRealElement(in);
|
||||||
|
CRealElement* c = GetRealElement(in);
|
||||||
|
CRealElement* d = GetRealElement(in);
|
||||||
|
return rs_new CRECompareEqual(a, b, c, d);
|
||||||
|
}
|
||||||
|
case SBIG('CRNG'): {
|
||||||
|
CRealElement* a = GetRealElement(in);
|
||||||
|
CRealElement* b = GetRealElement(in);
|
||||||
|
CRealElement* c = GetRealElement(in);
|
||||||
|
CRealElement* d = GetRealElement(in);
|
||||||
|
CRealElement* e = GetRealElement(in);
|
||||||
|
return rs_new CREConstantRange(a, b, c, d, e);
|
||||||
|
}
|
||||||
|
case SBIG('CEXT'): {
|
||||||
|
CIntElement* a = GetIntElement(in);
|
||||||
|
return rs_new CREExternalVar(a);
|
||||||
|
}
|
||||||
|
case SBIG('ITRL'): {
|
||||||
|
CIntElement* a = GetIntElement(in);
|
||||||
|
CRealElement* b = GetRealElement(in);
|
||||||
|
return rs_new CREIntTimesReal(a, b);
|
||||||
|
}
|
||||||
|
case SBIG('SUB_'): {
|
||||||
|
CRealElement* a = GetRealElement(in);
|
||||||
|
CRealElement* b = GetRealElement(in);
|
||||||
|
return rs_new CRESubtract(a, b);
|
||||||
|
}
|
||||||
|
case SBIG('GTCR'): {
|
||||||
|
CColorElement* alpha = GetColorElement(in);
|
||||||
|
return rs_new CREGetComponentRed(alpha);
|
||||||
|
}
|
||||||
|
case SBIG('GTCG'): {
|
||||||
|
CColorElement* alpha = GetColorElement(in);
|
||||||
|
return rs_new CREGetComponentGreen(alpha);
|
||||||
|
}
|
||||||
|
case SBIG('GTCB'): {
|
||||||
|
CColorElement* alpha = GetColorElement(in);
|
||||||
|
return rs_new CREGetComponentBlue(alpha);
|
||||||
|
}
|
||||||
|
case SBIG('GTCA'): {
|
||||||
|
CColorElement* alpha = GetColorElement(in);
|
||||||
|
return rs_new CREGetComponentAlpha(alpha);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
CVectorElement* CParticleDataFactory::GetVectorElement(CInputStream& in) { return nullptr; }
|
||||||
|
|
||||||
|
CEmitterElement* CParticleDataFactory::GetEmitterElement(CInputStream& in) { return nullptr; }
|
||||||
|
|
||||||
CModVectorElement* CParticleDataFactory::GetModVectorElement(CInputStream& in) {
|
CModVectorElement* CParticleDataFactory::GetModVectorElement(CInputStream& in) {
|
||||||
FourCC clsId = GetClassID(in);
|
FourCC clsId = GetClassID(in);
|
||||||
switch (clsId) {
|
switch (clsId) {
|
||||||
@ -219,3 +403,9 @@ CModVectorElement* CParticleDataFactory::GetModVectorElement(CInputStream& in) {
|
|||||||
}
|
}
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CColorElement* CParticleDataFactory::GetColorElement(CInputStream& in) { return nullptr; }
|
||||||
|
|
||||||
|
CUVElement* CParticleDataFactory::GetTextureElement(CInputStream& in, CSimplePool* resPool) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user