diff options
author | Alan Aguiar <alanjas@hotmail.com> | 2013-04-30 08:22:04 (GMT) |
---|---|---|
committer | Alan Aguiar <alanjas@hotmail.com> | 2013-04-30 08:22:04 (GMT) |
commit | 1b121484bab5913cf0640d58ea82cc8b7d87eeab (patch) | |
tree | 2a03b30871bbf652285c77d38073d4e099315dee /src/api | |
parent | 044cd047007c17c9efcd71d3c169df414014abbb (diff) |
complete the borders of the globe
Diffstat (limited to 'src/api')
-rw-r--r-- | src/api/Globe.py | 31 |
1 files changed, 22 insertions, 9 deletions
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)) |