X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/edit?a=blobdiff_plain;ds=sidebyside;f=client_prototype.py;h=02f63b9846832f541014e1c383479c02aa37ee56;hb=9c346f2749d1e9f63be1421d7d1fe51162bc64e3;hp=582df073688bd4a9a7f43314a30ae820cc51768a;hpb=177f9281c875a37b62793771e5b38564faac0e89;p=plomrogue
diff --git a/client_prototype.py b/client_prototype.py
index 582df07..02f63b9 100644
--- a/client_prototype.py
+++ b/client_prototype.py
@@ -86,7 +86,7 @@ def set_window_geometries():
def draw_screen():
def healthy_addch(y, x, char, attr=0):
- """Bizarre workaround for ."""
+ """Workaround for ."""
if y == screen_size[0] - 1 and x == screen_size[1] - 1:
char_before = stdscr.inch(y, x - 1)
stdscr.addch(y, x - 1, char, attr)
@@ -298,7 +298,16 @@ def win_foo():
def win_map():
+ win_size = next(win["size"] for win in windows if win["func"] == win_map)
offset = [0, 0]
+ for i in range(2):
+ if world_data["position"][i] * (i + 1) > win_size[i] / 2:
+ if world_data["position"][i] * (i + 1) \
+ < world_data["map_size"] * (i + 1) - win_size[i] / 2:
+ offset[i] = world_data["position"][i] * (i + 1) \
+ - int(win_size[i] / 2)
+ else:
+ 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 = []
for y in range(world_data["map_size"]):