Mercurial > traipse_dev
diff orpg/mapper/grid.py @ 71:449a8900f9ac ornery-dev
Code refining almost completed, for this round. Some included files are still in need of some clean up, but this is test worthy.
author | sirebral |
---|---|
date | Thu, 20 Aug 2009 03:00:39 -0500 |
parents | 072ffc1d466f |
children | 54446a995007 6081bdc2b8d5 |
line wrap: on
line diff
--- a/orpg/mapper/grid.py Tue Aug 18 20:48:36 2009 -0500 +++ b/orpg/mapper/grid.py Thu Aug 20 03:00:39 2009 -0500 @@ -107,7 +107,7 @@ else: x = topLeft.x y = topLeft.y - return cmpPoint(int(x),int(y)) # Set the pos attribute + return cmpPoint(int(x),int(y)) # Set the pos attribute else: return cmpPoint(int(pos.x),int(pos.y)) def set_rect_mode(self): @@ -209,7 +209,6 @@ # and therefore (per transformation above) is at iso co-ord (iso_unit_size, 0) # the bottom corner of the first diamond is grid co-ord (width/2, height) # and therefore (per transformation above) is at iso co-ord (0, iso_unit_size) - # the calculation is now as simple as the rectangle case, but using iso co-ords return cmpPoint(floor(iso_x/iso_unit_size), floor(iso_y/iso_unit_size)) else: return None