Module libtcodpy
[hide private]
[frames] | no frames]

Module libtcodpy

source code

Classes [hide private]
  Color
  Key
  Mouse
  Dice
  _CValue
  _CParserListener
  _CBsp
  Bsp
  _CHeightMap
  HeightMap
Functions [hide private]
 
int_to_col(i) source code
 
col_to_int(c) source code
 
color_lerp(c1, c2, a) source code
 
color_set_hsv(c, h, s, v) source code
 
color_get_hsv(c) source code
 
color_gen_map(colors, indexes) source code
 
BKGND_ALPHA(a) source code
 
BKGND_ADDALPHA(a) source code
 
console_init_root(w, h, title, fullscreen=False) source code
 
console_set_custom_font(fontFile, flags=1, nb_char_horiz=0, nb_char_vertic=0) source code
 
console_map_ascii_code_to_font(asciiCode, fontCharX, fontCharY) source code
 
console_map_ascii_codes_to_font(firstAsciiCode, nbCodes, fontCharX, fontCharY) source code
 
console_map_string_to_font(s, fontCharX, fontCharY) source code
 
console_is_fullscreen() source code
 
console_set_fullscreen(fullscreen) source code
 
console_is_window_closed() source code
 
console_set_window_title(title) source code
 
console_credits() source code
 
console_credits_reset() source code
 
console_credits_render(x, y, alpha) source code
 
console_flush() source code
 
console_set_background_color(con, col) source code
 
console_set_foreground_color(con, col) source code
 
console_clear(con) source code
 
console_put_char(con, x, y, c, flag=1) source code
 
console_put_char_ex(con, x, y, c, fore, back) source code
 
console_set_back(con, x, y, col, flag=1) source code
 
console_set_fore(con, x, y, col) source code
 
console_set_char(con, x, y, c) source code
 
console_print_left(con, x, y, bk, s) source code
 
console_print_right(con, x, y, bk, s) source code
 
console_print_center(con, x, y, bk, s) source code
 
console_print_left_rect(con, x, y, w, h, bk, s) source code
 
console_print_right_rect(con, x, y, w, h, bk, s) source code
 
console_print_center_rect(con, x, y, w, h, bk, s) source code
 
console_height_left_rect(con, x, y, w, h, s) source code
 
console_height_right_rect(con, x, y, w, h, s) source code
 
console_height_center_rect(con, x, y, w, h, s) source code
 
console_rect(con, x, y, w, h, clr, flag=1) source code
 
console_hline(con, x, y, l) source code
 
console_vline(con, x, y, l) source code
 
console_print_frame(con, x, y, w, h, clr, bkflg, s) source code
 
console_set_color_control(con, fore, back) source code
 
console_get_background_color(con) source code
 
console_get_foreground_color(con) source code
 
console_get_back(con, x, y) source code
 
console_get_fore(con, x, y) source code
 
console_get_char(con, x, y) source code
 
console_set_fade(fade, fadingColor) source code
 
console_get_fade() source code
 
console_get_fading_color() source code
 
console_wait_for_keypress(flush) source code
 
console_check_for_keypress(flags=2) source code
 
console_is_key_pressed(key) source code
 
console_set_keyboard_repeat(initial_delay, interval) source code
 
console_disable_keyboard_repeat() source code
 
console_new(w, h) source code
 
console_get_width(con) source code
 
console_get_height(con) source code
 
console_blit(src, x, y, w, h, dst, xdst, ydst, ffade=1.0, bfade=1.0) source code
 
console_set_key_color(con, col) source code
 
console_delete(con) source code
 
console_fill_foreground(con, r, g, b) source code
 
console_fill_background(con, r, g, b) source code
 
sys_set_fps(fps) source code
 
sys_get_fps() source code
 
sys_get_last_frame_length() source code
 
sys_sleep_milli(val) source code
 
sys_elapsed_milli() source code
 
sys_elapsed_seconds() source code
 
sys_save_screenshot(name=0) source code
 
sys_force_fullscreen_resolution(width, height) source code
 
sys_get_current_resolution() source code
 
sys_get_char_size() source code
 
sys_update_char(asciiCode, fontx, fonty, img, x, y) source code
 
sys_register_SDL_renderer(func) source code
 
line_init(xo, yo, xd, yd) source code
 
line_step() source code
 
line(xo, yo, xd, yd, py_callback) source code
 
image_new(width, height) source code
 
image_clear(image, col) source code
 
image_invert(image) source code
 
image_hflip(image) source code
 
image_vflip(image) source code
 
image_scale(image, neww, newh) source code
 
image_set_key_color(image, col) source code
 
