5529b60693245f2ce269588263dc422194c6b6e7
[tabakrolletjie.git] / tabakrolletjie / constants.py
1 """ Game constants.
2 """
3
4 import os
5
6 TITLE = "Space Turnips"
7
8 # Debug
9 DEBUG = os.environ.get("TABAK_DEBUG", "").lower() in ("1", "y", "yes")
10 DRAW_FPS = os.environ.get("TABAK_DRAW_FPS", "").lower() in ("1", "y", "yes")
11 # Intervals to average fps over
12 FPS_FRAMES = 50
13
14 # 704 is 768 minus space for window decorations :)
15 SCREEN_SIZE = (1024, 704)
16
17 # Frame per second
18 FPS = 60
19
20 # Pymunk categories
21 OBSTACLE_CATEGORY = 1 << 0
22 LIGHT_CATEGORY = 1 << 1
23 MOULD_CATEGORY = 1 << 2
24 FITTINGS_CATEGORY = 1 << 3
25 TURNIP_CATEGORY = 1 << 4
26
27 # Font definitions
28 FONTS = {
29     'sans': 'DejaVuSans.ttf',
30     'bold': 'DejaVuSans-Bold.ttf',
31 }
32
33 # Sound stuff
34 FREQ = 44100
35 BITSIZE = -16
36 CHANNELS = 2
37 BUFFER = 1024
38 DEFAULT_VOLUME = 1.0
39
40 NO_SOUND = os.environ.get("TABAK_NO_SOUND", "").lower() in ("1", "y", "yes")
41
42 # Color constants
43 COLOURS = {
44     "red": (255, 0, 0),
45     "green": (0, 255, 0),
46     "blue": (0, 0, 255),
47     "cyan": (0, 255, 255),
48     "yellow": (255, 255, 0),
49     "magenta": (255, 0, 255),
50     "white": (255, 255, 255),
51 }