| 290 | } |
| 291 | |
| 292 | void Tr2Sprite2dContainer::GatherSpritesHelper( Tr2Sprite2dScene* renderer ) |
| 293 | { |
| 294 | if( m_absoluteCoordinates ) |
| 295 | { |
| 296 | renderer->PushTransformAbsolute(); |
| 297 | } |
| 298 | |
| 299 | renderer->PushTranslation( m_translation ); |
| 300 | renderer->PushDepthRange( m_depthMin, m_depthMax ); |
| 301 | float oldOpacity = renderer->GetAccumulatedAlpha(); |
| 302 | renderer->SetAccumulatedAlpha( m_opacity * oldOpacity ); |
| 303 | |
| 304 | if( m_clip ) |
| 305 | { |
| 306 | renderer->PushClipRectangle( 0.0f, 0.0f, m_displayWidth, m_displayHeight ); |
| 307 | } |
| 308 | |
| 309 | for( ITr2SpriteObjectVector::reverse_iterator it = m_background.rbegin(); it != m_background.rend(); ++it ) |
| 310 | { |
| 311 | ( *it )->GatherSprites( renderer ); |
| 312 | } |
| 313 | for( ITr2SpriteObjectVector::reverse_iterator it = m_children.rbegin(); it != m_children.rend(); ++it ) |
| 314 | { |
| 315 | ( *it )->GatherSprites( renderer ); |
| 316 | } |
| 317 | |
| 318 | if( m_clip ) |
| 319 | { |
| 320 | renderer->PopClipRectangle(); |
| 321 | } |
| 322 | |
| 323 | renderer->SetAccumulatedAlpha( oldOpacity ); |
| 324 | renderer->PopDepthRange(); |
| 325 | renderer->PopTranslation(); |
| 326 | |
| 327 | if( m_absoluteCoordinates ) |
| 328 | { |
| 329 | renderer->PopTransformAbsolute(); |
| 330 | } |
| 331 | } |
nothing calls this directly
no test coverage detected