def loadscreen():
    loading_bg = pygame.image.load(gmapi.renpy_glue.read_directories[1]+'data/stars.jpg')
    loading_font = pygame.font.Font(gmapi.renpy_glue.read_directories[1]+'Prescript',34)
    #loading_font.set_bold(1)
    loading_str = loading_font.render('Loading...',1,gmapi.c_white)
    loading_bg.blit(loading_str,(400-(loading_str.get_width()>>1),300-(loading_str.get_height()>>1)))
    loading_bg.blit(loading_str,(401-(loading_str.get_width()>>1),300-(loading_str.get_height()>>1)))
    screen = pygame.display.set_mode((800,600),0)#pygame.DOUBLEBUF)
    screen.blit(loading_bg,(0,0))
    pygame.display.flip()
    return loading_bg

loading_bg = loadscreen()
