Exemple #1
0
 def __init__(self):
     libtcod.console_set_custom_font('data/fonts/terminal10x10_gs_tc.png',
                                     libtcod.FONT_TYPE_GREYSCALE | libtcod.FONT_LAYOUT_TCOD)
     libtcod.console_init_root(SCREEN_WIDTH, SCREEN_HEIGHT, 'darktower-rl', False)
     self.con = libtcod.console_new(SCREEN_WIDTH, SCREEN_HEIGHT)
     self.con2 = libtcod.console_new(SCREEN_WIDTH, SCREEN_HEIGHT)
     self.panel = libtcod.console_new(RIGHT_PANEL_WIDTH, SCREEN_HEIGHT)
     self.panel_msg = libtcod.console_new(SCREEN_WIDTH, MSG_PANEL_HEIGHT)
     self.message_colours[0] = libtcod.Color(128,128,128)
     self.message_colours[1] = libtcod.Color(200,200,200)
     self.message_colours[2] = libtcod.Color(128,10,10)
     self.message_colours[3] = libtcod.Color(255,10,10)
     self.message_colours[4] = libtcod.Color(255,255,255)
Exemple #2
0
 def __init__(self):
     self.key = libtcod.Key()
     self.mouse = libtcod.Mouse()
     libtcod.console_set_custom_font('data/fonts/BrogueFont3.png',
                                     libtcod.FONT_TYPE_GREYSCALE | libtcod.FONT_LAYOUT_ASCII_INROW)
     libtcod.console_init_root(SCREEN_WIDTH, SCREEN_HEIGHT, 'darktower-rl', False, renderer=libtcod.RENDERER_OPENGL)
     self.con = libtcod.console_new(VIEWPORT_WIDTH, VIEWPORT_HEIGHT)
     self.con2 = libtcod.console_new(VIEWPORT_WIDTH, VIEWPORT_HEIGHT)
     self.panel = libtcod.console_new(RIGHT_PANEL_WIDTH, SCREEN_HEIGHT)
     self.panel_msg = libtcod.console_new(SCREEN_WIDTH, MSG_PANEL_HEIGHT)
     self.con_full = libtcod.console_new(SCREEN_WIDTH, SCREEN_HEIGHT)
     self.message_colours[0] = libtcod.Color(128,128,128)
     self.message_colours[1] = libtcod.Color(200,200,200)
     self.message_colours[2] = libtcod.Color(128,10,10)
     self.message_colours[3] = libtcod.Color(255,10,10)
     self.message_colours[4] = libtcod.Color(255,255,255)
     self.viewport = None