MCPcopy Create free account
hub / github.com/NetHack/NetHack / back_buffer_flip

Function back_buffer_flip

sys/windows/consoletty.c:815–848  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

813}
814#else
815static void
816back_buffer_flip(void)
817{
818 cell_t *back = console.back_buffer;
819 cell_t *front = console.front_buffer;
820 COORD pos;
821 DWORD unused;
822
823 if (!console.is_ready)
824 return;
825
826 for (pos.Y = 0; pos.Y < console.height; pos.Y++) {
827 for (pos.X = 0; pos.X < console.width; pos.X++) {
828 if (back->attribute != front->attribute) {
829 WriteConsoleOutputAttribute(console.hConOut, &back->attribute,
830 1, pos, &unused);
831 front->attribute = back->attribute;
832 }
833 if (back->character != front->character) {
834 if (console.has_unicode) {
835 WriteConsoleOutputCharacterW(
836 console.hConOut, &back->character, 1, pos, &unused);
837 } else {
838 char ch = (char) back->character;
839 WriteConsoleOutputCharacterA(console.hConOut, &ch, 1, pos,
840 &unused);
841 }
842 *front = *back;
843 }
844 back++;
845 front++;
846 }
847 }
848}
849#endif
850
851void buffer_fill_to_end(cell_t * buffer, cell_t * fill, int x, int y)

Callers 6

buffer_fill_to_endFunction · 0.85
buffer_writeFunction · 0.85
term_end_screenFunction · 0.85
really_move_cursorFunction · 0.85
tty_delay_outputFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected