master
eikimaker.c
1#include <stdio.h>
2#include <stdint.h>
3#include <string.h>
4
5int main(void){
6 fprintf(stderr, "char:");
7
8 char ch;
9 scanf(" %c", &ch);
10
11 printf("\n# for a pixel and . for null\n");
12
13 // enuidkefnoieriovr4jeojerovrjoijoielklkbyunhuhuinhuirfvgtyj
14 char rows[8][7];
15
16 for(int i=0; i<8; i++){
17 do {
18 fprintf(stderr, "%d ", i);
19 scanf(" %s", &rows[i]);
20 } while (strlen(rows[i]) != 6);
21 }
22 printf("\n[ '%c' ] = {\n", ch);
23
24 for(int row=0; row <8; ++row){
25 uint8_t value=0;
26
27 for(int px=0; px<6; px++){
28 if(rows[row][px]=='#'){
29 value |=1 << px;
30 }
31
32 }
33 printf("\t0b");
34 // No %b. had to search this one up
35 for(int b=7; b>=0; b--){
36 printf("%d", (value >> b) & 1);
37 }
38 printf(",\n");
39 }
40
41 printf("},\n");
42}