source: skaapsteker/constants.py

Last change on this file was 618:72865593bdc7, checked in by Jeremy Thurgood <firxen@…>, 12 years ago

Make DEBUG an environment variable.

File size: 1.6 KB
Line 
1# Useful constants
2# copyright skaapsteker team (see COPYRIGHT file for details)
3
4import pygame
5
6SCREEN = (800, 600)
7FREQ = 44100 # same as audio CD
8BITSIZE = -16 # unsigned 16 bit
9CHANNELS = 2 # 1 == mono, 2 == stereo
10BUFFER = 1024 # audio buffer size in no. of samples
11
12
13EPSILON = 1e-10
14
15# Time parameter for double key taps checked.
16# This is for both key down time and for gap between taps
17DOUBLE_TAP_TIME = 0.15
18
19
20# Layer defination
21class Layers(object):
22 SKAAPSTEKER = -1 # Special layer for snakes
23 BACKGROUND = 0 # Absolute background
24 BEHIND = 1 # Layer behind the player
25 PLAYER = 2 # Layer of the player and enemies
26 IN_FRONT = 3 # Layer in front of the player
27 FOREGROUND = 4 # Absolute foreground
28
29
30class FoxHud(object):
31 TEXT = pygame.Color(255, 255, 255, 196)
32
33 BG_ALPHA = 120
34 BG_MARGIN = 8
35
36 INVENTORY_SIZE = 48
37 INVENTORY_START = 32
38
39 TAIL_START = 100
40 TAIL_OFFSET = 50
41 TAIL_POSITIONS = {
42 'shapeshift' : TAIL_START,
43 'fireball' : TAIL_START + TAIL_OFFSET,
44 'sprint' : TAIL_START + 2 * TAIL_OFFSET,
45 'invisibility' : TAIL_START + 3 * TAIL_OFFSET,
46 'flight' : TAIL_START + 4 * TAIL_OFFSET,
47 'shield' : TAIL_START + 5 * TAIL_OFFSET,
48 'steal' : TAIL_START + 6 * TAIL_OFFSET,
49 'lightning' : TAIL_START + 7 * TAIL_OFFSET,
50 }
51 TAILS_BG_MARGIN = 2
52 TAILS_WIDTH = 42
53 TAILS_HEIGHT = 8 * TAIL_OFFSET
54
55 HEALTH_BACKGROUND = pygame.Color(128, 64, 0, 128)
56 HEALTH_FOREGROUND = pygame.Color(255, 64, 0, 196)
57 HEALTH_HEIGHT = 160
58 HEALTH_WIDTH = 20
59
60 SCROLL_TOP = 220
61 TOFU_TOP = 280
Note: See TracBrowser for help on using the repository browser.