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

Function read_planar_tile_O

sys/msdos/vidvga.c:680–700  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

678}
679
680static void
681read_planar_tile_O(unsigned glyph, struct overview_planar_cell_struct *cell)
682{
683 unsigned char indexes[TILE_Y][TILE_X];
684 unsigned plane, y, bit;
685
686 read_tile_indexes(glyph, indexes);
687 /* cell->plane[0..3].image[0..15][0..0] */
688 for (plane = 0; plane < SCREENPLANES; ++plane) {
689 for (y = 0; y < TILE_Y; ++y) {
690 unsigned char b = 0;
691 for (bit = 0; bit < 8; ++bit) {
692 unsigned char x = bit * 2;
693 unsigned char i = indexes[y][x];
694 b <<= 1;
695 if (i & (0x8 >> plane)) b |= 1;
696 }
697 cell->plane[plane].image[y][0] = b;
698 }
699 }
700}
701
702static void
703read_tile_indexes(unsigned glyph, unsigned char (*indexes)[TILE_X])

Callers 2

vga_xputgFunction · 0.85
vidvga.cFile · 0.85

Calls 1

read_tile_indexesFunction · 0.85

Tested by

no test coverage detected