image_get_alpha(image, x, y) source code
 
image_is_pixel_transparent(image, x, y) source code
 
image_load(filename) source code
 
image_from_console(console) source code
 
image_refresh_console(image, console) source code
 
image_get_size(image) source code
 
image_get_pixel(image, x, y) source code
 
image_get_mipmap_pixel(image, x0, y0, x1, y1) source code
 
image_put_pixel(image, x, y, col) source code
 
image_blit(image, console, x, y, bkgnd_flag, scalex, scaley, angle) source code
 
image_blit_rect(image, console, x, y, w, h, bkgnd_flag) source code
 
image_blit_2x(image, console, dx, dy, sx=0, sy=0, w=-1, h=-1) source code
 
image_save(image, filename) source code
 
image_delete(image) source code
 
mouse_show_cursor(visible) source code
 
mouse_is_cursor_visible() source code
 
mouse_move(x, y) source code
 
mouse_get_status() source code
 
parser_new() source code
 
parser_new_struct(parser, name) source code
 
struct_add_flag(struct, name) source code
 
struct_add_property(struct, name, typ, mandatory) source code
 
struct_add_value_list(struct, name, value_list, mandatory) source code
 
struct_add_list_property(struct, name, typ, mandatory) source code
 
struct_add_structure(struct, sub_struct) source code
 
struct_get_name(struct) source code
 
struct_is_mandatory(struct, name) source code
 
struct_get_type(struct, name) source code
 
parser_run(parser, filename, listener=0) source code
 
parser_delete(parser) source code
 
parser_get_bool_property(parser, name) source code
 
parser_get_int_property(parser, name) source code
 
parser_get_char_property(parser, name) source code
 
parser_get_float_property(parser, name) source code
 
parser_get_string_property(parser, name) source code
 
parser_get_color_property(parser, name) source code
 
parser_get_dice_property(parser, name) source code
 
parser_get_list_property(parser, name) source code
 
random_get_instance() source code
 
random_new(algo=1) source code
 
random_new_from_seed(seed, algo=1) source code
 
random_get_int(rnd, mi, ma) source code
 
random_get_float(rnd, mi, ma) source code
 
random_get_gaussian_float(rnd, mi, ma) source code
 
random_get_gaussian_int(rnd, mi, ma) source code
 
random_save(rnd) source code
 
random_restore(rnd, backup) source code
 
random_delete(rnd) source code
 
noise_new(dim, h=0.5, l=2.0, rnd=0) source code
 
_noise_int(n, f, func) source code
 
noise_perlin(n, f) source code
 
noise_simplex(n, f) source code
 
noise_wavelet(n, f) source code
 
_noise_int2(n, f, oc, func) source code
 
noise_fbm_perlin(n, f, oc) source code
 
noise_fbm_simplex(n, f, oc) source code
 
noise_fbm_wavelet(n, f, oc) source code
 
noise_turbulence_perlin(n, f, oc) source code
 
noise_turbulence_simplex(n, f, oc) source code
 
noise_turbulence_wavelet(n, f, oc) source code
 
noise_delete(n) source code
 
FOV_PERMISSIVE(p) source code
 
map_new(w, h) source code
 
map_copy(source, dest) source code
 
map_set_properties(m, x, y, isTrans, isWalk) source code
 
map_clear(m) source code
 
map_compute_fov(m, x, y, radius=0, light_walls=True, algo=12) source code
 
map_is_in_fov(m, x, y) source code
 
map_is_transparent(m, x, y) source code
 
map_is_walkable(m, x, y) source code
 
map_delete(m) source code
 
path_new_using_map(m, dcost=1.41) source code
 
path_new_using_function(w, h, func, userdata=0, dcost=1.41) source code
 
path_compute(p, ox, oy, dx, dy) source code
 
path_get_origin(p) source code
 
path_get_destination(p) source code
 
path_size(p) source code
 
path_get(p, idx) source code
 
path_is_empty(p) source code
 
path_walk(p, recompute) source code
 
path_delete(p) source code
 
dijkstra_new(m, dcost=1.41) source code
 
dijkstra_new_using_function(w, h, func, userdata=0, dcost=1.41) source code
 
dijkstra_compute(p, ox, oy) source code
 
dijkstra_path_set(p, x, y) source code
 
dijkstra_get_distance(p, x, y) source code
 
dijkstra_size(p) source code
 
dijkstra_get(p, idx) source code
 
dijkstra_is_empty(p) source code
 
dijkstra_path_walk(p) source code
 
dijkstra_delete(p) source code
 
bsp_new_with_size(x, y, w, h) source code
 
bsp_split_once(node, horizontal, position) source code
 
