Mercurial > nagslang
diff nagslang/utils.py @ 362:d0aeb893967d
Transparent moonlight
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Fri, 06 Sep 2013 20:12:07 +0200 |
parents | f0e8970ab804 |
children | ca89d566f9ef |
line wrap: on
line diff
--- a/nagslang/utils.py Fri Sep 06 20:10:46 2013 +0200 +++ b/nagslang/utils.py Fri Sep 06 20:12:07 2013 +0200 @@ -28,10 +28,10 @@ return vec -def tile_surface(size, tile_image): +def tile_surface(size, tile_image, alpha=255): # create a surface, approriately tiled surface = pygame.surface.Surface(size, pgl.SRCALPHA) - surface.fill(pygame.color.THECOLORS['black']) + surface.fill(pygame.color.Color(0, 0, 0, alpha)) x_step = tile_image.get_rect().width y_step = tile_image.get_rect().height x_count = size[0] // x_step + 1