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