bsp_split_recursive(node, randomizer, nb, minHSize, minVSize, maxHRatio, maxVRatio) source code
 
bsp_resize(node, x, y, w, h) source code
 
bsp_left(node) source code
 
bsp_right(node) source code
 
bsp_father(node) source code
 
bsp_is_leaf(node) source code
 
bsp_contains(node, cx, cy) source code
 
bsp_find_node(node, cx, cy) source code
 
_bsp_traverse(node, callback, userData, func) source code
 
bsp_traverse_pre_order(node, callback, userData=0) source code
 
bsp_traverse_in_order(node, callback, userData=0) source code
 
bsp_traverse_post_order(node, callback, userData=0) source code
 
bsp_traverse_level_order(node, callback, userData=0) source code
 
bsp_traverse_inverted_level_order(node, callback, userData=0) source code
 
bsp_remove_sons(node) source code
 
bsp_delete(node) source code
 
heightmap_new(w, h) source code
 
heightmap_set_value(hm, x, y, value) source code
 
heightmap_add(hm, value) source code
 
heightmap_scale(hm, value) source code
 
heightmap_clear(hm) source code
 
heightmap_clamp(hm, mi, ma) source code
 
heightmap_copy(hm1, hm2) source code
 
heightmap_normalize(hm, mi=0.0, ma=1.0) source code
 
heightmap_lerp_hm(hm1, hm2, hm3, coef) source code
 
heightmap_add_hm(hm1, hm2, hm3) source code
 
heightmap_multiply_hm(hm1, hm2, hm3) source code
 
heightmap_add_hill(hm, x, y, radius, height) source code
 
heightmap_dig_hill(hm, x, y, radius, height) source code
 
heightmap_rain_erosion(hm, nbDrops, erosionCoef, sedimentationCoef, rnd=0) source code
 
heightmap_kernel_transform(hm, kernelsize, dx, dy, weight, minLevel, maxLevel) source code
 
heightmap_add_voronoi(hm, nbPoints, nbCoef, coef, rnd=0) source code
 
heightmap_add_fbm(hm, noise, mulx, muly, addx, addy, octaves, delta, scale) source code
 
heightmap_scale_fbm(hm, noise, mulx, muly, addx, addy, octaves, delta, scale) source code
 
heightmap_dig_bezier(hm, px, py, startRadius, startDepth, endRadius, endDepth) source code
 
heightmap_get_value(hm, x, y) source code
 
heightmap_get_interpolated_value(hm, x, y) source code
 
heightmap_get_slope(hm, x, y) source code
 
heightmap_get_normal(hm, x, y, waterLevel) source code
 
heightmap_count_cells(hm, mi, ma) source code
 
heightmap_has_land_on_border(hm, waterlevel) source code
 
heightmap_get_minmax(hm) source code
 
heightmap_delete(hm) source code
 
namegen_parse(filename, random=0) source code
 
namegen_generate(name, allocate=0) source code
 
namegen_generate_custom(name, rule, allocate=0) source code
 
namegen_get_sets() source code
 
