Skip to content

Commit

Permalink
Readding overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
frgorp committed Apr 1, 2013
1 parent fc6a84d commit 4aef651
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
15 changes: 7 additions & 8 deletions risk/graphics/assets/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion risk/graphics/graphics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4aef651

Please sign in to comment.