diff pytouhou/game/sprite.py @ 26:f17122405121

Basic sprite animation support
author Thibaut Girka <thib@sitedethib.com>
date Fri, 12 Aug 2011 19:38:27 +0200
parents bf225780973f
children b65d6bc55793
line wrap: on
line diff
--- a/pytouhou/game/sprite.py
+++ b/pytouhou/game/sprite.py
@@ -96,6 +96,9 @@ class Sprite(object):
             if 2 in properties:
                 self.rescale = unpack('<ff', properties[2])
                 del properties[2]
+            if 5 in properties:
+                self.frame, = unpack('<I', properties[5])
+                del properties[5]
             if 7 in properties:
                 self.mirrored = True #TODO
                 del properties[7]