Fix: Palette

This commit is contained in:
PedroEdiaz
2024-10-24 12:21:14 -06:00
parent 3e27f0d165
commit 3fa4eed366
2 changed files with 8 additions and 25 deletions

View File

@@ -11,32 +11,15 @@
float *generate_data_surface(unsigned int, unsigned char *); float *generate_data_surface(unsigned int, unsigned char *);
float *generate_normals_surface(float *, 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"; const char *wname = "manigraph: manifold grapher";
struct projection projection = { struct projection projection = {.x = 0, .y = 1, .z = 2, .w = 3};
.x = 0,
.y = 1, unsigned char palette[][4] = {
.z = 2, {0xEB, 0xD3, 0xF8, 0xff},
.w = 3, {0xEB, 0xD4, 0xF8, 0xff},
{0xEB, 0xD5, 0xF8, 0xff},
{0x7A, 0x1C, 0xAC, 0xff},
}; };
void mlog(char *msg) void mlog(char *msg)

View File

@@ -142,6 +142,6 @@ void destroy_texture(id_t texture);
colors: array of color values (rgba in hex ). colors: array of color values (rgba in hex ).
n: number of color on colors. 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); quat_t poll_input(window_t window);