home
·
contact
·
privacy
projects
/
plomrogue2-experiments
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Minor refactorings / re-namings.
[plomrogue2-experiments]
/
new
/
plomrogue
/
mapping.py
diff --git
a/new/plomrogue/mapping.py
b/new/plomrogue/mapping.py
index bec311b56e5064258ec4a7c3cc85869d0cfa546b..9826e6887eb9571cdd53349f9217184321000cf8 100644
(file)
--- a/
new/plomrogue/mapping.py
+++ b/
new/plomrogue/mapping.py
@@
-90,7
+90,7
@@
class MapGeometry():
pos_x = pos[1].x + (maps_size.x * pos[0].x) - offset.x
return YX(pos_y, pos_x)
pos_x = pos[1].x + (maps_size.x * pos[0].x) - offset.x
return YX(pos_y, pos_x)
- def
absolutiz
e_coordinate(self, map_size, big_yx, little_yx):
+ def
correct_doubl
e_coordinate(self, map_size, big_yx, little_yx):
def adapt_axis(axis):
maps_crossed = little_yx[axis] // map_size[axis]
def adapt_axis(axis):
maps_crossed = little_yx[axis] // map_size[axis]
@@
-105,8
+105,9
@@
class MapGeometry():
def move(self, start_pos, direction, map_size):
mover = getattr(self, 'move_' + direction)
big_yx, little_yx = start_pos
def move(self, start_pos, direction, map_size):
mover = getattr(self, 'move_' + direction)
big_yx, little_yx = start_pos
- unadapted_target = mover(little_yx)
- return self.absolutize_coordinate(map_size, big_yx, unadapted_target)
+ uncorrected_target = mover(little_yx)
+ return self.correct_double_coordinate(map_size, big_yx,
+ uncorrected_target)