changeset 4:83e5d8fb2773

remove animation.py
author Radomir Dopieralski <sheep-devel@sheep.art.pl>
date Fri, 26 Oct 2012 16:54:26 +0200
parents 7ea03c5f16bd
children d05bcb43302d
files animation.py
diffstat 1 files changed, 0 insertions(+), 36 deletions(-) [+]
line wrap: on
line diff
--- a/animation.py	Fri Oct 26 16:53:55 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-#!/usr/bin/env python
-
-import pygame
-
-
-def load_tiles(filename, width=48, height=48):
-    #f = StringIO.StringIO(pkgutil.get_data('mhrok', filename))
-    f = open(filename)
-    image = pygame.image.load(f, filename).convert()
-    image_width, image_height = image.get_size()
-    tiles = []
-    for y in range(image_height/height):
-        tileset = []
-        tiles.append(tileset)
-        for x in range(image_width/width):
-            rect = (x * width, y * height, width, height)
-            tileset.append(image.subsurface(rect))
-    return tiles
-
-
-
-pygame.display.init()
-screen = pygame.display.set_mode((320, 200))
-frames = load_tiles('whitey-scissors-stab.png')
-clock = pygame.time.Clock()
-
-while True:
-    for x, frameset in enumerate(frames):
-        screen.fill((0x66, 0x66, 0x66))
-        for y, frame in enumerate(frameset):
-            screen.blit(frame, (0, y * 48))
-        pygame.display.flip()
-        clock.tick(6)
-    for event in pygame.event.get():
-        if event.type == pygame.QUIT:
-            raise SystemExit()