- downscale_2x2(buf, subbufs[0]);
- downscale_2x2(buf + 400 * 4, subbufs[1]);
- downscale_2x2(buf + 800 * 300 * 4, subbufs[2]);
- downscale_2x2(buf + 800 * 300 * 4 + 400 * 4, subbufs[3]);
+ copy_subscreen(buf, subbufs[0], width, height);
+ copy_subscreen(buf + (width/2) * 4, subbufs[1], width, height);
+ copy_subscreen(buf + width * (height/2) * 4, subbufs[2], width, height);
+ copy_subscreen(buf + width * (height/2) * 4 + (width/2) * 4, subbufs[3], width, height);
+
+ // make divider lines
+ unsigned char *ptr = buf + (height/2) * width * 4;
+ for (unsigned x = 0; x < width; ++x) {
+ *ptr++ = 255;
+ *ptr++ = 255;
+ *ptr++ = 255;
+ *ptr++ = 0;
+ }
+
+ ptr = buf + (width/2) * 4;
+ for (unsigned y = 0; y < height; ++y) {
+ ptr[0] = 255;
+ ptr[1] = 255;
+ ptr[2] = 255;
+ ptr[3] = 0;