Add tiles to the board. Skip draw for other game scene widgets for now
[naja.git] / naja / constants.py
1 from naja.attrdict import AttrDict
2
3
4 SCREEN = (800, 600)
5 FPS = 40
6 FONT = 'DejaVuSans.ttf'
7 FONT_SIZE = 16
8
9 DEFAULTS = dict(
10     debug=False,
11     sound=True,
12     music=True,
13 )
14
15 # Sound constants
16 FREQ = 44100   # same as audio CD
17 BITSIZE = -16  # unsigned 16 bit
18 CHANNELS = 2   # 1 == mono, 2 == stereo
19 BUFFER = 1024  # audio buffer size in no. of samples
20 DEFAULT_SOUND_VOLUME = 1.0  # sound volume
21 DEFAULT_MUSIC_VOLUME = 0.3  # music volume
22
23 # Player bits
24 BITS = AttrDict({
25     # Direction bits
26     'NORTH': 0,
27     'SOUTH': 1,
28     'EAST': 2,
29     'WEST': 3,
30     # Condition bits
31     'CYAN': 4,
32     'MAGENTA': 5,
33     'YELLOW': 6,
34     'MSB': 7,
35 })
36 DIRECTION_BITS = AttrDict((k, v) for k, v in BITS.items() if v < 4)
37 CONDITION_BITS = AttrDict((k, v) for k, v in BITS.items() if v >= 4)
38
39 # Game size constants
40 TILE_SIZE = (96, 96)
41 BOARD_SIZE = (5 * TILE_SIZE[0], 5 * TILE_SIZE[1])
42 BIT_SIZE = (5 * TILE_SIZE[0], (SCREEN[1] - 5 * TILE_SIZE[1]) // 2)
43 INFO_SIZE = (SCREEN[0] - 5 * TILE_SIZE[0], SCREEN[1])