X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;ds=sidebyside;f=new%2Fplomrogue%2Fmapping.py;h=9826e6887eb9571cdd53349f9217184321000cf8;hb=d918b4815941beb84b34c985b5e99dcc8499d239;hp=bec311b56e5064258ec4a7c3cc85869d0cfa546b;hpb=b7587718cee2308bd2a27462e0996dc279bd3038;p=plomrogue2-experiments diff --git a/new/plomrogue/mapping.py b/new/plomrogue/mapping.py index bec311b..9826e68 100644 --- 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) - def absolutize_coordinate(self, map_size, big_yx, little_yx): + def correct_double_coordinate(self, map_size, big_yx, little_yx): 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 - 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)