Mercurial > nagslang
comparison nagslang/level.py @ 98:93256a0987a2
Fix newer pep8 continuation complaint
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Mon, 02 Sep 2013 11:50:04 +0200 |
parents | ecba9550ad8d |
children | c02a99502a90 |
comparison
equal
deleted
inserted
replaced
97:c177cdc41477 | 98:93256a0987a2 |
---|---|
133 for index, polygon in self.polygons.items(): | 133 for index, polygon in self.polygons.items(): |
134 if len(polygon) > 1: | 134 if len(polygon) > 1: |
135 pointlist = [self.point_to_pygame(p) for p in polygon] | 135 pointlist = [self.point_to_pygame(p) for p in polygon] |
136 # filled polygons | 136 # filled polygons |
137 pygame.draw.polygon(surface, pygame.color.THECOLORS['white'], | 137 pygame.draw.polygon(surface, pygame.color.THECOLORS['white'], |
138 pointlist, 0) | 138 pointlist, 0) |
139 self._surface.blit(surface, (0, 0), special_flags=pgl.BLEND_RGBA_MULT) | 139 self._surface.blit(surface, (0, 0), special_flags=pgl.BLEND_RGBA_MULT) |
140 self._exterior = True | 140 self._exterior = True |
141 | 141 |
142 def _draw_background(self, force=False): | 142 def _draw_background(self, force=False): |
143 if self._tile_image is None: | 143 if self._tile_image is None: |
152 x_count = self.x // x_step + 1 | 152 x_count = self.x // x_step + 1 |
153 y_count = self.y / y_step + 1 | 153 y_count = self.y / y_step + 1 |
154 for x in range(x_count): | 154 for x in range(x_count): |
155 for y in range(y_count): | 155 for y in range(y_count): |
156 tile_rect = pygame.rect.Rect(x * x_step, y * y_step, | 156 tile_rect = pygame.rect.Rect(x * x_step, y * y_step, |
157 x_step, y_step) | 157 x_step, y_step) |
158 self._surface.blit(self._tile_image, tile_rect) | 158 self._surface.blit(self._tile_image, tile_rect) |
159 return self._surface | 159 return self._surface |