Beispiel #1
0
def main():
    pygame.init()
    pygame.display.set_caption("Dungeon Monkey Eternal","DMEternal")
    pygame.display.set_icon(pygame.image.load(util.image_dir("sys_icon.png")))
    # Set the screen size.
    if util.config.getboolean( "DEFAULT", "fullscreen" ):
        screen = pygame.display.set_mode( (0,0), pygame.FULLSCREEN )
    else:
        screen = pygame.display.set_mode( (800,600) )
    pygwrap.init()
    rpgmenu.init()

    screen_center_x = screen.get_width() // 2
    screen_center_y = screen.get_height() // 2

    rpm = rpgmenu.Menu( screen,screen_center_x-100,screen_center_y + 25,200,200,predraw=TitleScreenRedraw(screen) )

    rpm.add_item( "Create Character", chargen.make_and_save_character )
    rpm.add_item( "Load Campaign", load_campaign )
    rpm.add_item( "Start Endless Campaign", endless_start_campaign )
    #rpm.add_item( "Start Bardic Campaign", bardic_start_campaign )
    #rpm.add_item( "Start Gen1 Campaign", default_start_campaign )
    rpm.add_item( "Browse Characters", campaign.browse_pcs )
    #rpm.add_item( "Test Campaign Generator", test_campaign_generator )
    rpm.add_item( "Quit Game", None )

    cmd = True
    while cmd:
        cmd = rpm.query()
        if cmd:
            cmd( screen )
        if pygwrap.GOT_QUIT:
            break
Beispiel #2
0
def init(winname,appname,gamedir,icon="sys_icon.png"):
    global INIT_DONE
    if not INIT_DONE:
        util.init(appname,gamedir)

        pygame.init()
        pygame.display.set_caption(winname,appname)
        pygame.display.set_icon(pygame.image.load(util.image_dir(icon)))
        # Set the screen size.
        if util.config.getboolean( "DEFAULT", "fullscreen" ):
            my_state.screen = pygame.display.set_mode( (0,0), pygame.FULLSCREEN )
        else:
            my_state.screen = pygame.display.set_mode( (800,600), pygame.RESIZABLE )

        rpgmenu.init()

        global INPUT_CURSOR
        INPUT_CURSOR = image.Image( "sys_textcursor.png" , 8 , 16 )

        global SMALLFONT
        SMALLFONT = pygame.font.Font( util.image_dir( "VeraBd.ttf" ) , 12 )

        global TINYFONT
        TINYFONT = pygame.font.Font( util.image_dir( "VeraBd.ttf" ) , 9 )

        global ANIMFONT
        ANIMFONT = pygame.font.Font( util.image_dir( "DejaVuSansCondensed-Bold.ttf" ) , 16 )

        global ITALICFONT
        ITALICFONT = pygame.font.Font( util.image_dir( "VeraBI.ttf" ) , 12 )

        global POSTERS
        POSTERS += glob.glob( util.image_dir("poster_*.png") )

        global FPS
        FPS = util.config.getint( "DEFAULT", "frames_per_second" )
        pygame.time.set_timer(TIMEREVENT, 1000 / FPS)

        if android:
            android.init()
            android.map_key(android.KEYCODE_BACK, pygame.K_ESCAPE)

        # Set key repeat.
        pygame.key.set_repeat( 200 , 75 )

        INIT_DONE = True
