-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglobals.py
76 lines (62 loc) · 1.76 KB
/
globals.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
from enum import Enum, auto
import tcod as libtcod
class GameStates(Enum):
PLAYERS_TURN = 1
ENEMY_TURN = 2
PLAYER_DEAD = 3
INVENTORY = 4
DROP_INVENTORY = 5
TARGETING = 6
LEVEL_UP = 7
CHARACTER_SCREEN = 8
SHOP = 9
INSTRUCTIONS = 10
class RenderOrder(Enum):
CORPSE = auto()
STAIRS = auto()
ITEM = auto()
ACTOR = auto()
class EquipmentSlots(Enum):
MAIN_HAND = auto()
OFF_HAND = auto()
CONFIG = {
"WIDTH" : 80,
"HEIGHT" : 55,
"MAP_WIDTH" : 80,
"MAP_HEIGHT" : 39,
"MAP_Y" : 4,
"TITLE" : "Dragons and Dungeons",
# UI - Upper Bar
"UPPER_BAR_HEIGHT" : 4,
# UI - HP Bar
"BAR_WIDTH" : 20,
"PANEL_HEIGHT" : 7,
"PANEL_Y" : 48, # height - panel_height
# UI - ACTION BAR
"ACTION_Y" : 43,
"ACTION_HEIGHT" : 5,
# UI - Message Log
# TODO: Find a way to compute these other than using hardcoded constants
"MESSAGE_X" : 22, # bar width +2
"MESSAGE_WIDTH" : 58, # width - bar_width - 2
"MESSAGE_HEIGHT" : 6, # panel_height - 1
# Procedural Generation
"ROOM_MAX_SIZE" : 10,
"ROOM_MIN_SIZE" : 6,
"MAX_ROOMS" : 30,
"MAX_MONSTERS" : 3,
"MAX_ITEMS" : 2,
# Render
"FONT_PATH" : "dejavu16x16_gs_tc.png",
# Field of View
"FOV_ALGORITHM" : 1,
"FOV_LIGHT_WALLS" : True,
"FOV_RADIUS" : 10,
"COLORS": {
'dark_wall': libtcod.Color(18, 18, 20),
'dark_ground': libtcod.Color(50, 50, 50),
'light_wall': libtcod.Color(130, 130, 130),
'light_ground': libtcod.Color(200, 200, 200),
'black': libtcod.Color(0, 0, 0)
}
}