Mercurial > touhou
comparison 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 |
comparison
equal
deleted
inserted
replaced
25:cc864aadc733 | 26:f17122405121 |
---|---|
94 self.texcoords = self.anm.sprites[unpack('<I', properties[1])[0]] | 94 self.texcoords = self.anm.sprites[unpack('<I', properties[1])[0]] |
95 del properties[1] | 95 del properties[1] |
96 if 2 in properties: | 96 if 2 in properties: |
97 self.rescale = unpack('<ff', properties[2]) | 97 self.rescale = unpack('<ff', properties[2]) |
98 del properties[2] | 98 del properties[2] |
99 if 5 in properties: | |
100 self.frame, = unpack('<I', properties[5]) | |
101 del properties[5] | |
99 if 7 in properties: | 102 if 7 in properties: |
100 self.mirrored = True #TODO | 103 self.mirrored = True #TODO |
101 del properties[7] | 104 del properties[7] |
102 if 9 in properties: | 105 if 9 in properties: |
103 self.rotations_3d = unpack('<fff', properties[9]) | 106 self.rotations_3d = unpack('<fff', properties[9]) |