1 # This file is part of PlomRogue. PlomRogue is licensed under the GPL version 3
2 # or any later version. For details on its copyright, license, and warranties,
3 # see the file NOTICE in the root directory of the PlomRogue source package.
10 if world_data["map_center"][i] * (i + 1) > win_size[i] / 2 and \
11 win_size[i] < world_data["map_size"] * (i + 1):
12 if world_data["map_center"][i] * (i + 1) \
13 < world_data["map_size"] * (i + 1) - win_size[i] / 2:
14 offset[i] = world_data["map_center"][i] * (i + 1) \
15 - int(win_size[i] / 2)
17 offset[1] = offset[1] + world_data["map_center"][0] % 2
19 offset[i] = world_data["map_size"] * (i + 1) - win_size[i] + i
20 winmap_size = [world_data["map_size"], world_data["map_size"] * 2 + 1]
22 curses.init_pair(1, curses.COLOR_WHITE, curses.COLOR_BLACK)
23 curses.init_pair(2, curses.COLOR_BLUE, curses.COLOR_BLACK)
24 curses.init_pair(3, curses.COLOR_RED, curses.COLOR_BLACK)
25 curses.init_pair(4, curses.COLOR_YELLOW, curses.COLOR_BLACK)
26 col_unknown = curses.color_pair(1)
27 col_mem_obstacle = curses.color_pair(2)
28 col_mem = curses.color_pair(2)
29 col_ground = curses.color_pair(3)
30 col_stone = curses.color_pair(4)
31 col_earth = curses.color_pair(3)
32 col_player = curses.color_pair(1)
33 for y in range(world_data["map_size"]):
34 for x in range(world_data["map_size"]):
35 pos = y * world_data["map_size"] + x
36 char = world_data["fov_map"][pos]
37 if world_data["look_mode"] and y == world_data["map_center"][0] \
38 and x == world_data["map_center"][1]:
40 char = world_data["mem_map"][pos]
41 winmap += [(char, curses.A_REVERSE), ("?", curses.A_REVERSE)]
44 char = world_data["mem_map"][pos]
47 attribute = col_unknown
48 elif char == "X" or char == "#":
49 attribute = col_mem_obstacle
50 bonus = (" ", attribute)
51 winmap += [(char, attribute), bonus]
55 attribute = col_ground
59 attribute = col_player
60 bonus = (" ", attribute)
61 winmap += [(char, attribute), bonus]
64 return offset, winmap_size, winmap
66 from client.config.windows import windows_config
67 from client.windows import win_log, win_inventory, win_look, win_info
69 {"config": [1, 33], "func": win_info, "title": "Stats"},
70 {"config": [-7, 33], "func": win_log, "title": "Log"},
71 {"config": [4, 16], "func": win_inventory, "title": "Inventory"},
72 {"config": [4, 16], "func": win_look, "title": "Things here"},
73 {"config": [0, -34], "func": win_map, "title": "The Crawling Eater"}
75 from client.window_management import set_windows