Skip to content

Commit

Permalink
Fix (!) parallax issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Grant Mathews committed Aug 21, 2011
1 parent a277075 commit 7c79d2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ def parallax(self, dx, dy):

if self.rect.x > 0: self.rect.x = 0
if self.rect.y > 0: self.rect.y = 0
if self.rect.x < -self.rect.width: self.rect.x = self.rect.width
if self.rect.y < -self.rect.height: self.rect.y = self.rect.height
if self.rect.x < -self.rect.width: self.rect.x = -self.rect.width + ABS_MAP_SIZE
if self.rect.y < -self.rect.height: self.rect.y = -self.rect.height + ABS_MAP_SIZE

class Image:
def __init__(self, src_file, src_x, src_y, dst_x, dst_y):
Expand Down

0 comments on commit 7c79d2e

Please sign in to comment.