annotate gamelib/constants.py @ 138:14917385a0fd

Better handling of mission results and turn-end messages.
author Jeremy Thurgood <firxen@gmail.com>
date Thu, 10 May 2012 22:33:26 +0200
parents 7cd716328a44
children 821ecb98e888
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
48
a2980cc9a060 Factor out some constants
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
1 # The usual game constants
a2980cc9a060 Factor out some constants
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
2
a2980cc9a060 Factor out some constants
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
3 WIDTH = 800
a2980cc9a060 Factor out some constants
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
4 HEIGHT = 600
a2980cc9a060 Factor out some constants
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
5 SCREEN = (WIDTH, HEIGHT)
a2980cc9a060 Factor out some constants
Neil Muller <drnlmuller@gmail.com>
parents:
diff changeset
6 FPS = 30
61
a253fae32a6f Add no-sound option (slow shutdown bug workaround)
Neil Muller <drnlmuller@gmail.com>
parents: 48
diff changeset
7
a253fae32a6f Add no-sound option (slow shutdown bug workaround)
Neil Muller <drnlmuller@gmail.com>
parents: 48
diff changeset
8 # Sound related (standard options)
a253fae32a6f Add no-sound option (slow shutdown bug workaround)
Neil Muller <drnlmuller@gmail.com>
parents: 48
diff changeset
9 FREQ = 44100
a253fae32a6f Add no-sound option (slow shutdown bug workaround)
Neil Muller <drnlmuller@gmail.com>
parents: 48
diff changeset
10 BITSIZE = -16 # unsigned 16 bit
a253fae32a6f Add no-sound option (slow shutdown bug workaround)
Neil Muller <drnlmuller@gmail.com>
parents: 48
diff changeset
11 CHANNELS = 2
a253fae32a6f Add no-sound option (slow shutdown bug workaround)
Neil Muller <drnlmuller@gmail.com>
parents: 48
diff changeset
12 BUFFER = 1024
80
a40a76012bd7 Refactor message handling so we can deal with in the gui
Neil Muller <drnlmuller@gmail.com>
parents: 61
diff changeset
13
a40a76012bd7 Refactor message handling so we can deal with in the gui
Neil Muller <drnlmuller@gmail.com>
parents: 61
diff changeset
14 # Result codes for UI hints
138
14917385a0fd Better handling of mission results and turn-end messages.
Jeremy Thurgood <firxen@gmail.com>
parents: 123
diff changeset
15 (MAJOR_SETBACK, FAILURE, SUCCESS, MAJOR_SUCCESS, GAME_WIN, INFO) = range(6)
96
50f8476aa929 Some milestones.
Jeremy Thurgood <firxen@gmail.com>
parents: 80
diff changeset
16
50f8476aa929 Some milestones.
Jeremy Thurgood <firxen@gmail.com>
parents: 80
diff changeset
17 # Planning to take over the:
50f8476aa929 Some milestones.
Jeremy Thurgood <firxen@gmail.com>
parents: 80
diff changeset
18 MILESTONES = ("basement", "neighbourhood", "city", "world")
50f8476aa929 Some milestones.
Jeremy Thurgood <firxen@gmail.com>
parents: 80
diff changeset
19 M_VALS = dict((name, i) for i, name in enumerate(MILESTONES))