Factory fixes

This commit is contained in:
Phillip Stephens 2016-02-22 18:08:13 -08:00
parent 513465e9f2
commit f09019246d
4 changed files with 12 additions and 3 deletions

View File

@ -4,9 +4,15 @@
namespace pshag
{
std::unique_ptr<IObj> FDealDataFactory(const SObjectTag &tag, CInputStream &in, const CVParamTransfer &vparms)
CDecalDescription* CDecalDataFactory::GetGeneratorDesc(CInputStream& in, CSimplePool* resPool)
{
return nullptr;
}
std::unique_ptr<IObj> FDecalDataFactory(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)));
}
}

View File

@ -20,6 +20,6 @@ public:
static bool CreateDPSM(CDecalDescription* desc,CInputStream& in,CSimplePool* resPool);
};
std::unique_ptr<IObj> FDealDataFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& vparms);
std::unique_ptr<IObj> FDecalDataFactory(const SObjectTag& tag, CInputStream& in, const CVParamTransfer& vparms);
}
#endif // __PSHAG_CDECALDATAFACTORY_HPP__

View File

@ -132,7 +132,7 @@ void CParticleElectricDataFactory::LoadELSMTokens(CElectricDescription* desc)
desc->x60_EPSM.m_gen = desc->x60_EPSM.m_token.GetObj();
}
std::unique_ptr<pshag::IObj> FParticleElecrticFactory(const pshag::SObjectTag &tag, pshag::CInputStream &in, const pshag::CVParamTransfer &vparms)
std::unique_ptr<IObj> FParticleElectricDataFactory(const SObjectTag &tag, CInputStream &in, const 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)));

View File

@ -78,6 +78,9 @@ bool CProjectileWeaponDataFactory::CreateWPSM(CWeaponDescription* desc, CInputSt
desc->x2a_AP11 = CPF::GetBool(in);
break;
case SBIG('AP21'):
desc->x2b_AP21 = CPF::GetBool(in);
break;
case SBIG('AS11'):
desc->x2c_AS11 = CPF::GetBool(in);
break;
case SBIG('AS12'):