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

Function vga_WriteStr

sys/msdos/vidvga.c:1114–1132  ·  view source on GitHub ↗

* Write the character string pointed to by 's', whose maximum length * is 'len' at location (x,y) using the 'colour' colour. * */

Source from the content-addressed store, hash-verified

1112 *
1113 */
1114static void
1115vga_WriteStr(char *s, int len, int col, int row, int colour)
1116{
1117 unsigned char *us;
1118 int i = 0;
1119
1120 /* protection from callers */
1121 if (row > (LI - 1))
1122 return;
1123
1124 i = 0;
1125 us = (unsigned char *) s;
1126 while ((*us != 0) && (i < len) && (col < (CO - 1))) {
1127 vga_WriteChar((uchar) *us, col, row, colour);
1128 ++us;
1129 ++i;
1130 ++col;
1131 }
1132}
1133
1134/*
1135 * Initialize the VGA palette with the desired colours. This

Callers 1

vga_xputsFunction · 0.85

Calls 1

vga_WriteCharFunction · 0.85

Tested by

no test coverage detected