forked from libtcod/python-tcod
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtdl.h
More file actions
54 lines (47 loc) · 2.24 KB
/
tdl.h
File metadata and controls
54 lines (47 loc) · 2.24 KB
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 PYTHON_TCOD_TDL_H_
#define PYTHON_TCOD_TDL_H_
#include "../libtcod/src/libtcod/libtcod.h"
/* TDL FUNCTIONS ---------------------------------------------------------- */
TCOD_value_t TDL_list_get_union(TCOD_list_t l, int idx);
bool TDL_list_get_bool(TCOD_list_t l, int idx);
char TDL_list_get_char(TCOD_list_t l, int idx);
int TDL_list_get_int(TCOD_list_t l, int idx);
float TDL_list_get_float(TCOD_list_t l, int idx);
char* TDL_list_get_string(TCOD_list_t l, int idx);
TCOD_color_t TDL_list_get_color(TCOD_list_t l, int idx);
TCOD_dice_t TDL_list_get_dice(TCOD_list_t l, int idx);
/*bool (*TDL_parser_new_property_func)(const char *propname, TCOD_value_type_t
* type, TCOD_value_t *value);*/
/* color functions modified to use integers instead of structs */
TCOD_color_t TDL_color_from_int(int color);
int TDL_color_to_int(TCOD_color_t* color);
int* TDL_color_int_to_array(int color);
int TDL_color_RGB(int r, int g, int b);
int TDL_color_HSV(float h, float s, float v);
bool TDL_color_equals(int c1, int c2);
int TDL_color_add(int c1, int c2);
int TDL_color_subtract(int c1, int c2);
int TDL_color_multiply(int c1, int c2);
int TDL_color_multiply_scalar(int c, float value);
int TDL_color_lerp(int c1, int c2, float coef);
float TDL_color_get_hue(int color);
float TDL_color_get_saturation(int color);
float TDL_color_get_value(int color);
int TDL_color_set_hue(int color, float h);
int TDL_color_set_saturation(int color, float h);
int TDL_color_set_value(int color, float h);
int TDL_color_shift_hue(int color, float hue_shift);
int TDL_color_scale_HSV(int color, float scoef, float vcoef);
/* map data functions using a bitmap of:
* 1 = is_transparant
* 2 = is_walkable
* 4 = in_fov
*/
void TDL_map_data_from_buffer(TCOD_map_t map, uint8_t* buffer);
void TDL_map_fov_to_buffer(TCOD_map_t map, uint8_t* buffer, bool cumulative);
int TDL_console_put_char_ex(TCOD_console_t console, int x, int y, int ch, int fg, int bg, TCOD_bkgnd_flag_t flag);
int TDL_console_get_bg(TCOD_console_t console, int x, int y);
int TDL_console_get_fg(TCOD_console_t console, int x, int y);
void TDL_console_set_bg(TCOD_console_t console, int x, int y, int color, TCOD_bkgnd_flag_t flag);
void TDL_console_set_fg(TCOD_console_t console, int x, int y, int color);
#endif /* PYTHON_TCOD_TDL_H_ */