home
·
contact
·
privacy
projects
/
plomrogue
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
9c346f2
)
New client: Add colors to map window.
author
Christian Heller
<c.heller@plomlompom.de>
Sun, 29 Nov 2015 22:15:18 +0000
(23:15 +0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Sun, 29 Nov 2015 22:15:18 +0000
(23:15 +0100)
client_prototype.py
patch
|
blob
|
history
diff --git
a/client_prototype.py
b/client_prototype.py
index 02f63b9846832f541014e1c383479c02aa37ee56..a398822241b635c656170b6d91c11504667fd3a8 100644
(file)
--- a/
client_prototype.py
+++ b/
client_prototype.py
@@
-310,12
+310,15
@@
def win_map():
offset[i] = world_data["map_size"] * (i + 1) - win_size[i] + i
winmap_size = [world_data["map_size"], world_data["map_size"] * 2 + 1]
winmap = []
offset[i] = world_data["map_size"] * (i + 1) - win_size[i] + i
winmap_size = [world_data["map_size"], world_data["map_size"] * 2 + 1]
winmap = []
+ curses.init_pair(1, curses.COLOR_WHITE, curses.COLOR_BLUE)
+ curses.init_pair(2, curses.COLOR_BLUE, curses.COLOR_BLACK)
for y in range(world_data["map_size"]):
for x in range(world_data["map_size"]):
char = world_data["fov_map"][y * world_data["map_size"] + x]
if char == " ":
char = world_data["mem_map"][y * world_data["map_size"] + x]
for y in range(world_data["map_size"]):
for x in range(world_data["map_size"]):
char = world_data["fov_map"][y * world_data["map_size"] + x]
if char == " ":
char = world_data["mem_map"][y * world_data["map_size"] + x]
- attribute = curses.A_REVERSE
+ attribute = curses.color_pair(1) if char == " " \
+ else curses.color_pair(2)
winmap += [(char, attribute), (" ", attribute)]
else:
winmap += char + " "
winmap += [(char, attribute), (" ", attribute)]
else:
winmap += char + " "