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
|
/* ****************************************************************************
* Easy grayscale's draw utilities.
* Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
* ************************************************************************* */
#include <cdefs.h>
/* Buffer mode, draw mode. */
typedef enum {
LIGHT_BUFFER,
DARK_BUFFER
} Buffer;
typedef enum {
OR,
AND,
AND_NOT
} DrawMode;
/* Camera. */
typedef struct {
int x;
int y;
} Camera;
/* Draw things normally. */
extern void draw_bmp _OF((unsigned char *__bmp, int __x, int __y,
int __width, int __height, Buffer __buffer, DrawMode __drawmode)) __THROW;
extern int draw_read_pix _OF((int __x, int __y,
char *__light_buffer, char *__dark_buffer)) __THROW;
extern void draw_write_pix _OF((int __x, int __y, int __color,
char *__light_buffer, char *__dark_buffer)) __THROW;
/* Draw things with clipping. */
extern void draw_bmp_or_cl _OF((unsigned char *__bmp, int __x, int __y,
int __width, int __height, char *__buffer)) __THROW;
extern void draw_bmp_and_cl _OF((unsigned char *__bmp, int __x, int __y,
int __width, int __height, char *__buffer)) __THROW;
extern void draw_bmp_andnot_cl _OF((unsigned char *__bmp, int __x, int __y,
int __width, int __height, char *__buffer)) __THROW;
|