typedef unsigned int u32; extern "C" { #define WIDTH 600 #define HEIGHT 600 u32 buffer[HEIGHT][WIDTH]; void go(int width, int height) { for (int y = 0; y < HEIGHT; y++) { for (int x = 0; x < WIDTH; x++) { buffer[y][x] = ((u32) x ^ (u32) y) | 0xff000000; } } } }