# HG changeset patch # User Thibaut Girka # Date 1313177908 -7200 # Node ID b65d6bc557939d260cb29150ef86ed40d9cb6755 # Parent f1712240512168c4b1d51bf57410c60e963761b8 Add rotating sprite support diff --git a/pytouhou/game/sprite.py b/pytouhou/game/sprite.py --- a/pytouhou/game/sprite.py +++ b/pytouhou/game/sprite.py @@ -22,6 +22,7 @@ class Sprite(object): self.mirrored = False self.rescale = (1., 1.) self.rotations_3d = (0., 0., 0.) + self.rotations_speed_3d = (0., 0., 0.) self.corner_relative_placement = False self.frame = 0 self._uvs = [] @@ -89,6 +90,8 @@ class Sprite(object): properties[instr_type] = data self.frame += 1 + self.rotations_3d = tuple(x + y for x, y in zip(self.rotations_3d, self.rotations_speed_3d)) + if properties: if 1 in properties: self.texcoords = self.anm.sprites[unpack('