| 635 | } |
| 636 | |
| 637 | void Tr2Renderer::PrintfImmediate( Tr2RenderContext& renderContext, int x, int y, uint32_t color, uint32_t format, const char* msg, ... ) |
| 638 | { |
| 639 | if( !s_debugTextRenderer ) |
| 640 | { |
| 641 | return; |
| 642 | } |
| 643 | |
| 644 | va_list args; |
| 645 | va_start( args, msg ); |
| 646 | |
| 647 | Tr2Viewport viewport; |
| 648 | renderContext.GetViewport( viewport ); |
| 649 | |
| 650 | Tr2Rect rect; |
| 651 | if( format & TRI_DFS_RIGHT ) |
| 652 | { |
| 653 | rect.top = y + (int32_t)viewport.m_y; |
| 654 | rect.left = x + (int32_t)viewport.m_x - 1024; |
| 655 | rect.bottom = rect.top + 512; |
| 656 | rect.right = x + (int32_t)viewport.m_x; |
| 657 | } |
| 658 | else |
| 659 | { |
| 660 | rect.top = y + (int32_t)viewport.m_y; |
| 661 | rect.left = x + (int32_t)viewport.m_x; |
| 662 | rect.bottom = rect.top + 512; |
| 663 | rect.right = rect.left + 1024; |
| 664 | } |
| 665 | s_debugTextRenderer->VprintfImmediate( renderContext, TRI_DBG_FONT_SMALL, rect, format, ColorToVec4( color ), msg, args ); |
| 666 | } |
| 667 | |
| 668 | void Tr2Renderer::Printf( TriDebugFont font, const Tr2Rect& rect, uint32_t format, uint32_t color, const char* msg, ... ) |
| 669 | { |
no test coverage detected