Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Readding overlay

  • Loading branch information...
commit 4aef651b79a5e6a53b6b00cb6e54abe8986a1f7a 1 parent fc6a84d
@elElmo elElmo authored
Showing with 8 additions and 9 deletions.
  1. +7 −8 risk/graphics/assets/image.py
  2. +1 −1  risk/graphics/graphics.py
View
15 risk/graphics/assets/image.py
@@ -5,11 +5,10 @@
class ImageAsset(PicassoAsset):
def __init__(self, x, y, path, scale_x=1.0, scale_y=1.0):
- pass
- #self.path = path
- #self.surface = pygame.image.load(path).convert_alpha()
- #if scale_x != 1 or scale_y != 1:
- # self.surface = pygame.transform.scale(self.surface,
- # (int(self.surface.get_width() * scale_x),
- # int(self.surface.get_height() * scale_y)))
- #PicassoAsset.__init__(self, self.surface, x, y)
+ self.path = path
+ self.surface = pygame.image.load(path).convert_alpha()
+ if scale_x != 1 or scale_y != 1:
+ self.surface = pygame.transform.scale(self.surface,
+ (int(self.surface.get_width() * scale_x),
+ int(self.surface.get_height() * scale_y)))
+ PicassoAsset.__init__(self, self.surface, x, y)
View
2  risk/graphics/graphics.py
@@ -154,7 +154,7 @@ def add_overlay(picasso):
datastore = Datastore()
overlay = assets.image.ImageAsset(0, 0, DEFAULT_OVERLAY)
datastore.add_entry('overlay', overlay)
- #picasso.add_asset('0_overlay', overlay)
+ picasso.add_asset('0_overlay', overlay)
def show_human_player(game_master):
layer = 3
Please sign in to comment.
Something went wrong with that request. Please try again.