-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconstants.py
51 lines (41 loc) · 1.06 KB
/
constants.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
HOST = 'nethack.alt.org'
viewportWidth, viewportHeight = (1920, 1080)
ttyW, ttyH = 150, 40
BLACK = (0, 0, 0)
RED = (255, 0, 0)
GREEN = (0, 255, 0)
YELLOW = (255, 255, 0)
BLUE = (0, 0, 255)
MAGENTA = (255, 0, 255)
CYAN = (0, 255, 255)
WHITE = (255, 255, 255)
defaultBG = BLACK
defaultFG = WHITE
tileW, tileH = 15, 25 # tile size in sheet
# tileW, tileH = 32, 32 # tile size in sheet
# tileW, tileH = 22, 32 # tile size in sheet
W, H = tileW, tileH # tile size
TILESET = 'geoduck25x15.bmp'
# TILESET = 'nevanda32x32.png'
# TILESET = 'absurd22x32.png'
FONT = 'fonts/DejaVuSansMono.ttf'
# FONTB = 'fonts/DejaVuSansMono-Bold.ttf'
FONTB = 'fonts/DejaVuSansMono.ttf'
ENABLE_SCALING = False
defaultATTR = {
'weight': 'normal',
'underlined': False,
'blinking': False,
'fgcolour': defaultFG,
'bgcolour': defaultBG,
}
import re
end_sequences = (
re.escape('--More--'),
re.escape('(end)'),
re.escape('Watch which game?'),
re.escape(' => '),
r'\(\d of \d\)',
)
regex = '({})'.format('|'.join(end_sequences))
end_sequence_re = re.compile(regex)