cleanup / formatting
This commit is contained in:
parent
917b381bc3
commit
8aca9afaf7
1 changed files with 13 additions and 14 deletions
|
@ -48,10 +48,10 @@ const int END_MARKER = 0;
|
|||
// An interleaved map of 4x8 bit character bitmaps (each hex digit represents a
|
||||
// row) to the corresponding unicode character code point.
|
||||
constexpr unsigned int BITMAPS[] = {
|
||||
0x00000000, 0x00a0,
|
||||
0x00000000, 0x00a0, 0,
|
||||
|
||||
// Block graphics
|
||||
// 0xffff0000, 0x2580, // upper 1/2; redundant with inverse lower 1/2
|
||||
// 0xffff0000, 0x2580, 0, // upper 1/2; redundant with inverse lower 1/2
|
||||
|
||||
0x0000000f, 0x2581, 0, // lower 1/8
|
||||
0x000000ff, 0x2582, 0, // lower 1/4
|
||||
|
@ -103,7 +103,7 @@ constexpr unsigned int BITMAPS[] = {
|
|||
0x000f0000, 0x2500, 0, // Light horizontal
|
||||
0x0000f000, 0x2500, 0, //
|
||||
0x44444444, 0x2502, 0, // Light vertical
|
||||
0x22222222, 0x2502,
|
||||
0x22222222, 0x2502, 0,
|
||||
|
||||
0x000e0000, 0x2574, 0, // light left
|
||||
0x0000e000, 0x2574, 0, // light left
|
||||
|
@ -342,9 +342,8 @@ CharData findCharData(GetPixelFunction get_pixel, int x0, int y0,
|
|||
unsigned int best_pattern = 0x0000ffff;
|
||||
int codepoint = 0x2584;
|
||||
bool inverted = false;
|
||||
for (int i = 0; BITMAPS[i + 1] != 0; i += 3) {
|
||||
// Skip all end markers
|
||||
if (BITMAPS[i + 2] & flags != BITMAPS[i + 2]) {
|
||||
for (int i = 0; BITMAPS[i + 1] != END_MARKER; i += 3) {
|
||||
if ((BITMAPS[i + 2] & flags) != BITMAPS[i + 2]) {
|
||||
continue;
|
||||
}
|
||||
unsigned int pattern = BITMAPS[i];
|
||||
|
|
Loading…
Reference in a new issue