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

Function vga_GetBitmap

sys/msdos/vidvga.c:1026–1043  ·  view source on GitHub ↗

* Given the character, return the bitmap that displays that character */

Source from the content-addressed store, hash-verified

1024 * Given the character, return the bitmap that displays that character
1025 */
1026static void
1027vga_GetBitmap(uint32 chr, unsigned char *bitmap)
1028{
1029 unsigned i;
1030
1031 if (psf_font) {
1032 unsigned char const *fp = get_font_glyph(psf_font, chr,
1033 SYMHANDLING(H_UTF8));
1034 for (i = 0; i < ROWS_PER_CELL; ++i) {
1035 bitmap[i] = fp[i];
1036 }
1037 } else {
1038 unsigned char const __far *fp = rom_font + chr * ROWS_PER_CELL;
1039 for (i = 0; i < ROWS_PER_CELL; ++i) {
1040 bitmap[i] = READ_ABSOLUTE((fp + i));
1041 }
1042 }
1043}
1044
1045/*
1046 * This is the routine that displays a high-res "cell" pointed to by 'gp'

Callers 2

vga_WriteCharFunction · 0.85
vga_specialFunction · 0.85

Calls 1

get_font_glyphFunction · 0.85

Tested by

no test coverage detected