gfx.py 文件源码

python
阅读 45 收藏 0 点赞 0 评论 0

项目:solarwolf 作者: pygame 项目源码 文件源码
def initialize(size, fullscreen):
    global surface, rect, starobj
    try:
        flags = 0
        if fullscreen:
            flags |= FULLSCREEN
        #depth = pygame.display.mode_ok(size, flags, 16)
        surface = pygame.display.set_mode(size, flags)#, depth)
        rect = surface.get_rect()

        pygame.mouse.set_visible(0)

        if surface.get_bytesize() == 1:
            loadpalette()

    except pygame.error as msg:
        raise pygame.error('Cannot Initialize Graphics')
    starobj = stars.Stars()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号