Example #1
0
def dummy_draw_level(level):
    for x, y, cell in level.map:
        if not cell.explored:
            continue
        in_fov = libtcod.map_is_in_fov(level.fov_map, x, y)
        if in_fov:
            if cell.blocks_sight:
                col = color_light_wall
            else:
                col = color_light_ground
        else:
            if cell.blocks_sight:
                col = color_dark_wall
            else:
                col = color_dark_ground

        libtcod.console_set_char_background(0, x, y, col)
        # libtcod.console_set_char_foreground(0, x, y, col)
        # libtcod.console_set_char(0, x, y, ch)

    for obj in level.objects:
        libtcod.console_set_char(0, obj.x, obj.y, obj.char)
Example #2
0
def dummy_draw_obj(obj):
    libtcod.console_set_char_foreground(0, obj.x, obj.y, libtcod.red)
    libtcod.console_set_char(0, obj.x, obj.y, obj.char)