-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdreaming.h
54 lines (40 loc) · 848 Bytes
/
dreaming.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#ifndef _DREAMING_H
#define _DREAMING_H
#include <stdint.h>
#include <stdlib.h>
#define ITERATION_THRESHOLD 1000
struct _rgb {
uint8_t r;
uint8_t g;
uint8_t b;
};
typedef struct {
/* number of colors in this palette */
int size;
struct _rgb *colors;
} palette_t;
struct worker_ctx_s {
int worker;
void *args;
};
typedef struct worker_ctx_s worker_ctx_t;
/*
* Default palette found in Ultra Fractal.
* From: https://stackoverflow.com/a/16505538
*/
palette_t *uf_rgb_palette();
/*
* Red -> Yellow -> Green -> Cyan -> Blue -> Magenta -> Red
*/
struct _rgb *build_RGB_colormap();
/*
* like build_RGB_colormap but starts from blue
*/
struct _rgb *build_RGB_colormap_reverse();
/*
* RGB grayscale
*/
palette_t *grayscale_RGB_palette();
int init_workers();
void worker_run(void *(*work)(void *), void *args);
#endif