---------------------------------------------------------------
| 372 | |
| 373 | // --------------------------------------------------------------- |
| 374 | bool Tr2Effect::Initialize() |
| 375 | { |
| 376 | CCP_STATS_ZONE( __FUNCTION__ ); |
| 377 | |
| 378 | for( auto it = begin( m_resources ); it != end( m_resources ); ++it ) |
| 379 | { |
| 380 | ( *it )->OnAddedToMaterial( this ); |
| 381 | } |
| 382 | |
| 383 | if( m_effectResource ) |
| 384 | { |
| 385 | ReleaseCachedData( m_effectResource ); |
| 386 | m_effectResource->RemoveNotifyTarget( this ); |
| 387 | m_effectResource.Unlock(); |
| 388 | } |
| 389 | |
| 390 | if( m_effectFilePath.size() > 0 ) |
| 391 | { |
| 392 | if( !ConvertEffectPath( m_effectFilePath, m_actualEffectFilePath ) ) |
| 393 | { |
| 394 | m_actualEffectFilePath = ""; |
| 395 | return true; |
| 396 | } |
| 397 | BeResMan->GetResource( m_actualEffectFilePath.c_str(), "", BlueInterfaceIID<Tr2EffectRes>(), (void**)&m_effectResource ); |
| 398 | |
| 399 | if( m_effectResource ) |
| 400 | { |
| 401 | m_effectResource->AddNotifyTarget( this ); |
| 402 | } |
| 403 | } |
| 404 | else |
| 405 | { |
| 406 | m_actualEffectFilePath = ""; |
| 407 | } |
| 408 | |
| 409 | return true; |
| 410 | } |
| 411 | |
| 412 | // --------------------------------------------------------------- |
| 413 | void Tr2Effect::SetEffectPathName( const char* path ) |
no test coverage detected