| 654 | #endif /* SCROLLMAP */ |
| 655 | |
| 656 | static void |
| 657 | read_planar_tile(unsigned glyph, struct planar_cell_struct *cell) |
| 658 | { |
| 659 | unsigned char indexes[TILE_Y][TILE_X]; |
| 660 | unsigned plane, y, byte, bit; |
| 661 | |
| 662 | read_tile_indexes(glyph, indexes); |
| 663 | /* cell->plane[0..3].image[0..15][0..1] */ |
| 664 | for (plane = 0; plane < SCREENPLANES; ++plane) { |
| 665 | for (y = 0; y < TILE_Y; ++y) { |
| 666 | for (byte = 0; byte < MAX_BYTES_PER_CELL; ++byte) { |
| 667 | unsigned char b = 0; |
| 668 | for (bit = 0; bit < 8; ++bit) { |
| 669 | unsigned char x = byte * 8 + bit; |
| 670 | unsigned char i = indexes[y][x]; |
| 671 | b <<= 1; |
| 672 | if (i & (0x8 >> plane)) b |= 1; |
| 673 | } |
| 674 | cell->plane[plane].image[y][byte] = b; |
| 675 | } |
| 676 | } |
| 677 | } |
| 678 | } |
| 679 | |
| 680 | static void |
| 681 | read_planar_tile_O(unsigned glyph, struct overview_planar_cell_struct *cell) |
no test coverage detected