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

Function FillBackground

source/Debugger/Debugger_Display.cpp:862–884  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

860
861//===========================================================================
862void FillBackground(long left, long top, long right, long bottom)
863{
864 long index_dst = (384-bottom) * 80 * CONSOLE_FONT_GRID_X;
865
866 for (long x = left; x < right; x++)
867 {
868 g_pDebuggerMemFramebits[index_dst + x].r = g_cConsoleBrushBG_r;
869 g_pDebuggerMemFramebits[index_dst + x].g = g_cConsoleBrushBG_g;
870 g_pDebuggerMemFramebits[index_dst + x].b = g_cConsoleBrushBG_b;
871 }
872
873 if (top != bottom)
874 {
875 bgra_t* src = g_pDebuggerMemFramebits + (index_dst + left);
876 bgra_t* dst = src + (80 * CONSOLE_FONT_GRID_X);
877 size_t size = (right - left) * sizeof(bgra_t);
878 for (int i = 0; i < bottom - top - 1; i++)
879 {
880 memcpy((void*)dst, (void*)src, size);
881 dst += 80 * CONSOLE_FONT_GRID_X ;
882 }
883 }
884}
885
886// Updates the horizontal cursor
887//===========================================================================

Callers 2

PrintTextFunction · 0.85
PrintTextColorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected