#include #include #include #include #include "brailleboi.h" int brailleInit(int width, int height, image_buffer* buf) { setlocale(LC_ALL, ""); buf->contents = malloc((width * height) * sizeof(int)); buf->width = width; buf->height = height; return 0; } int brailleStop(image_buffer* buf) { free(buf->contents); return 0; } int brailleReorganizeBits(int old) { int new = (old&0b10000111) | (old&0b01110000)>>1 | (old&0b00001000)<<3; return new; } void braillePrint(int data) { wprintf(L"%lc", (0x2800|data)); }