From 1b121484bab5913cf0640d58ea82cc8b7d87eeab Mon Sep 17 00:00:00 2001 From: Alan Aguiar Date: Tue, 30 Apr 2013 08:22:04 +0000 Subject: complete the borders of the globe --- (limited to 'src') diff --git a/src/api/Globe.py b/src/api/Globe.py index 6f8effa..b06002a 100644 --- a/src/api/Globe.py +++ b/src/api/Globe.py @@ -31,7 +31,8 @@ class Globe(CSprite): up = Image.loadImage(path + 'borde-sin-sombra.png') down = Image.loadImage(path + 'borde-con-sombra.png') center = Image.loadImage(path + 'fondo.png') - + left = pygame.transform.rotate(up, 90) + right = pygame.transform.rotate(down, 90) horizontal = (h - 68) / 34 vertical = (v - 68) / 34 @@ -47,14 +48,26 @@ class Globe(CSprite): for j in range(vertical): x = i * 34 y = j * 34 - if (i == 0) and (j == 0): - self.image.blit(up_left, (x, y)) - elif (i == 0) and (j==(vertical - 1)): - self.image.blit(down_left, (x, y)) - elif (i == (horizontal - 1)) and (j == 0): - self.image.blit(up_right, (x, y)) - elif (i == (horizontal - 1)) and (j == (vertical - 1)): - self.image.blit(down_right, (x, y)) + if (i == 0): + if (j == 0): + self.image.blit(up_left, (x, y)) + elif (j==(vertical - 1)): + self.image.blit(down_left, (x, y)) + else: + self.image.blit(left, (x, y)) + elif (i == (horizontal - 1)): + if (j == 0): + self.image.blit(up_right, (x, y)) + elif (j == (vertical - 1)): + self.image.blit(down_right, (x, y)) + else: + self.image.blit(right, (x, y)) + elif (j == 0): + if not(i == 0) and not(i == (horizontal-1)): + self.image.blit(up, (x, y)) + elif (j == (vertical -1)): + if not(i == 0) and not(i == (horizontal-1)): + self.image.blit(down, (x, y)) else: self.image.blit(center, (x, y)) -- cgit v0.9.1