diff --git a/src/main.c b/src/main.c index ddbf045..7320922 100644 --- a/src/main.c +++ b/src/main.c @@ -11,32 +11,15 @@ float *generate_data_surface(unsigned int, unsigned char *); float *generate_normals_surface(float *, unsigned char); -unsigned char palette[] = { - 0xEB, - 0xD3, - 0xF8, - 0xff, - 0xEB, - 0xD4, - 0xF8, - 0xff, - 0xEB, - 0xD5, - 0xF8, - 0xff, - 0x7A, - 0x1C, - 0xAC, - 0xff, -}; - const char *wname = "manigraph: manifold grapher"; -struct projection projection = { - .x = 0, - .y = 1, - .z = 2, - .w = 3, +struct projection projection = {.x = 0, .y = 1, .z = 2, .w = 3}; + +unsigned char palette[][4] = { + {0xEB, 0xD3, 0xF8, 0xff}, + {0xEB, 0xD4, 0xF8, 0xff}, + {0xEB, 0xD5, 0xF8, 0xff}, + {0x7A, 0x1C, 0xAC, 0xff}, }; void mlog(char *msg) diff --git a/src/main.h b/src/main.h index fdcb284..75332aa 100644 --- a/src/main.h +++ b/src/main.h @@ -142,6 +142,6 @@ void destroy_texture(id_t texture); colors: array of color values (rgba in hex ). n: number of color on colors. */ -id_t create_palette_texture(const unsigned char * colors, unsigned char n ); +id_t create_palette_texture(const unsigned char colors[][4], unsigned char n ); quat_t poll_input(window_t window);