namegen_destroy() source code
Variables [hide private]
  numpy_available = True
  _lib = <CDLL './libtcod-mingw.dll', handle 67780000 at d50bd0>
  HEXVERSION = 66816
  STRVERSION = '1.5.0'
  TECHVERSION = 17104899
  black = Color(0, 0, 0)
  darker_grey = Color(31, 31, 31)
  dark_grey = Color(63, 63, 63)
  grey = Color(128, 128, 128)
  light_grey = Color(191, 191, 191)
  darker_gray = Color(31, 31, 31)
  dark_gray = Color(63, 63, 63)
  gray = Color(128, 128, 128)
  light_gray = Color(191, 191, 191)
  white = Color(255, 255, 255)
  red = Color(255, 0, 0)
  orange = Color(255, 127, 0)
  yellow = Color(255, 255, 0)
  chartreuse = Color(127, 255, 0)
  green = Color(0, 255, 0)
  sea = Color(0, 255, 127)
  cyan = Color(0, 255, 255)
  sky = Color(0, 127, 255)
  blue = Color(0, 0, 255)
  violet = Color(127, 0, 255)
  magenta = Color(255, 0, 255)
  pink = Color(255, 0, 127)
  dark_red = Color(127, 0, 0)
  dark_orange = Color(127, 63, 0)
  dark_yellow = Color(127, 127, 0)
  dark_chartreuse = Color(63, 127, 0)
  dark_green = Color(0, 127, 0)
  dark_sea = Color(0, 127, 63)
  dark_cyan = Color(0, 127, 127)
  dark_sky = Color(0, 63, 127)
  dark_blue = Color(0, 0, 127)
  dark_violet = Color(63, 0, 127)
  dark_magenta = Color(127, 0, 127)
  dark_pink = Color(127, 0, 63)
  darker_red = Color(63, 0, 0)
  darker_orange = Color(63, 31, 0)
  darker_yellow = Color(63, 63, 0)
  darker_chartreuse = Color(31, 63, 0)
  darker_green = Color(0, 63, 0)
  darker_sea = Color(0, 63, 31)
  darker_cyan = Color(0, 63, 63)
  darker_sky = Color(0, 31, 63)
  darker_blue = Color(0, 0, 63)
  darker_violet = Color(31, 0, 63)
  darker_magenta = Color(63, 0, 63)
  darker_pink = Color(63, 0, 31)
  light_red = Color(255, 127, 127)
  light_orange = Color(255, 191, 127)
  light_yellow = Color(255, 255, 127)
  light_chartreuse = Color(191, 255, 127)
  light_green = Color(127, 255, 127)
  light_sea = Color(127, 255, 191)
  light_cyan = Color(127, 255, 255)
  light_sky = Color(127, 191, 255)
  light_blue = Color(127, 127, 255)
  light_violet = Color(191, 127, 255)
  light_magenta = Color(255, 127, 255)
  light_pink = Color(255, 127, 191)
  desaturated_red = Color(127, 63, 63)
  desaturated_orange = Color(127, 95, 63)
  desaturated_yellow = Color(127, 127, 63)
  desaturated_chartreuse = Color(95, 127, 63)
  desaturated_green = Color(63, 127, 63)
  desaturated_sea = Color(63, 127, 95)
  desaturated_cyan = Color(63, 127, 127)
  desaturated_sky = Color(63, 95, 127)
  desaturated_blue = Color(63, 63, 127)
  desaturated_violet = Color(95, 63, 127)
  desaturated_magenta = Color(127, 63, 127)
  desaturated_pink = Color(127, 63, 95)
  silver = Color(203, 203, 203)
  gold = Color(255, 255, 102)
  BKGND_NONE = 0
  BKGND_SET = 1
  BKGND_MULTIPLY = 2
  BKGND_LIGHTEN = 3
  BKGND_DARKEN = 4
  BKGND_SCREEN = 5
  BKGND_COLOR_DODGE = 6
  BKGND_COLOR_BURN = 7
  BKGND_ADD = 8
  BKGND_ADDA = 9
  BKGND_BURN = 10
  BKGND_OVERLAY = 11
  BKGND_ALPH = 12
  KEY_PRESSED = 1
  KEY_RELEASED = 2
  KEY_NONE = 0
  KEY_ESCAPE = 1
  KEY_BACKSPACE = 2
  KEY_TAB = 3
  KEY_ENTER = 4
  KEY_SHIFT = 5
  KEY_CONTROL = 6
  KEY_ALT = 7
  KEY_PAUSE = 8
  KEY_CAPSLOCK = 9
  KEY_PAGEUP = 10
  KEY_PAGEDOWN = 11
  KEY_END = 12
  KEY_HOME = 13
  KEY_UP = 14
  KEY_LEFT = 15
  KEY_RIGHT = 16
  KEY_DOWN = 17
  KEY_PRINTSCREEN = 18
  KEY_INSERT = 19
  KEY_DELETE = 20
  KEY_LWIN = 21
  KEY_RWIN = 22
  KEY_APPS = 23
  KEY_0 = 24
  KEY_1 = 25
  KEY_2 = 26
  KEY_3 = 27
  KEY_4 = 28
  KEY_5 = 29
  KEY_6 = 30
  KEY_7 = 31
  KEY_8 = 32
  KEY_9 = 33
  KEY_KP0 = 34
  KEY_KP1 = 35
  KEY_KP2 = 36
  KEY_KP3 = 37
  KEY_KP4 = 38
  KEY_KP5 = 39
  KEY_KP6 = 40
  KEY_KP7 = 41
  KEY_KP8 = 42
  KEY_KP9 = 43
  KEY_KPADD = 44
  KEY_KPSUB = 45
  KEY_KPDIV = 46
  KEY_KPMUL = 47
  KEY_KPDEC = 48
  KEY_KPENTER = 49
  KEY_F1 = 50
  KEY_F2 = 51
  KEY_F3 = 52
  KEY_F4 = 53
  KEY_F5 = 54
  KEY_F6 = 55
  KEY_F7 = 56
  KEY_F8 = 57
  KEY_F9 = 58
  KEY_F10 = 59
  KEY_F11 = 60
  KEY_F12 = 61
  KEY_NUMLOCK = 62
  KEY_SCROLLLOCK = 63
  KEY_SPACE = 64
  KEY_CHAR = 65
  CHAR_HLINE = 196
  CHAR_VLINE = 179
  CHAR_NE = 191
  CHAR_NW = 218
  CHAR_SE = 217
  CHAR_SW = 192
  CHAR_TEEW = 180
  CHAR_TEEE = 195
  CHAR_TEEN = 193
  CHAR_TEES = 194
  CHAR_CROSS = 197
  CHAR_DHLINE = 205
  CHAR_DVLINE = 186
  CHAR_DNE = 187
  CHAR_DNW = 201
  CHAR_DSE = 188
  CHAR_DSW = 200
  CHAR_DTEEW = 185
  CHAR_DTEEE = 204
  CHAR_DTEEN = 202
  CHAR_DTEES = 203
  CHAR_DCROSS = 206
  CHAR_BLOCK1 = 176
  CHAR_BLOCK2 = 177
  CHAR_BLOCK3 = 178
  CHAR_ARROW_N = 24
  CHAR_ARROW_S = 25
  CHAR_ARROW_E = 26
  CHAR_ARROW_W = 27
  CHAR_ARROW2_N = 30
  CHAR_ARROW2_S = 31
  CHAR_ARROW2_E = 16
  CHAR_ARROW2_W = 17
  CHAR_DARROW_H = 29
  CHAR_DARROW_V = 18
  CHAR_CHECKBOX_UNSET = 224
  CHAR_CHECKBOX_SET = 225
  CHAR_RADIO_UNSET = 9
  CHAR_RADIO_SET = 10
  CHAR_SUBP_NW = 226
  CHAR_SUBP_NE = 227
  CHAR_SUBP_N = 228
  CHAR_SUBP_SE = 229
  CHAR_SUBP_DIAG = 230
  CHAR_SUBP_E = 231
  CHAR_SUBP_SW = 232
  FONT_LAYOUT_ASCII_INCOL = 1
  FONT_LAYOUT_ASCII_INROW = 2
  FONT_TYPE_GREYSCALE = 4
  FONT_TYPE_GRAYSCALE = 4
  FONT_LAYOUT_TCOD = 8
  COLCTRL_1 = 1
  COLCTRL_2 = 2
  COLCTRL_3 = 3
  COLCTRL_4 = 4
  COLCTRL_5 = 5
  COLCTRL_NUMBER = 5
  COLCTRL_FORE_RGB = 6
  COLCTRL_BACK_RGB = 7
  COLCTRL_STOP = 8
  SDL_RENDERER_FUNC = None
  sdl_renderer_func = None
  TYPE_NONE = 0
  TYPE_BOOL = 1
  TYPE_CHAR = 2
  TYPE_INT = 3
  TYPE_FLOAT = 4
  TYPE_STRING = 5
  TYPE_COLOR = 6
  TYPE_DICE = 7
  TYPE_VALUELIST00 = 8
  TYPE_VALUELIST01 = 9
  TYPE_VALUELIST02 = 10
  TYPE_VALUELIST03 = 11
  TYPE_VALUELIST04 = 12
  TYPE_VALUELIST05 = 13
  TYPE_VALUELIST06 = 14
  TYPE_VALUELIST07 = 15
  TYPE_VALUELIST08 = 16
  TYPE_VALUELIST09 = 17
  TYPE_VALUELIST10 = 18
  TYPE_VALUELIST11 = 19
  TYPE_VALUELIST12 = 20
  TYPE_VALUELIST13 = 21
  TYPE_VALUELIST14 = 22
  TYPE_VALUELIST15 = 23
  TYPE_LIST = 1024
  RNG_MT = 0
  RNG_CMWC = 1
  NOISE_DEFAULT_HURST = 0.5
  NOISE_DEFAULT_LACUNARITY = 2.0
  FOV_BASIC = 0
  FOV_DIAMOND = 1
  FOV_SHADOW = 2
  FOV_PERMISSIVE_0 = 3
  FOV_PERMISSIVE_1 = 4
  FOV_PERMISSIVE_2 = 5
  FOV_PERMISSIVE_3 = 6
  FOV_PERMISSIVE_4 = 7
  FOV_PERMISSIVE_5 = 8
  FOV_PERMISSIVE_6 = 9
  FOV_PERMISSIVE_7 = 10
  FOV_PERMISSIVE_8 = 11
  FOV_RESTRICTIVE = 12
  NB_FOV_ALGORITHMS = 13
  PATH_CBK_FUNC = None
  cbk_func = None
  __package__ = None