From 0494fb7b8fe36f01e605fd6b4002b8967862f5e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexis=20Laferri=C3=A8re?= Date: Fri, 15 Aug 2014 20:17:08 -0400 Subject: [PATCH] client: minor code clean up MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Alexis Laferrière --- src/client/controls.py | 2 -- src/client/displays/__init__.py | 1 - src/client/displays/sdl.py | 1 - 3 files changed, 4 deletions(-) diff --git a/src/client/controls.py b/src/client/controls.py index 72f5067..4a753bf 100644 --- a/src/client/controls.py +++ b/src/client/controls.py @@ -124,10 +124,8 @@ def draw( self, display, skipFinalize=False ): if not self.lastResolution: self.lastResolution = display.resolution elif self.lastResolution != display.resolution: - # print "moving controls" diffWidth = display.resolution[0]-self.lastResolution[0] diffHeight = display.resolution[1]-self.lastResolution[1] - # print diffWidth, diffHeight, self.lastResolution, display.resolution for control in self.controls: if isinstance( control, Control ): if not control.stickLeft: # sticks to the right of the screen diff --git a/src/client/displays/__init__.py b/src/client/displays/__init__.py index e69cc03..4bbd0e7 100644 --- a/src/client/displays/__init__.py +++ b/src/client/displays/__init__.py @@ -93,7 +93,6 @@ def drawBackground( self, img, (ix, iy) ): for y in range( bgy - self.getHeight( self.background ), bgy+self.resolution[ 1 ], self.getHeight( self.background ) ): self._draw( self.background, (x,y) ) - def getWidth(self, img): raise Exception( "Abstract function, should not be used" ) diff --git a/src/client/displays/sdl.py b/src/client/displays/sdl.py index 21dd32f..376aee4 100644 --- a/src/client/displays/sdl.py +++ b/src/client/displays/sdl.py @@ -368,4 +368,3 @@ def drawRepeated( self, img, pos, repeatx=1, repeaty=1 ): for y in xrange( 0, repeaty ): yp = pos[1]+self.getHeight(img)*y self.screen.blit( img, (xp,yp) ) -