Beispiel #3
0
def main():
    pygame.init()
    pygame.display.set_caption("Dungeon Monkey Eternal", "DMEternal")
    pygame.display.set_icon(pygame.image.load(util.image_dir("sys_icon.png")))
    # Set the screen size.
    if util.config.getboolean("DEFAULT", "fullscreen"):
        screen = pygame.display.set_mode((800, 600))
        screen = pygame.display.set_mode((0, 0), pygame.FULLSCREEN)
    else:
        screen = pygame.display.set_mode((800, 600))
    rpgmenu.init()

    screen_center_x = screen.get_width() // 2
    screen_center_y = screen.get_height() // 2

    rpm = rpgmenu.Menu(screen,
                       screen_center_x - 100,
                       screen_center_y + 25,
                       200,
                       200,
                       predraw=TitleScreenRedraw(screen))

    rpm.add_item("Create Character", chargen.make_and_save_character)
    rpm.add_item("Load Campaign", load_campaign)
    rpm.add_item("Start Endless Campaign", endless_start_campaign)
    #rpm.add_item( "Start Bardic Campaign", bardic_start_campaign )
    #rpm.add_item( "Start Gen1 Campaign", default_start_campaign )
    rpm.add_item("Browse Characters", campaign.browse_pcs)
    rpm.add_item("Settings", load_settings)
    #rpm.add_item( "Test Campaign Generator", test_campaign_generator )
    rpm.add_item("Quit Game", None)

    cmd = True
    while cmd:
        cmd = rpm.query()
        if cmd:
            cmd(screen)
        if pygwrap.GOT_QUIT:
            break
Beispiel #4
0
    for p in narrator.UNSORTED_PLOT_LIST:
        if p._used > 0:
            print "{} [{}]".format(p, p._used)


if __name__ == "__main__":
    pygame.init()
    pygame.display.set_caption("Dungeon Monkey Eternal", "DMEternal")
    pygame.display.set_icon(pygame.image.load(util.image_dir("sys_icon.png")))
    # Set the screen size.
    if util.config.getboolean("DEFAULT", "fullscreen"):
        screen = pygame.display.set_mode((0, 0), pygame.FULLSCREEN)
    else:
        screen = pygame.display.set_mode((800, 600))
    pygwrap.init()
    rpgmenu.init()

    screen_center_x = screen.get_width() // 2
    screen_center_y = screen.get_height() // 2

    rpm = rpgmenu.Menu(screen, screen_center_x - 100, screen_center_y + 25, 200, 200, predraw=TitleScreenRedraw(screen))

    rpm.add_item("Create Character", chargen.make_and_save_character)
    rpm.add_item("Load Campaign", load_campaign)
    rpm.add_item("Start Endless Campaign", endless_start_campaign)
    # rpm.add_item( "Start Bardic Campaign", bardic_start_campaign )
    # rpm.add_item( "Start Gen1 Campaign", default_start_campaign )
    rpm.add_item("Browse Characters", campaign.browse_pcs)
    # rpm.add_item( "Test Campaign Generator", test_campaign_generator )
    rpm.add_item("Quit Game", None)
Beispiel #5
0
    for p in narrator.UNSORTED_PLOT_LIST:
        if p._used > 0:
            print "{} [{}]".format( p, p._used )

if __name__=='__main__':
    pygame.init()
    pygame.display.set_caption("Dungeon Monkey Eternal","DMEternal")
    pygame.display.set_icon(pygame.image.load(util.image_dir("sys_icon.png")))
    # Set the screen size.
    if util.config.getboolean( "DEFAULT", "fullscreen" ):
        screen = pygame.display.set_mode( (0,0), pygame.FULLSCREEN )
    else:
        screen = pygame.display.set_mode( (800,600) )
    pygwrap.init()
    rpgmenu.init()

    screen_center_x = screen.get_width() // 2
    screen_center_y = screen.get_height() // 2

    rpm = rpgmenu.Menu( screen,screen_center_x-100,screen_center_y + 25,200,200,predraw=TitleScreenRedraw(screen) )

    rpm.add_item( "Create Character", chargen.make_and_save_character )
    rpm.add_item( "Load Campaign", load_campaign )
    rpm.add_item("Delete Saved Games", Delete_saved_games)
    rpm.add_item( "Start Endless Campaign", endless_start_campaign )
    #rpm.add_item( "Start Bardic Campaign", bardic_start_campaign )
    #rpm.add_item( "Start Gen1 Campaign", default_start_campaign )
    rpm.add_item( "Browse Characters", campaign.browse_pcs )
    #rpm.add_item( "Test Campaign Generator", test_campaign_generator )
    rpm.add_item( "Quit Game", None )