| 192 | } |
| 193 | |
| 194 | BOOL CParticleEffect::Compile(CPEDef* def) |
| 195 | { |
| 196 | m_Def = def; |
| 197 | |
| 198 | if (m_Def) |
| 199 | { |
| 200 | // refresh shader |
| 201 | RefreshShader(); |
| 202 | |
| 203 | // append actions |
| 204 | IReader F(m_Def->m_Actions.pointer(), m_Def->m_Actions.size()); |
| 205 | |
| 206 | ParticleManager()->LoadActions(m_HandleActionList, F, m_Def->m_copFormat); |
| 207 | ParticleManager()->SetMaxParticles(m_HandleEffect, m_Def->m_MaxParticles); |
| 208 | ParticleManager()->SetCallback(m_HandleEffect, OnEffectParticleBirth, OnEffectParticleDead, this, 0); |
| 209 | |
| 210 | // time limit |
| 211 | if (m_Def->m_Flags.is(CPEDef::dfTimeLimit)) |
| 212 | m_fElapsedLimit = m_Def->m_fTimeLimit; |
| 213 | } |
| 214 | |
| 215 | return TRUE; |
| 216 | } |
| 217 | |
| 218 | void CParticleEffect::SetBirthDeadCB(PAPI::OnBirthParticleCB bc, PAPI::OnDeadParticleCB dc, void* owner, u32 p) const |
| 219 | { |
nothing calls this directly
no test coverage detected