# HG changeset patch # User Thibaut Girka # Date 1313170707 -7200 # Node ID f1712240512168c4b1d51bf57410c60e963761b8 # Parent cc864aadc73389edd7c2f6ffb4d370c98a80eb26 Basic sprite animation support diff --git a/pytouhou/game/background.py b/pytouhou/game/background.py --- a/pytouhou/game/background.py +++ b/pytouhou/game/background.py @@ -15,6 +15,10 @@ class Background(object): self.object_instances = [] self.objects_by_texture = {} + self.position_interpolator = Interpolator((0, 0, 0)) + self.fog_interpolator = Interpolator((0, 0, 0, 0, 0)) + self.position2_interpolator = Interpolator((0, 0, 0)) + self.build_objects() self.build_object_instances() @@ -69,10 +73,6 @@ class Background(object): anm = self.anm_wrapper.anm_files[0] self.objects_by_texture = {(anm.first_name, anm.secondary_name): (nb_vertices, vertices, uvs)} - self.position_interpolator = Interpolator((0, 0, 0)) - self.fog_interpolator = Interpolator((0, 0, 0, 0, 0)) - self.position2_interpolator = Interpolator((0, 0, 0)) - for frame_num, message_type, args in self.stage.script: if frame_num == frame: if message_type == 0: diff --git a/pytouhou/game/sprite.py b/pytouhou/game/sprite.py --- a/pytouhou/game/sprite.py +++ b/pytouhou/game/sprite.py @@ -96,6 +96,9 @@ class Sprite(object): if 2 in properties: self.rescale = unpack('