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

Function vesa_WriteStr

sys/msdos/vidvesa.c:1897–1915  ·  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

1895 *
1896 */
1897static void
1898vesa_WriteStr(const char *s, int len, int col, int row, int colour)
1899{
1900 const unsigned char *us;
1901 int i = 0;
1902
1903 /* protection from callers */
1904 if (row > (LI - 1))
1905 return;
1906
1907 i = 0;
1908 us = (const unsigned char *) s;
1909 while ((*us != 0) && (i < len) && (col < (CO - 1))) {
1910 vesa_WriteChar(*us, col, row, colour);
1911 ++us;
1912 ++i;
1913 ++col;
1914 }
1915}
1916
1917/*
1918 * Initialize the VGA palette with the desired colours. This

Callers 1

vesa_xputsFunction · 0.85

Calls 1

vesa_WriteCharFunction · 0.85

Tested by

no test coverage detected