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
(parent:
2106c86
)
Client: Fix win_map() confusion when map smaller than window.
author
Christian Heller
<c.heller@plomlompom.de>
Wed, 16 Dec 2015 01:49:40 +0000
(
02:49
+0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Wed, 16 Dec 2015 01:49:40 +0000
(
02:49
+0100)
roguelike-client
patch
|
blob
|
history
diff --git
a/roguelike-client
b/roguelike-client
index 040a2d24f3f8e3d09cebeb3a10055d52088d637b..bc8b2f524da56bfcaae70948e11065775be458ec 100755
(executable)
--- a/
roguelike-client
+++ b/
roguelike-client
@@
-338,7
+338,8
@@
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["map_center"][i] * (i + 1) > win_size[i] / 2:
+ if world_data["map_center"][i] * (i + 1) > win_size[i] / 2 and \
+ win_size[i] < world_data["map_size"] * (i + 1):
if world_data["map_center"][i] * (i + 1) \
< world_data["map_size"] * (i + 1) - win_size[i] / 2:
offset[i] = world_data["map_center"][i] * (i + 1) \