Mercurial > traipse
diff orpg/mapper/region.py @ 18:97265586402b ornery-orc
Traipse 'OpenRPG' {090827-00}
Traipse is a distribution of OpenRPG that is designed to be easy to setup and go. Traipse also makes it easy for developers to work on code without fear of sacrifice. 'Ornery-Orc' continues the trend of 'Grumpy' and adds fixes to the code. 'Ornery-Orc''s main goal is to offer more advanced features and enhance the productivity of the user.
Update Summary:
Update Manager is now in version 0.8. While not every button works, users can now browse the different revisions and their different changesets. The code has been refined some with feature from Core added to it. A Crash report is now created if the users software crashes. Update Manager has been moved to the Traipse Suite menu item, and a Debug Console as been added as well.
author | sirebral |
---|---|
date | Thu, 27 Aug 2009 01:04:43 -0500 |
parents | 211ac836b6a0 |
children | ff154cf3350c |
line wrap: on
line diff
--- a/orpg/mapper/region.py Thu Aug 13 13:14:10 2009 -0500 +++ b/orpg/mapper/region.py Thu Aug 27 01:04:43 2009 -0500 @@ -156,10 +156,14 @@ return IRect().make(self.left+pt.X,self.top+pt.Y,self.right+pt.X,self.bottom+pt.Y) def intersect(self,rect): - return IRect().make(max(self.left,rect.left),max(self.top,rect.top),min(self.right,rect.right),min(self.bottom,rect.bottom)) + return IRect().make(max(self.left,rect.left), + max(self.top,rect.top),min(self.right,rect.right), + min(self.bottom,rect.bottom)) def union(self,rect): - return IRect().make(min(self.left,rect.left),min(self.top,rect.top),max(self.right,rect.right),max(self.bottom,rect.bottom)) + return IRect().make(min(self.left,rect.left), + min(self.top,rect.top),max(self.right,rect.right), + max(self.bottom,rect.bottom)) def equals(self,rect): if (self.top==rect.top and self.bottom==rect.bottom and self.left==rect.left and self.right==rect.right): return 1 @@ -206,7 +210,7 @@ x+="]" return x -#remove all rectangles from list + #remove all rectangles from list def Clear(self): while(self.first): rect=self.first @@ -215,7 +219,7 @@ self.last=None self.count=0 -#add a new clipping rectangle to list + #add a new clipping rectangle to list def AddRect(self,rect): rect.prev=None rect.next=self.first @@ -224,7 +228,7 @@ if self.last is None: self.last=rect self.count += 1 -#removes the passed clipping rectangle from the list + #removes the passed clipping rectangle from the list def RemoveRect(self,rect): if not (rect.prev is None): rect.prev.next=rect.next else: self.first=rect.next @@ -232,8 +236,8 @@ else: self.last=rect.prev self.count -= 1 -# find the clipping rectangle at the the beginning of the list, remove it, -# and return it + # find the clipping rectangle at the the beginning of the list, remove it, + # and return it def RemoveHead(self): if self.count==0: return None rect=self.first @@ -242,8 +246,8 @@ self.count -= 1 return rect -# stealrects -- appends the list of clipping rectangles in pclist to the current -# list. removes the entries from pclist + # stealrects -- appends the list of clipping rectangles in pclist to the current + # list. removes the entries from pclist def StealRects(self,pclist): if pclist.first is None: return if self.first is None: @@ -258,7 +262,7 @@ pclist.last = None pclist.count = 0 -# utilitarian procedure to return all clipping rectangles as a Python list + # utilitarian procedure to return all clipping rectangles as a Python list def GetList(self): result=[] f = self.first