Mercurial > pyntnclick
changeset 20:177e3a7825e8
Add constants file
author | Neil Muller <neil@dip.sun.ac.za> |
---|---|
date | Sun, 22 Aug 2010 17:07:46 +0200 |
parents | 87f8a46b88af |
children | 4810fd976051 |
files | gamelib/constants.py gamelib/main.py |
diffstat | 2 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gamelib/constants.py Sun Aug 22 17:07:46 2010 +0200 @@ -0,0 +1,8 @@ +# Useful constants +# copyright boomslang team (see COPYRIGHT file for details) + +SCREEN = (800, 600) +FREQ = 44100 # same as audio CD +BITSIZE = -16 # unsigned 16 bit +CHANNELS = 2 # 1 == mono, 2 == stereo +BUFFER = 1024 # audio buffer size in no. of samples
--- a/gamelib/main.py Sun Aug 22 17:07:01 2010 +0200 +++ b/gamelib/main.py Sun Aug 22 17:07:46 2010 +0200 @@ -11,6 +11,7 @@ from albow.dialogs import alert from albow.shell import Shell from menu import MenuScreen +from constants import SCREEN class MainShell(Shell): def __init__(self, display): @@ -20,7 +21,7 @@ def main(): pygame.init() - display = pygame.display.set_mode((800, 600)) + display = pygame.display.set_mode(SCREEN) shell = MainShell(display) shell.run()