|
|
@ -89,3 +89,17 @@ bitmap_unpack(const unsigned char *map, |
|
|
|
|
|
|
|
|
|
|
|
return buf_size; |
|
|
|
return buf_size; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void |
|
|
|
|
|
|
|
bitmap_print(const unsigned char *map) { |
|
|
|
|
|
|
|
char line[BITMAP_SIDE * 2 + 1]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
line[BITMAP_SIDE * 2] = '\0'; |
|
|
|
|
|
|
|
for (size_t i = 0; i < BITMAP_SIDE; i++) { |
|
|
|
|
|
|
|
for (size_t j = 0; j < BITMAP_SIDE; j++, map++) { |
|
|
|
|
|
|
|
line[(j * 2) + 0] = (*map == 0x00) ? CHAR_NONE : CHAR_USED; |
|
|
|
|
|
|
|
line[(j * 2) + 1] = (*map == 0x00) ? CHAR_NONE : CHAR_USED; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
puts(line); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|