MCPcopy Create free account
hub / github.com/AppleWin/AppleWin / DebuggerPrintColor

Function DebuggerPrintColor

source/Debugger/Debugger_Display.cpp:777–811  ·  view source on GitHub ↗

===========================================================================

Source from the content-addressed store, hash-verified

775
776//===========================================================================
777void DebuggerPrintColor( int x, int y, const conchar_t * pText )
778{
779 int nLeft = x;
780
781 conchar_t g;
782 const conchar_t *pSrc = pText;
783
784 if ( !pText)
785 return;
786
787 while ((g = (*pSrc)))
788 {
789 if (g == '\n')
790 {
791 x = nLeft;
792 y += CONSOLE_FONT_HEIGHT;
793 pSrc++;
794 continue;
795 }
796
797 if (ConsoleColor_IsColorOrMouse( g ))
798 {
799 if (ConsoleColor_IsColor( g ))
800 {
801 DebuggerSetColorFG( ConsoleColor_GetColor( g ) );
802 }
803
804 g = ConsoleChar_GetChar( g );
805 }
806
807 PrintGlyph( x, y, (char) (g & _CONSOLE_COLOR_MASK) );
808 x += CONSOLE_FONT_WIDTH;
809 pSrc++;
810 }
811}
812
813
814// Utility ________________________________________________________________________________________

Callers 1

PrintTextColorFunction · 0.85

Calls 6

ConsoleColor_IsColorFunction · 0.85
DebuggerSetColorFGFunction · 0.85
ConsoleColor_GetColorFunction · 0.85
ConsoleChar_GetCharFunction · 0.85
PrintGlyphFunction · 0.85

Tested by

no test coverage detected