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

Function vesa_DoublePixels

sys/msdos/vidvesa.c:1807–1825  ·  view source on GitHub ↗

Scale font pixels horizontally */

Source from the content-addressed store, hash-verified

1805
1806/* Scale font pixels horizontally */
1807static unsigned long
1808vesa_DoublePixels(unsigned long fnt)
1809{
1810 static const unsigned char double_bits[] = {
1811 0x00, 0x03, 0x0C, 0x0F,
1812 0x30, 0x33, 0x3C, 0x3F,
1813 0xC0, 0xC3, 0xCC, 0xCF,
1814 0xF0, 0xF3, 0xFC, 0xFF
1815 };
1816 unsigned i;
1817 unsigned long fnt2;
1818
1819 fnt2 = 0;
1820 for (i = 0; i < 16; i += 4) {
1821 unsigned long b4 = (fnt >> i) & 0xF;
1822 fnt2 |= (unsigned long)double_bits[b4] << (i * 2);
1823 }
1824 return fnt2;
1825}
1826
1827static unsigned long
1828vesa_TriplePixels(unsigned long fnt)

Callers 1

vesa_GetCharPixelRowFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected