diff --git a/Runtime/Particle/CElementGen.cpp b/Runtime/Particle/CElementGen.cpp index c58b0ef1b..652d7a804 100644 --- a/Runtime/Particle/CElementGen.cpp +++ b/Runtime/Particle/CElementGen.cpp @@ -61,9 +61,9 @@ CElementGenShaders::EShaderClass CElementGenShaders::GetShaderClass(CElementGen& { CGenDescription* desc = gen.x1c_genDesc.GetObj(); - if (desc->x54_TEXR) + if (desc->x54_x40_TEXR) { - if (desc->x58_TIND) + if (desc->x58_x44_TIND) return EShaderClass::IndTex; else return EShaderClass::Tex; @@ -78,11 +78,11 @@ void CElementGenShaders::BuildShaderDataBinding(CElementGen& gen) boo::IShaderPipeline* regPipeline = nullptr; boo::IShaderPipeline* redToAlphaPipeline = nullptr; - if (desc->x54_TEXR) + if (desc->x54_x40_TEXR) { - if (desc->x58_TIND) + if (desc->x58_x44_TIND) { - if (desc->x45_30_CIND) + if (desc->x45_30_x32_24_CIND) { if (gen.x224_26_AAPH) regPipeline = m_cindTexAdditive; @@ -285,45 +285,45 @@ CElementGen::CElementGen(const TToken& gen, } x230_randState.SetSeed(x74_randomSeed); ++g_ParticleSystemAliveCount; - x224_25_LIT_ = desc->x44_29_LIT_; - x224_26_AAPH = desc->x44_26_AAPH; - x224_27_ZBUF = desc->x44_27_ZBUF; - x224_29_MBLR = desc->x44_30_MBLR; + x224_25_LIT_ = desc->x44_29_x30_29_LIT_; + x224_26_AAPH = desc->x44_26_x30_26_AAPH; + x224_27_ZBUF = desc->x44_27_x30_27_ZBUF; + x224_29_MBLR = desc->x44_30_x31_24_MBLR; - CIntElement* mbspElem = desc->x48_MBSP.get(); + CIntElement* mbspElem = desc->x48_x34_MBSP.get(); if (mbspElem) mbspElem->GetValue(x50_curFrame, x228_MBSP); m_maxMBSP = x228_MBSP; - x224_30_VMD1 = desc->x45_26_VMD1; - x224_31_VMD2 = desc->x45_27_VMD2; - x225_24_VMD3 = desc->x45_28_VMD3; - x225_25_VMD4 = desc->x45_29_VMD4; + x224_30_VMD1 = desc->x45_26_x31_28_VMD1; + x224_31_VMD2 = desc->x45_27_x31_29_VMD2; + x225_24_VMD3 = desc->x45_28_x31_30_VMD3; + x225_25_VMD4 = desc->x45_29_x31_31_VMD4; - CIntElement* cssdElem = desc->xa0_CSSD.get(); + CIntElement* cssdElem = desc->xa0_x8c_CSSD.get(); if (cssdElem) cssdElem->GetValue(0, x244_CSSD); - SChildGeneratorDesc& idts = desc->xa4_IDTS; + SChildGeneratorDesc& idts = desc->xa4_x90_IDTS; if (idts.m_found) { int ndsyVal = 1; - CIntElement* ndsyElem = desc->xb4_NDSY.get(); + CIntElement* ndsyElem = desc->xb4_xa0_NDSY.get(); if (ndsyElem) ndsyElem->GetValue(0, ndsyVal); x248_finishPartChildren.reserve(ndsyVal + x248_finishPartChildren.size()); for (int i=0 ; ixa4_IDTS.m_token.GetObj(); - if (x226_enableOPTS && chDesc->x45_31_OPTS) + CGenDescription* chDesc = desc->xa4_x90_IDTS.m_token.GetObj(); + if (x226_enableOPTS && chDesc->x45_31_x32_25_OPTS) break; - x248_finishPartChildren.emplace_back(new CElementGen(desc->xa4_IDTS.m_token, + x248_finishPartChildren.emplace_back(new CElementGen(desc->xa4_x90_IDTS.m_token, EModelOrientationType::Normal, x226_enableOPTS ? EOptionalSystemFlags::Two : EOptionalSystemFlags::One)); } } - CIntElement* pisyElem = desc->xc8_PISY.get(); + CIntElement* pisyElem = desc->xc8_xb4_PISY.get(); if (pisyElem) { pisyElem->GetValue(0, x25c_PISY); @@ -331,33 +331,35 @@ CElementGen::CElementGen(const TToken& gen, x25c_PISY = 1; } - CIntElement* sisyElem = desc->xcc_SISY.get(); + CIntElement* sisyElem = desc->xcc_xb8_SISY.get(); if (sisyElem) pisyElem->GetValue(0, x258_SISY); - CIntElement* sssdElem = desc->xe4_SSSD.get(); + CIntElement* sssdElem = desc->xe4_xd0_SSSD.get(); if (sssdElem) sssdElem->GetValue(0, x270_SSSD); - CVectorElement* sspoElem = desc->xe8_SSPO.get(); + CVectorElement* sspoElem = desc->xe8_xd4_SSPO.get(); if (sspoElem) sspoElem->GetValue(0, x274_SSPO); - CIntElement* sesdElem = desc->xf8_SESD.get(); + CIntElement* sesdElem = desc->xf8_xe4_SESD.get(); if (sesdElem) sesdElem->GetValue(0, x290_SESD); - CVectorElement* sepoElem = desc->xfc_SEPO.get(); + CVectorElement* sepoElem = desc->xfc_xe8_SEPO.get(); if (sepoElem) sepoElem->GetValue(0, x294_SEPO); - CIntElement* psltElem = desc->xc_PSLT.get(); + CIntElement* psltElem = desc->xc_x0_PSLT.get(); if (psltElem) psltElem->GetValue(0, x214_PSLT); + /* Removed from retail CVectorElement* psivElem = desc->x0_PSIV.get(); if (psivElem) psivElem->GetValue(0, x218_PSIV); + */ CIntElement* maxpElem = desc->x28_MAXP.get(); if (maxpElem) @@ -370,14 +372,14 @@ CElementGen::CElementGen(const TToken& gen, Zeus::CMatrix3f::skIdentityMatrix3f); } - x225_26_LINE = desc->x44_24_LINE; - x225_27_FXLL = desc->x44_25_FXLL; + x225_26_LINE = desc->x44_24_x30_24_LINE; + x225_27_FXLL = desc->x44_25_x30_25_FXLL; CVectorElement* pofsElem = desc->x18_POFS.get(); if (pofsElem) pofsElem->GetValue(x50_curFrame, x94_POFS); - CIntElement* ltypElem = desc->x100_LTYP.get(); + CIntElement* ltypElem = desc->x100_xec_LTYP.get(); if (ltypElem) { int ltyp; @@ -400,7 +402,7 @@ CElementGen::CElementGen(const TToken& gen, } } - CIntElement* lfotElem = desc->x114_LFOT.get(); + CIntElement* lfotElem = desc->x114_x100_LFOT.get(); if (lfotElem) { int lfot; @@ -422,7 +424,7 @@ CElementGen::CElementGen(const TToken& gen, if (x225_26_LINE) { - CUVElement* texr = desc->x54_TEXR.get(); + CUVElement* texr = desc->x54_x40_TEXR.get(); boo::ITexture* tex = nullptr; if (texr) tex = texr->GetValueTexture(0).GetObj()->GetBooTexture(); @@ -455,7 +457,7 @@ CElementGen::~CElementGen() void CElementGen::Update(double t) { CGenDescription* desc = x1c_genDesc.GetObj(); - CIntElement* pswtElem = desc->x10_PSWT.get(); + CIntElement* pswtElem = desc->x10_x4_PSWT.get(); if (pswtElem && !x225_28_warmedUp) { int pswt = 0; @@ -483,7 +485,7 @@ bool CElementGen::InternalUpdate(double dt) double t = x50_curFrame / 60.0; CParticleGlobals::SetEmitterTime(x50_curFrame); - CRealElement* pstsElem = desc->x14_PSTS.get(); + CRealElement* pstsElem = desc->x14_x8_PSTS.get(); if (pstsElem) { float psts; @@ -496,7 +498,7 @@ bool CElementGen::InternalUpdate(double dt) if (x224_29_MBLR && dt > 0.0) { - CIntElement* mbspElem = desc->x48_MBSP.get(); + CIntElement* mbspElem = desc->x48_x34_MBSP.get(); if (mbspElem) mbspElem->GetValue(x50_curFrame, x228_MBSP); x228_MBSP = std::min(x228_MBSP, m_maxMBSP); @@ -618,7 +620,7 @@ void CElementGen::UpdateExistingParticles() CParticleGlobals::UpdateParticleLifetimeTweenValues(particleFrame); bool err = false; - CModVectorElement* vel1 = desc->x7c_VEL1.get(); + CModVectorElement* vel1 = desc->x7c_x68_VEL1.get(); if (vel1) { if (x224_30_VMD1) @@ -635,7 +637,7 @@ void CElementGen::UpdateExistingParticles() } } - CModVectorElement* vel2 = desc->x80_VEL2.get(); + CModVectorElement* vel2 = desc->x80_x6c_VEL2.get(); if (vel2) { if (x224_31_VMD2) @@ -652,7 +654,7 @@ void CElementGen::UpdateExistingParticles() } } - CModVectorElement* vel3 = desc->x84_VEL3.get(); + CModVectorElement* vel3 = desc->x84_x70_VEL3.get(); if (vel3) { if (x225_24_VMD3) @@ -669,7 +671,7 @@ void CElementGen::UpdateExistingParticles() } } - CModVectorElement* vel4 = desc->x88_VEL4.get(); + CModVectorElement* vel4 = desc->x88_x74_VEL4.get(); if (vel4) { if (x225_25_VMD4) @@ -697,10 +699,10 @@ void CElementGen::UpdateExistingParticles() } else { - CRealElement* rota = desc->x50_ROTA.get(); + CRealElement* rota = desc->x50_x3c_ROTA.get(); if (rota) err |= rota->GetValue(particleFrame, particle.x30_lineWidthOrRota); - CRealElement* size = desc->x4c_SIZE.get(); + CRealElement* size = desc->x4c_x38_SIZE.get(); if (size) err |= size->GetValue(particleFrame, particle.x2c_lineLengthOrSize); } @@ -757,7 +759,7 @@ void CElementGen::CreateNewParticles(int count) else particle.x34_color = Zeus::CColor::skWhite; - CEmitterElement* emtr = desc->x40_EMTR.get(); + CEmitterElement* emtr = desc->x40_x2c_EMTR.get(); if (emtr) { emtr->GetValue(x210_curEmitterFrame, particle.x4_pos, particle.x1c_vel); @@ -790,13 +792,13 @@ void CElementGen::CreateNewParticles(int count) } else { - CRealElement* rota = desc->x50_ROTA.get(); + CRealElement* rota = desc->x50_x3c_ROTA.get(); if (rota) rota->GetValue(0, particle.x30_lineWidthOrRota); else particle.x30_lineWidthOrRota = 0.f; - CRealElement* size = desc->x4c_SIZE.get(); + CRealElement* size = desc->x4c_x38_SIZE.get(); if (size) size->GetValue(0, particle.x2c_lineLengthOrSize); else @@ -817,6 +819,7 @@ void CElementGen::UpdatePSTranslationAndOrientation() if (x214_PSLT < x50_curFrame) return; + /* Removed from retail CModVectorElement* psvm = desc->x4_PSVM.get(); if (psvm) { @@ -845,16 +848,17 @@ void CElementGen::UpdatePSTranslationAndOrientation() xf.rotateLocalZ(angles[2] * M_PI / 180.f); SetOrientation(xf); } + */ CVectorElement* pofs = desc->x18_POFS.get(); if (pofs) pofs->GetValue(x50_curFrame, x94_POFS); - CVectorElement* sspo = desc->xe8_SSPO.get(); + CVectorElement* sspo = desc->xe8_xd4_SSPO.get(); if (sspo) sspo->GetValue(x50_curFrame, x274_SSPO); - CVectorElement* sepo = desc->xfc_SEPO.get(); + CVectorElement* sepo = desc->xfc_xe8_SEPO.get(); if (sepo) sspo->GetValue(x50_curFrame, x294_SEPO); } @@ -879,16 +883,16 @@ void CElementGen::UpdateChildParticleSystems(double dt) CGenDescription* desc = x1c_genDesc.GetObj(); CGlobalRandom gr(x230_randState); - SChildGeneratorDesc& icts = desc->x8c_ICTS; + SChildGeneratorDesc& icts = desc->x8c_x78_ICTS; if (icts.m_found && x64_prevFrame != x50_curFrame && x244_CSSD == x50_curFrame) { int ncsyVal = 1; - CIntElement* ncsy = desc->x9c_NCSY.get(); + CIntElement* ncsy = desc->x9c_x88_NCSY.get(); if (ncsy) ncsy->GetValue(x50_curFrame, ncsyVal); CGenDescription* ictsDesc = icts.m_token.GetObj(); - if (!(x226_enableOPTS && ictsDesc->x45_31_OPTS)) + if (!(x226_enableOPTS && ictsDesc->x45_31_x32_25_OPTS)) { x234_activePartChildren.reserve(ncsyVal + x234_activePartChildren.size()); for (int i=0 ; ixb8_IITS; + SChildGeneratorDesc& iits = desc->xb8_xa4_IITS; if (iits.m_found && x64_prevFrame != x50_curFrame && x50_curFrame < x214_PSLT && x68_particleEmission == 1 && x50_curFrame >= x258_SISY && ((x50_curFrame - x258_SISY) % x25c_PISY) == 0) { CGenDescription* iitsDesc = iits.m_token.GetObj(); - if (!(x226_enableOPTS && iitsDesc->x45_31_OPTS)) + if (!(x226_enableOPTS && iitsDesc->x45_31_x32_25_OPTS)) { CElementGen* chGen = ConstructChildParticleSystem(iits.m_token); x234_activePartChildren.emplace_back(chGen); } } - CSpawnSystemKeyframeData* kssm = desc->xd0_KSSM.get(); + CSpawnSystemKeyframeData* kssm = desc->xd0_xbc_KSSM.get(); if (kssm && x64_prevFrame != x50_curFrame && x50_curFrame < x214_PSLT) { std::vector& systems = @@ -921,7 +925,7 @@ void CElementGen::UpdateChildParticleSystems(double dt) for (CSpawnSystemKeyframeData::CSpawnSystemKeyframeInfo& system : systems) { TLockedToken& token = system.GetToken(); - if (!(x226_enableOPTS && token.GetObj()->x45_31_OPTS)) + if (!(x226_enableOPTS && token.GetObj()->x45_31_x32_25_OPTS)) { CElementGen* chGen = ConstructChildParticleSystem(token); x234_activePartChildren.emplace_back(chGen); @@ -929,7 +933,7 @@ void CElementGen::UpdateChildParticleSystems(double dt) } } - SSwooshGeneratorDesc& sswh = desc->xd4_SSWH; + SSwooshGeneratorDesc& sswh = desc->xd4_xc0_SSWH; if (sswh.m_found && x64_prevFrame != x50_curFrame && x50_curFrame == x270_SSSD) { CParticleSwoosh* sswhGen = new CParticleSwoosh(sswh.m_token, 0); @@ -941,7 +945,7 @@ void CElementGen::UpdateChildParticleSystems(double dt) x260_swhcChildren.emplace_back(sswhGen); } - SElectricGeneratorDesc& selc = desc->xec_SELC; + SElectricGeneratorDesc& selc = desc->xec_xd8_SELC; if (selc.m_found && x64_prevFrame != x50_curFrame && x50_curFrame == x290_SESD) { CParticleElectric* selcGen = new CParticleElectric(selc.m_token); @@ -1045,11 +1049,11 @@ void CElementGen::UpdateLightParameters() { CGenDescription* desc = x1c_genDesc.GetObj(); - CColorElement* lclr = desc->x104_LCLR.get(); + CColorElement* lclr = desc->x104_xf0_LCLR.get(); if (lclr) lclr->GetValue(x50_curFrame, x2e0_LCLR); - CRealElement* lint = desc->x108_LINT.get(); + CRealElement* lint = desc->x108_xf4_LINT.get(); if (lint) lint->GetValue(x50_curFrame, x2e4_LINT); @@ -1060,17 +1064,17 @@ void CElementGen::UpdateLightParameters() case LightType::Custom: case LightType::Spot: { - CVectorElement* loff = desc->x10c_LOFF.get(); + CVectorElement* loff = desc->x10c_xf8_LOFF.get(); if (loff) loff->GetValue(x50_curFrame, x2e8_LOFF); - CRealElement* lfor = desc->x118_LFOR.get(); + CRealElement* lfor = desc->x118_x104_LFOR.get(); if (lfor) lfor->GetValue(x50_curFrame, x304_LFOR); if (x2dc_lightType == LightType::Spot) { - CRealElement* lsla = desc->x11c_LSLA.get(); + CRealElement* lsla = desc->x11c_x108_LSLA.get(); if (lsla) lsla->GetValue(x50_curFrame, x308_LSLA); } @@ -1079,7 +1083,7 @@ void CElementGen::UpdateLightParameters() { if (x2dc_lightType != LightType::Custom) { - CVectorElement* ldir = desc->x110_LDIR.get(); + CVectorElement* ldir = desc->x110_xfc_LDIR.get(); if (ldir) ldir->GetValue(x50_curFrame, x2f4_LDIR); } @@ -1209,8 +1213,8 @@ void CElementGen::Render() if (x2c_particleLists.size()) { - SParticleModel& pmdl = desc->x5c_PMDL; - if (pmdl.m_found || desc->x45_24_PMUS) + SParticleModel& pmdl = desc->x5c_x48_PMDL; + if (pmdl.m_found || desc->x45_24_x31_26_PMUS) RenderModels(); if (x225_26_LINE) @@ -1230,17 +1234,17 @@ void CElementGen::RenderModels() CGlobalRandom gr(x230_randState); SUVElementSet uvs = {0.f, 0.f, 1.f, 1.f}; - CUVElement* texr = desc->x54_TEXR.get(); + CUVElement* texr = desc->x54_x40_TEXR.get(); CTexture* cachedTex = nullptr; bool texConst = true; bool moveRedToAlphaBuffer = false; - if (desc->x45_24_PMUS) + if (desc->x45_24_x31_26_PMUS) { - if (g_MoveRedToAlphaBuffer && desc->x44_31_PMAB && desc->x54_TEXR) + if (g_MoveRedToAlphaBuffer && desc->x44_31_x31_25_PMAB && desc->x54_x40_TEXR) moveRedToAlphaBuffer = true; - if (desc->x44_31_PMAB) + if (desc->x44_31_x31_25_PMAB) { CGraphics::SetDepthWriteMode(true, ERglEnum::LEqual, false); if (moveRedToAlphaBuffer) @@ -1274,11 +1278,11 @@ void CElementGen::RenderModels() } Zeus::CTransform orient = Zeus::CTransform::Identity(); - if (desc->x45_25_PMOO) + if (desc->x45_25_x31_27_PMOO) orient = x178_orientation; orient = orient * x1d8_globalOrientation; - CVectorElement* pmrt = desc->x70_PMRT.get(); + CVectorElement* pmrt = desc->x70_x5c_PMRT.get(); bool pmrtConst = false; if (pmrt) pmrtConst = pmrt->IsFastConstant(); @@ -1314,7 +1318,7 @@ void CElementGen::RenderModels() CParticleGlobals::SetParticleLifetime(particle.x0_endFrame - particle.x28_startFrame); int partFrame = x50_curFrame - particle.x28_startFrame - 1; CParticleGlobals::UpdateParticleLifetimeTweenValues(partFrame); - CVectorElement* pmop = desc->x6c_PMOP.get(); + CVectorElement* pmop = desc->x6c_x58_PMOP.get(); if (pmop) pmop->GetValue(partFrame, pmopVec); @@ -1352,7 +1356,7 @@ void CElementGen::RenderModels() } } - CVectorElement* pmsc = desc->x74_PMSC.get(); + CVectorElement* pmsc = desc->x74_x60_PMSC.get(); if (pmsc) { Zeus::CVector3f pmscVal; @@ -1360,13 +1364,13 @@ void CElementGen::RenderModels() partTrans = partTrans * Zeus::CTransform::Scale(pmscVal); } - CColorElement* pmcl = desc->x78_PMCL.get(); + CColorElement* pmcl = desc->x78_x64_PMCL.get(); if (pmcl) pmcl->GetValue(partFrame, col); CGraphics::SetModelMatrix((xac_globalScaleTransform * partTrans) * x118_localScaleTransform); - if (desc->x45_24_PMUS) + if (desc->x45_24_x31_26_PMUS) { if (!texConst) { @@ -1386,8 +1390,8 @@ void CElementGen::RenderModels() } else { - CModel* model = desc->x5c_PMDL.m_token.GetObj(); - if (desc->x44_31_PMAB) + CModel* model = desc->x5c_x48_PMDL.m_token.GetObj(); + if (desc->x44_31_x31_25_PMAB) { model->Draw({3, 0, 1, col}); } @@ -1442,7 +1446,7 @@ void CElementGen::RenderLines() if (widt) widtConst = widt->IsConstant(); - CUVElement* texr = desc->x54_TEXR.get(); + CUVElement* texr = desc->x54_x40_TEXR.get(); SUVElementSet uvs = {0.f, 0.f, 1.f, 1.f}; bool constTexr = true; bool constUVs = true; @@ -1528,15 +1532,15 @@ void CElementGen::RenderParticles() CGenDescription* desc = x1c_genDesc.GetObj(); CGlobalRandom gr(x230_randState); - CUVElement* texr = desc->x54_TEXR.get(); - CUVElement* tind = desc->x58_TIND.get(); + CUVElement* texr = desc->x54_x40_TEXR.get(); + CUVElement* tind = desc->x58_x44_TIND.get(); if (texr && tind) { RenderParticlesIndirectTexture(); return; } - CRealElement* size = desc->x4c_SIZE.get(); + CRealElement* size = desc->x4c_x38_SIZE.get(); if (size && size->IsConstant()) { float sizeVal; @@ -1588,7 +1592,7 @@ void CElementGen::RenderParticles() m_uniformBuf->load(&uniformData, sizeof(SParticleUniforms)); - if (desc->x44_28_SORT) + if (desc->x44_28_x30_28_SORT) { for (CParticleListItem& item : x2c_particleLists) { @@ -1636,7 +1640,7 @@ void CElementGen::RenderParticles() int partFrame = x50_curFrame - particle.x28_startFrame - 1; Zeus::CVector3f viewPoint; - if (desc->x44_28_SORT) + if (desc->x44_28_x30_28_SORT) viewPoint = item.x4_viewPoint; else viewPoint = systemCameraMatrix * ((particle.x4_pos - particle.x10_prevPos) * x60_timeDeltaScale + particle.x10_prevPos); @@ -1917,7 +1921,7 @@ void CElementGen::RenderParticlesIndirectTexture() CGraphics::SetBlendMode(ERglBlendMode::Blend, ERglBlendFactor::SrcAlpha, ERglBlendFactor::InvSrcAlpha, ERglLogicOp::Clear); } - CUVElement* texr = desc->x54_TEXR.get(); + CUVElement* texr = desc->x54_x40_TEXR.get(); CParticle& firstParticle = g_StaticParticleList[x2c_particleLists[0].x0_partIdx]; int partFrame = x50_curFrame - firstParticle.x28_startFrame; CTexture* cachedTex = texr->GetValueTexture(partFrame).GetObj(); @@ -1928,7 +1932,7 @@ void CElementGen::RenderParticlesIndirectTexture() texr->GetValueUV(partFrame, uvs); bool constUVs = texr->HasConstantUV(); - CUVElement* tind = desc->x58_TIND.get(); + CUVElement* tind = desc->x58_x44_TIND.get(); CTexture* cachedIndTex = tind->GetValueTexture(partFrame).GetObj(); cachedIndTex->Load(2, CTexture::EClampMode::One); @@ -1937,7 +1941,7 @@ void CElementGen::RenderParticlesIndirectTexture() bool constIndUVs = tind->HasConstantUV(); tind->GetValueUV(partFrame, uvsInd); - if (desc->x44_28_SORT) + if (desc->x44_28_x30_28_SORT) { for (CParticleListItem& item : x2c_particleLists) { @@ -1960,7 +1964,7 @@ void CElementGen::RenderParticlesIndirectTexture() int partFrame = x50_curFrame - particle.x28_startFrame; Zeus::CVector3f viewPoint; - if (desc->x44_28_SORT) + if (desc->x44_28_x30_28_SORT) viewPoint = item.x4_viewPoint; else viewPoint = systemCameraMatrix * ((particle.x4_pos - particle.x10_prevPos) * x60_timeDeltaScale + particle.x10_prevPos); diff --git a/Runtime/Particle/CElementGenShadersGLSL.cpp b/Runtime/Particle/CElementGenShadersGLSL.cpp index d701262d7..0cd5b8e69 100644 --- a/Runtime/Particle/CElementGenShadersGLSL.cpp +++ b/Runtime/Particle/CElementGenShadersGLSL.cpp @@ -193,8 +193,8 @@ struct OGLElementDataBindingFactory : CElementGenShaders::IDataBindingFactory CGenDescription* desc = gen.GetDesc(); boo::IVertexFormat* vtxFmt = nullptr; - CUVElement* texr = desc->x54_TEXR.get(); - CUVElement* tind = desc->x58_TIND.get(); + CUVElement* texr = desc->x54_x40_TEXR.get(); + CUVElement* tind = desc->x58_x44_TIND.get(); int texCount = 0; boo::ITexture* textures[3]; @@ -349,8 +349,8 @@ struct VulkanElementDataBindingFactory : CElementGenShaders::IDataBindingFactory { CGenDescription* desc = gen.GetDesc(); - CUVElement* texr = desc->x54_TEXR.get(); - CUVElement* tind = desc->x58_TIND.get(); + CUVElement* texr = desc->x54_x40_TEXR.get(); + CUVElement* tind = desc->x58_x44_TIND.get(); int texCount = 0; boo::ITexture* textures[3]; diff --git a/Runtime/Particle/CElementGenShadersHLSL.cpp b/Runtime/Particle/CElementGenShadersHLSL.cpp index 3637041de..bbb3a7f89 100644 --- a/Runtime/Particle/CElementGenShadersHLSL.cpp +++ b/Runtime/Particle/CElementGenShadersHLSL.cpp @@ -196,8 +196,8 @@ struct D3DElementDataBindingFactory : CElementGenShaders::IDataBindingFactory { CGenDescription* desc = gen.GetDesc(); - CUVElement* texr = desc->x54_TEXR.get(); - CUVElement* tind = desc->x58_TIND.get(); + CUVElement* texr = desc->x54_x40_TEXR.get(); + CUVElement* tind = desc->x58_x44_TIND.get(); int texCount = 0; boo::ITexture* textures[3]; diff --git a/Runtime/Particle/CElementGenShadersMetal.cpp b/Runtime/Particle/CElementGenShadersMetal.cpp index da3b67f1b..336f8e8f7 100644 --- a/Runtime/Particle/CElementGenShadersMetal.cpp +++ b/Runtime/Particle/CElementGenShadersMetal.cpp @@ -217,8 +217,8 @@ struct MetalElementDataBindingFactory : CElementGenShaders::IDataBindingFactory { CGenDescription* desc = gen.GetDesc(); - CUVElement* texr = desc->x54_TEXR.get(); - CUVElement* tind = desc->x58_TIND.get(); + CUVElement* texr = desc->x54_x40_TEXR.get(); + CUVElement* tind = desc->x58_x44_TIND.get(); int texCount = 0; boo::ITexture* textures[3]; diff --git a/Runtime/Particle/CGenDescription.cpp b/Runtime/Particle/CGenDescription.cpp deleted file mode 100644 index e69de29bb..000000000 diff --git a/Runtime/Particle/CGenDescription.hpp b/Runtime/Particle/CGenDescription.hpp index f3bf1712a..c3b6b84f2 100644 --- a/Runtime/Particle/CGenDescription.hpp +++ b/Runtime/Particle/CGenDescription.hpp @@ -12,18 +12,23 @@ #include "CSpawnSystemKeyframeData.hpp" #include "CParticleDataFactory.hpp" +/* Documentation at: http://www.metroid2002.com/retromodding/wiki/PART_(File_Format) */ + namespace pshag { class CGenDescription { public: - std::unique_ptr x0_PSIV; - std::unique_ptr x4_PSVM; - std::unique_ptr x8_PSOV; - std::unique_ptr xc_PSLT; - std::unique_ptr x10_PSWT; - std::unique_ptr x14_PSTS; + /* Naming convention: __ */ + + /* Removed from demo */ + //std::unique_ptr x0_PSIV; + //std::unique_ptr x4_PSVM; + //std::unique_ptr x8_PSOV; + std::unique_ptr xc_x0_PSLT; + std::unique_ptr x10_x4_PSWT; + std::unique_ptr x14_x8_PSTS; std::unique_ptr x18_POFS; std::unique_ptr x1c_SEED; std::unique_ptr x20_LENG; @@ -32,68 +37,60 @@ public: std::unique_ptr x2c_GRTE; std::unique_ptr x30_COLR; std::unique_ptr x34_LTME; - std::unique_ptr x38_ILOC; - std::unique_ptr x3c_IVEC; - std::unique_ptr x40_EMTR; + /* Removed from demo (replaced by EMTR) */ + // std::unique_ptr x38_ILOC; + // std::unique_ptr x3c_IVEC; + std::unique_ptr x40_x2c_EMTR; union { struct { - bool x44_28_SORT : 1; bool x44_30_MBLR : 1; bool x44_24_LINE : 1; bool x44_29_LIT_ : 1; - bool x44_26_AAPH : 1; bool x44_27_ZBUF : 1; bool x44_25_FXLL : 1; bool x44_31_PMAB : 1; - bool x45_29_VMD4 : 1; bool x45_28_VMD3 : 1; bool x45_27_VMD2 : 1; bool x45_26_VMD1 : 1; - bool x45_31_OPTS : 1; bool x45_24_PMUS : 1; bool x45_25_PMOO : 1; bool x45_30_CIND : 1; + bool x44_28_x30_28_SORT : 1; bool x44_30_x31_24_MBLR : 1; bool x44_24_x30_24_LINE : 1; bool x44_29_x30_29_LIT_ : 1; + bool x44_26_x30_26_AAPH : 1; bool x44_27_x30_27_ZBUF : 1; bool x44_25_x30_25_FXLL : 1; bool x44_31_x31_25_PMAB : 1; + bool x45_29_x31_31_VMD4 : 1; bool x45_28_x31_30_VMD3 : 1; bool x45_27_x31_29_VMD2 : 1; bool x45_26_x31_28_VMD1 : 1; + bool x45_31_x32_25_OPTS : 1; bool x45_24_x31_26_PMUS : 1; bool x45_25_x31_27_PMOO : 1; bool x45_30_x32_24_CIND : 1; + /* 0-00 additions */ + bool x30_30_ORNT : 1; bool x30_31_RSOP : 1; }; - uint16_t dummy1 = 0; - }; - std::unique_ptr x48_MBSP; - std::unique_ptr x4c_SIZE; - std::unique_ptr x50_ROTA; - std::unique_ptr x54_TEXR; - std::unique_ptr x58_TIND; - SParticleModel x5c_PMDL; - std::unique_ptr x6c_PMOP; - std::unique_ptr x70_PMRT; - std::unique_ptr x74_PMSC; - std::unique_ptr x78_PMCL; - std::unique_ptr x7c_VEL1; - std::unique_ptr x80_VEL2; - std::unique_ptr x84_VEL3; - std::unique_ptr x88_VEL4; - SChildGeneratorDesc x8c_ICTS; - std::unique_ptr x9c_NCSY; - std::unique_ptr xa0_CSSD; - SChildGeneratorDesc xa4_IDTS; - std::unique_ptr xb4_NDSY; - SChildGeneratorDesc xb8_IITS; - std::unique_ptr xc8_PISY; - std::unique_ptr xcc_SISY; - std::unique_ptr xd0_KSSM; - SSwooshGeneratorDesc xd4_SSWH; - std::unique_ptr xe4_SSSD; - std::unique_ptr xe8_SSPO; - SElectricGeneratorDesc xec_SELC; - std::unique_ptr xf8_SESD; - std::unique_ptr xfc_SEPO; - std::unique_ptr x100_LTYP; - std::unique_ptr x104_LCLR; - std::unique_ptr x108_LINT; - std::unique_ptr x10c_LOFF; - std::unique_ptr x110_LDIR; - std::unique_ptr x114_LFOT; - std::unique_ptr x118_LFOR; - std::unique_ptr x11c_LSLA; - - /* 0-00 additions */ - union - { - struct - { - bool x30_30_ORNT : 1; - bool x30_31_RSOP : 1; - }; - uint16_t dummy2 = 0; + uint32_t dummy1 = 0; }; + std::unique_ptr x48_x34_MBSP; + std::unique_ptr x4c_x38_SIZE; + std::unique_ptr x50_x3c_ROTA; + std::unique_ptr x54_x40_TEXR; + std::unique_ptr x58_x44_TIND; + SParticleModel x5c_x48_PMDL; + std::unique_ptr x6c_x58_PMOP; + std::unique_ptr x70_x5c_PMRT; + std::unique_ptr x74_x60_PMSC; + std::unique_ptr x78_x64_PMCL; + std::unique_ptr x7c_x68_VEL1; + std::unique_ptr x80_x6c_VEL2; + std::unique_ptr x84_x70_VEL3; + std::unique_ptr x88_x74_VEL4; + SChildGeneratorDesc x8c_x78_ICTS; + std::unique_ptr x9c_x88_NCSY; + std::unique_ptr xa0_x8c_CSSD; + SChildGeneratorDesc xa4_x90_IDTS; + std::unique_ptr xb4_xa0_NDSY; + SChildGeneratorDesc xb8_xa4_IITS; + std::unique_ptr xc8_xb4_PISY; + std::unique_ptr xcc_xb8_SISY; + std::unique_ptr xd0_xbc_KSSM; + SSwooshGeneratorDesc xd4_xc0_SSWH; + std::unique_ptr xe4_xd0_SSSD; + std::unique_ptr xe8_xd4_SSPO; + SElectricGeneratorDesc xec_xd8_SELC; + std::unique_ptr xf8_xe4_SESD; + std::unique_ptr xfc_xe8_SEPO; + std::unique_ptr x100_xec_LTYP; + std::unique_ptr x104_xf0_LCLR; + std::unique_ptr x108_xf4_LINT; + std::unique_ptr x10c_xf8_LOFF; + std::unique_ptr x110_xfc_LDIR; + std::unique_ptr x114_x100_LFOT; + std::unique_ptr x118_x104_LFOR; + std::unique_ptr x11c_x108_LSLA; std::unique_ptr x10c_ADV1; std::unique_ptr x110_ADV2; std::unique_ptr x114_ADV3; @@ -109,7 +106,7 @@ public: CGenDescription() { - x45_25_PMOO = true; + x45_25_x31_27_PMOO = true; } }; diff --git a/Runtime/Particle/CMakeLists.txt b/Runtime/Particle/CMakeLists.txt index 746028a01..f0c8df72d 100644 --- a/Runtime/Particle/CMakeLists.txt +++ b/Runtime/Particle/CMakeLists.txt @@ -6,7 +6,7 @@ endif() add_library(RuntimeCommonParticle IElement.hpp - CGenDescription.hpp CGenDescription.cpp + CGenDescription.hpp CRealElement.hpp CRealElement.cpp CIntElement.hpp CIntElement.cpp CVectorElement.hpp CVectorElement.cpp diff --git a/Runtime/Particle/CParticleDataFactory.cpp b/Runtime/Particle/CParticleDataFactory.cpp index 219dd4ba4..cf044ebf5 100644 --- a/Runtime/Particle/CParticleDataFactory.cpp +++ b/Runtime/Particle/CParticleDataFactory.cpp @@ -861,62 +861,62 @@ bool CParticleDataFactory::CreateGPSM(CGenDescription* fillDesc, CInputStream& i switch (clsId) { case SBIG('PMCL'): - fillDesc->x78_PMCL.reset(GetColorElement(in)); + fillDesc->x78_x64_PMCL.reset(GetColorElement(in)); break; case SBIG('LFOR'): - fillDesc->x118_LFOR.reset(GetRealElement(in)); + fillDesc->x118_x104_LFOR.reset(GetRealElement(in)); break; case SBIG('IDTS'): - fillDesc->xa4_IDTS = GetChildGeneratorDesc(in, resPool, tracker); + fillDesc->xa4_x90_IDTS = GetChildGeneratorDesc(in, resPool, tracker); break; case SBIG('EMTR'): - fillDesc->x40_EMTR.reset(GetEmitterElement(in)); + fillDesc->x40_x2c_EMTR.reset(GetEmitterElement(in)); break; case SBIG('COLR'): fillDesc->x30_COLR.reset(GetColorElement(in)); break; case SBIG('CIND'): - fillDesc->x45_30_CIND = GetBool(in); + fillDesc->x45_30_x32_24_CIND = GetBool(in); break; case SBIG('AAPH'): - fillDesc->x44_26_AAPH = GetBool(in); + fillDesc->x44_26_x30_26_AAPH = GetBool(in); break; case SBIG('CSSD'): - fillDesc->xa0_CSSD.reset(GetIntElement(in)); + fillDesc->xa0_x8c_CSSD.reset(GetIntElement(in)); break; case SBIG('GRTE'): fillDesc->x2c_GRTE.reset(GetRealElement(in)); break; case SBIG('FXLL'): - fillDesc->x44_25_FXLL = GetBool(in); + fillDesc->x44_25_x30_25_FXLL = GetBool(in); break; case SBIG('ICTS'): - fillDesc->x8c_ICTS = GetChildGeneratorDesc(in, resPool, tracker); + fillDesc->x8c_x78_ICTS = GetChildGeneratorDesc(in, resPool, tracker); break; case SBIG('KSSM'): { - fillDesc->xd0_KSSM.reset(); + fillDesc->xd0_xbc_KSSM.reset(); FourCC cid = GetClassID(in); if (cid != SBIG('CNST')) break; - fillDesc->xd0_KSSM.reset(new CSpawnSystemKeyframeData(in)); - fillDesc->xd0_KSSM->LoadAllSpawnedSystemTokens(resPool); + fillDesc->xd0_xbc_KSSM.reset(new CSpawnSystemKeyframeData(in)); + fillDesc->xd0_xbc_KSSM->LoadAllSpawnedSystemTokens(resPool); break; } case SBIG('ILOC'): - fillDesc->x38_ILOC.reset(GetVectorElement(in)); + delete GetVectorElement(in); break; case SBIG('IITS'): - fillDesc->xb8_IITS = GetChildGeneratorDesc(in, resPool, tracker); + fillDesc->xb8_xa4_IITS = GetChildGeneratorDesc(in, resPool, tracker); break; case SBIG('IVEC'): - fillDesc->x3c_IVEC.reset(GetVectorElement(in)); + delete GetVectorElement(in); break; case SBIG('LDIR'): - fillDesc->x110_LDIR.reset(GetVectorElement(in)); + fillDesc->x110_xfc_LDIR.reset(GetVectorElement(in)); break; case SBIG('LCLR'): - fillDesc->x104_LCLR.reset(GetColorElement(in)); + fillDesc->x104_xf0_LCLR.reset(GetColorElement(in)); break; case SBIG('LENG'): fillDesc->x20_LENG.reset(GetRealElement(in)); @@ -925,151 +925,151 @@ bool CParticleDataFactory::CreateGPSM(CGenDescription* fillDesc, CInputStream& i fillDesc->x28_MAXP.reset(GetIntElement(in)); break; case SBIG('LOFF'): - fillDesc->x10c_LOFF.reset(GetVectorElement(in)); + fillDesc->x10c_xf8_LOFF.reset(GetVectorElement(in)); break; case SBIG('LINT'): - fillDesc->x108_LINT.reset(GetRealElement(in)); + fillDesc->x108_xf4_LINT.reset(GetRealElement(in)); break; case SBIG('LINE'): - fillDesc->x44_24_LINE = GetBool(in); + fillDesc->x44_24_x30_24_LINE = GetBool(in); break; case SBIG('LFOT'): - fillDesc->x114_LFOT.reset(GetIntElement(in)); + fillDesc->x114_x100_LFOT.reset(GetIntElement(in)); break; case SBIG('LIT_'): - fillDesc->x44_29_LIT_ = GetBool(in); + fillDesc->x44_29_x30_29_LIT_ = GetBool(in); break; case SBIG('LTME'): fillDesc->x34_LTME.reset(GetIntElement(in)); break; case SBIG('LSLA'): - fillDesc->x11c_LSLA.reset(GetRealElement(in)); + fillDesc->x11c_x108_LSLA.reset(GetRealElement(in)); break; case SBIG('LTYP'): - fillDesc->x100_LTYP.reset(GetIntElement(in)); + fillDesc->x100_xec_LTYP.reset(GetIntElement(in)); break; case SBIG('NDSY'): - fillDesc->xb4_NDSY.reset(GetIntElement(in)); + fillDesc->xb4_xa0_NDSY.reset(GetIntElement(in)); break; case SBIG('MBSP'): - fillDesc->x48_MBSP.reset(GetIntElement(in)); + fillDesc->x48_x34_MBSP.reset(GetIntElement(in)); break; case SBIG('MBLR'): - fillDesc->x44_30_MBLR = GetBool(in); + fillDesc->x44_30_x31_24_MBLR = GetBool(in); break; case SBIG('NCSY'): - fillDesc->x9c_NCSY.reset(GetIntElement(in)); + fillDesc->x9c_x88_NCSY.reset(GetIntElement(in)); break; case SBIG('PISY'): - fillDesc->xc8_PISY.reset(GetIntElement(in)); + fillDesc->xc8_xb4_PISY.reset(GetIntElement(in)); break; case SBIG('OPTS'): - fillDesc->x45_31_OPTS = GetBool(in); + fillDesc->x45_31_x32_25_OPTS = GetBool(in); break; case SBIG('PMAB'): - fillDesc->x44_31_PMAB = GetBool(in); + fillDesc->x44_31_x31_25_PMAB = GetBool(in); break; case SBIG('SESD'): - fillDesc->xf8_SESD.reset(GetIntElement(in)); + fillDesc->xf8_xe4_SESD.reset(GetIntElement(in)); break; case SBIG('SEPO'): - fillDesc->xfc_SEPO.reset(GetVectorElement(in)); + fillDesc->xfc_xe8_SEPO.reset(GetVectorElement(in)); break; case SBIG('PSLT'): - fillDesc->xc_PSLT.reset(GetIntElement(in)); + fillDesc->xc_x0_PSLT.reset(GetIntElement(in)); break; case SBIG('PMSC'): - fillDesc->x74_PMSC.reset(GetVectorElement(in)); + fillDesc->x74_x60_PMSC.reset(GetVectorElement(in)); break; case SBIG('PMOP'): - fillDesc->x6c_PMOP.reset(GetVectorElement(in)); + fillDesc->x6c_x58_PMOP.reset(GetVectorElement(in)); break; case SBIG('PMDL'): - fillDesc->x5c_PMDL = GetModel(in, resPool); + fillDesc->x5c_x48_PMDL = GetModel(in, resPool); break; case SBIG('PMRT'): - fillDesc->x70_PMRT.reset(GetVectorElement(in)); + fillDesc->x70_x5c_PMRT.reset(GetVectorElement(in)); break; case SBIG('POFS'): fillDesc->x18_POFS.reset(GetVectorElement(in)); break; case SBIG('PMUS'): - fillDesc->x45_24_PMUS = GetBool(in); + fillDesc->x45_24_x31_26_PMUS = GetBool(in); break; case SBIG('PSIV'): - fillDesc->x0_PSIV.reset(GetVectorElement(in)); + delete GetVectorElement(in); break; case SBIG('ROTA'): - fillDesc->x50_ROTA.reset(GetRealElement(in)); + fillDesc->x50_x3c_ROTA.reset(GetRealElement(in)); break; case SBIG('PSVM'): - fillDesc->x4_PSVM.reset(GetModVectorElement(in)); + delete GetModVectorElement(in); break; case SBIG('PSTS'): - fillDesc->x14_PSTS.reset(GetRealElement(in)); + fillDesc->x14_x8_PSTS.reset(GetRealElement(in)); break; case SBIG('PSOV'): - fillDesc->x8_PSOV.reset(GetVectorElement(in)); + delete GetVectorElement(in); break; case SBIG('PSWT'): - fillDesc->x10_PSWT.reset(GetIntElement(in)); + fillDesc->x10_x4_PSWT.reset(GetIntElement(in)); break; case SBIG('SEED'): fillDesc->x1c_SEED.reset(GetIntElement(in)); break; case SBIG('PMOO'): - fillDesc->x45_25_PMOO = GetBool(in); + fillDesc->x45_25_x31_27_PMOO = GetBool(in); break; case SBIG('SSSD'): - fillDesc->xe4_SSSD.reset(GetIntElement(in)); + fillDesc->xe4_xd0_SSSD.reset(GetIntElement(in)); break; case SBIG('SORT'): - fillDesc->x44_28_SORT = GetBool(in); + fillDesc->x44_28_x30_28_SORT = GetBool(in); break; case SBIG('SIZE'): - fillDesc->x4c_SIZE.reset(GetRealElement(in)); + fillDesc->x4c_x38_SIZE.reset(GetRealElement(in)); break; case SBIG('SISY'): - fillDesc->xcc_SISY.reset(GetIntElement(in)); + fillDesc->xcc_xb8_SISY.reset(GetIntElement(in)); break; case SBIG('SSPO'): - fillDesc->xe8_SSPO.reset(GetVectorElement(in)); + fillDesc->xe8_xd4_SSPO.reset(GetVectorElement(in)); break; case SBIG('TEXR'): - fillDesc->x54_TEXR.reset(GetTextureElement(in, resPool)); + fillDesc->x54_x40_TEXR.reset(GetTextureElement(in, resPool)); break; case SBIG('SSWH'): - fillDesc->xd4_SSWH = GetSwooshGeneratorDesc(in, resPool); + fillDesc->xd4_xc0_SSWH = GetSwooshGeneratorDesc(in, resPool); break; case SBIG('TIND'): - fillDesc->x58_TIND.reset(GetTextureElement(in, resPool)); + fillDesc->x58_x44_TIND.reset(GetTextureElement(in, resPool)); break; case SBIG('VMD4'): - fillDesc->x45_29_VMD4 = GetBool(in); + fillDesc->x45_29_x31_31_VMD4 = GetBool(in); break; case SBIG('VMD3'): - fillDesc->x45_28_VMD3 = GetBool(in); + fillDesc->x45_28_x31_30_VMD3 = GetBool(in); break; case SBIG('VMD2'): - fillDesc->x45_27_VMD2 = GetBool(in); + fillDesc->x45_27_x31_29_VMD2 = GetBool(in); break; case SBIG('VMD1'): - fillDesc->x45_26_VMD1 = GetBool(in); + fillDesc->x45_26_x31_28_VMD1 = GetBool(in); break; case SBIG('VEL4'): - fillDesc->x88_VEL4.reset(GetModVectorElement(in)); + fillDesc->x88_x74_VEL4.reset(GetModVectorElement(in)); break; case SBIG('VEL3'): - fillDesc->x84_VEL3.reset(GetModVectorElement(in)); + fillDesc->x84_x70_VEL3.reset(GetModVectorElement(in)); break; case SBIG('VEL2'): - fillDesc->x80_VEL2.reset(GetModVectorElement(in)); + fillDesc->x80_x6c_VEL2.reset(GetModVectorElement(in)); break; case SBIG('VEL1'): - fillDesc->x7c_VEL1.reset(GetModVectorElement(in)); + fillDesc->x7c_x68_VEL1.reset(GetModVectorElement(in)); break; case SBIG('ZBUF'): - fillDesc->x44_27_ZBUF = GetBool(in); + fillDesc->x44_27_x30_27_ZBUF = GetBool(in); break; case SBIG('WIDT'): fillDesc->x24_WIDT.reset(GetRealElement(in)); @@ -1105,7 +1105,7 @@ bool CParticleDataFactory::CreateGPSM(CGenDescription* fillDesc, CInputStream& i fillDesc->x128_ADV8.reset(GetRealElement(in)); break; case SBIG('SELC'): - fillDesc->xec_SELC = GetElectricGeneratorDesc(in, resPool); + fillDesc->xec_xd8_SELC = GetElectricGeneratorDesc(in, resPool); break; default: { @@ -1140,20 +1140,20 @@ bool CParticleDataFactory::CreateGPSM(CGenDescription* fillDesc, CInputStream& i void CParticleDataFactory::LoadGPSMTokens(CGenDescription* desc) { - if (desc->x5c_PMDL.m_found) - desc->x5c_PMDL.m_model = desc->x5c_PMDL.m_token.GetObj(); + if (desc->x5c_x48_PMDL.m_found) + desc->x5c_x48_PMDL.m_model = desc->x5c_x48_PMDL.m_token.GetObj(); - if (desc->x8c_ICTS.m_found) - desc->x8c_ICTS.m_gen = desc->x8c_ICTS.m_token.GetObj(); + if (desc->x8c_x78_ICTS.m_found) + desc->x8c_x78_ICTS.m_gen = desc->x8c_x78_ICTS.m_token.GetObj(); - if (desc->xa4_IDTS.m_found) - desc->xa4_IDTS.m_gen = desc->xa4_IDTS.m_token.GetObj(); + if (desc->xa4_x90_IDTS.m_found) + desc->xa4_x90_IDTS.m_gen = desc->xa4_x90_IDTS.m_token.GetObj(); - if (desc->xb8_IITS.m_found) - desc->xb8_IITS.m_gen = desc->xb8_IITS.m_token.GetObj(); + if (desc->xb8_xa4_IITS.m_found) + desc->xb8_xa4_IITS.m_gen = desc->xb8_xa4_IITS.m_token.GetObj(); - if (desc->xd4_SSWH.m_found) - desc->xd4_SSWH.m_swoosh = desc->xd4_SSWH.m_token.GetObj(); + if (desc->xd4_xc0_SSWH.m_found) + desc->xd4_xc0_SSWH.m_swoosh = desc->xd4_xc0_SSWH.m_token.GetObj(); } std::unique_ptr FParticleFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& vparms)