You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
SuperMario/pythonProject1/data/setup.py

28 lines
685 B

"""
This module initializes the display and creates dictionaries of resources.
"""
import os
import pygame as pg
from . import tools
from .import constants as c
ORIGINAL_CAPTION = c.ORIGINAL_CAPTION
os.environ['SDL_VIDEO_CENTERED'] = '1'
pg.init()
pg.event.set_allowed([pg.KEYDOWN, pg.KEYUP, pg.QUIT])
pg.display.set_caption(c.ORIGINAL_CAPTION)
SCREEN = pg.display.set_mode(c.SCREEN_SIZE)
SCREEN_RECT = SCREEN.get_rect()
FONTS = tools.load_all_fonts(os.path.join("resources","fonts"))
MUSIC = tools.load_all_music(os.path.join("resources","music"))
GFX = tools.load_all_gfx(os.path.join("resources","graphics"))
SFX = tools.load_all_sfx(os.path.join("resources","sound"))