| 537 | |
| 538 | #if WITH_GRANNY |
| 539 | void Tr2GrannyAnimationLayer::SampleTextTracks( IBlueEventListener* listener ) |
| 540 | { |
| 541 | CCP_ASSERT_M( !IsUsingCMF(), "Tr2GrannyAnimationLayer::SampleTextTracks: CMF does not have text tracks!" ); |
| 542 | |
| 543 | if( !listener ) |
| 544 | { |
| 545 | return; |
| 546 | } |
| 547 | for( auto it = m_controlTextTracks.begin(); it != m_controlTextTracks.end(); it++ ) |
| 548 | { |
| 549 | granny_control* control = it->first; |
| 550 | int currentLoop = GrannyGetControlLoopIndex( control ); |
| 551 | granny_real32 t = GrannyGetControlRawLocalClock( control ); |
| 552 | if( t < 0 ) |
| 553 | { |
| 554 | continue; // Animation hasn't started yet |
| 555 | } |
| 556 | |
| 557 | for( auto trackIt = it->second.begin(); trackIt != it->second.end(); trackIt++ ) |
| 558 | { |
| 559 | const char* evt = trackIt->SampleTrack( t, currentLoop ); |
| 560 | if( evt ) |
| 561 | { |
| 562 | listener->HandleEvent( CA2W( evt ) ); |
| 563 | } |
| 564 | } |
| 565 | } |
| 566 | } |
| 567 | #endif |
| 568 | |
| 569 | void Tr2GrannyAnimationLayer::SampleMorphTracks( std::unordered_map<std::string, float>& morphAnimations, bool additive ) |
nothing calls this directly
no test coverage detected