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.
8 curses.init_pair(80, curses.COLOR_YELLOW, curses.COLOR_RED)
9 for i in range(world_data["stomach"]):
10 winmap += [("#", curses.color_pair(80))]
11 winmap_size = [1, len(winmap)]
13 return offset, winmap_size, winmap
20 if world_data["map_center"][i] * (i + 1) > win_size[i] / 2 and \
21 win_size[i] < world_data["map_size"] * (i + 1):
22 if world_data["map_center"][i] * (i + 1) \
23 < world_data["map_size"] * (i + 1) - win_size[i] / 2:
24 offset[i] = world_data["map_center"][i] * (i + 1) \
25 - int(win_size[i] / 2)
27 offset[1] = offset[1] + world_data["map_center"][0] % 2
29 offset[i] = world_data["map_size"] * (i + 1) - win_size[i] + i
30 winmap_size = [world_data["map_size"], world_data["map_size"] * 2 + 1]
32 curses.init_pair(1, curses.COLOR_WHITE, curses.COLOR_BLACK)
33 curses.init_pair(2, curses.COLOR_BLUE, curses.COLOR_BLACK)
34 curses.init_pair(3, curses.COLOR_RED, curses.COLOR_BLACK)
35 curses.init_pair(4, curses.COLOR_YELLOW, curses.COLOR_BLACK)
36 curses.init_pair(5, curses.COLOR_MAGENTA, curses.COLOR_BLACK)
37 curses.init_pair(6, curses.COLOR_BLACK, curses.COLOR_BLUE)
38 col_unknown = curses.color_pair(1)
39 col_mem_obstacle = curses.color_pair(2)
40 col_mem = curses.color_pair(2)
41 col_stone = curses.color_pair(1)
42 col_dirt = curses.color_pair(4)
43 col_earth = curses.color_pair(3)
44 col_player = curses.color_pair(5)
45 col_water = curses.color_pair(6)
46 for y in range(world_data["map_size"]):
47 for x in range(world_data["map_size"]):
48 pos = y * world_data["map_size"] + x
49 char = world_data["fov_map"][pos]
50 if world_data["look_mode"] and y == world_data["map_center"][0] \
51 and x == world_data["map_center"][1]:
53 char = world_data["mem_map"][pos]
54 winmap += [(char, curses.A_REVERSE), ("?", curses.A_REVERSE)]
57 char = world_data["mem_map"][pos]
60 attribute = col_unknown
61 elif char == "X" or char == "#":
62 attribute = col_mem_obstacle
63 bonus = (" ", attribute)
64 winmap += [(char, attribute), bonus]
79 attribute = col_player
80 bonus = (char, attribute)
81 winmap += [(char, attribute), bonus]
84 return offset, winmap_size, winmap
86 from client.config.world_data import world_data
87 world_data["stomach"] = 0
88 from client.config.io import io
89 io["worldstate_read_order"] += [["stomach", "int"]]
90 from client.config.windows import windows_config
91 from client.windows import win_log
93 {"config": [0, -34], "func": win_map, "title": "The Crawling Eater"},
94 {"config": [1, 33], "func": win_stomach, "title": "stomach"},
95 {"config": [-2, 33], "func": win_log, "title": "log"}
97 from client.window_management import set_windows
99 from client.commands import command_sender
100 from client.config.commands import commands
101 commands["D"] = (command_sender("drop"),)