comparison tools/area_editor.py @ 489:31d721121966

Fix level editor.
author Jeremy Thurgood <firxen@gmail.com>
date Sat, 07 Sep 2013 17:43:33 +0200
parents 04908862a0b2
children da337a7cfe18
comparison
equal deleted inserted replaced
488:ae8eb7c0f7bb 489:31d721121966
83 def load(self, space): 83 def load(self, space):
84 super(EditorLevel, self).load(space) 84 super(EditorLevel, self).load(space)
85 # Needed to fill in the lookup dict 85 # Needed to fill in the lookup dict
86 self.reset_objs() 86 self.reset_objs()
87 87
88 def point_to_pygame(self, pos):
89 # inverse of point_to_pymunk
90 # (this is also the same as point_to_pymunk, but an additional
91 # function for sanity later in pyweek).
92 return (pos[0], self.y - pos[1])
93
88 def point_to_pymunk(self, pos): 94 def point_to_pymunk(self, pos):
89 # inverse of point_to_pygame 95 # inverse of point_to_pygame
90 # (this is also the same as point_to_pygame, but a additional 96 # (this is also the same as point_to_pygame, but an additional
91 # function for sanity later in pyweek). 97 # function for sanity later in pyweek).
92 return (pos[0], self.y - pos[1]) 98 return (pos[0], self.y - pos[1])
93 99
94 def add_point(self, poly_index, pos): 100 def add_point(self, poly_index, pos):
95 self.polygons.setdefault(poly_index, []) 101 self.polygons.setdefault(poly_index, [])