}
}
+void text_insert_image(uint8_t *buffer, uint8_t palette[][3], const char *pixels, uint8_t alpha)
+{
+ int y, x;
+
+ for (y = 0; y < 200; y++) {
+ for (x = 0; x < 320; x++) {
+ buffer[((2*y+0) * 2*320 + (2*x+0)) * 4 + 0] = palette[(int)(*pixels)][0];
+ buffer[((2*y+0) * 2*320 + (2*x+0)) * 4 + 1] = palette[(int)(*pixels)][1];
+ buffer[((2*y+0) * 2*320 + (2*x+0)) * 4 + 2] = palette[(int)(*pixels)][2];
+ buffer[((2*y+0) * 2*320 + (2*x+0)) * 4 + 3] = alpha;
+
+ buffer[((2*y+0) * 2*320 + (2*x+1)) * 4 + 0] = palette[(int)(*pixels)][0];
+ buffer[((2*y+0) * 2*320 + (2*x+1)) * 4 + 1] = palette[(int)(*pixels)][1];
+ buffer[((2*y+0) * 2*320 + (2*x+1)) * 4 + 2] = palette[(int)(*pixels)][2];
+ buffer[((2*y+0) * 2*320 + (2*x+1)) * 4 + 3] = alpha;
+
+ buffer[((2*y+1) * 2*320 + (2*x+0)) * 4 + 0] = palette[(int)(*pixels)][0];
+ buffer[((2*y+1) * 2*320 + (2*x+0)) * 4 + 1] = palette[(int)(*pixels)][1];
+ buffer[((2*y+1) * 2*320 + (2*x+0)) * 4 + 2] = palette[(int)(*pixels)][2];
+ buffer[((2*y+1) * 2*320 + (2*x+0)) * 4 + 3] = alpha;
+
+ buffer[((2*y+1) * 2*320 + (2*x+1)) * 4 + 0] = palette[(int)(*pixels)][0];
+ buffer[((2*y+1) * 2*320 + (2*x+1)) * 4 + 1] = palette[(int)(*pixels)][1];
+ buffer[((2*y+1) * 2*320 + (2*x+1)) * 4 + 2] = palette[(int)(*pixels)][2];
+ buffer[((2*y+1) * 2*320 + (2*x+1)) * 4 + 3] = alpha;
+ pixels++;
+ }
+ }
+}
+