Mercurial > touhou
comparison pytouhou/game/background.py @ 72:6a08f44fa01b
Handle a few more ANM instructions. pytouhou.game.background needs some serious refactoring.
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Sun, 28 Aug 2011 01:23:11 +0200 |
parents | a142e57218a0 |
children | 630e9045e851 |
comparison
equal
deleted
inserted
replaced
71:a03d7a94b997 | 72:6a08f44fa01b |
---|---|
95 vertices = struct.pack(vertices_format, *chain(*vertices)) | 95 vertices = struct.pack(vertices_format, *chain(*vertices)) |
96 uvs = struct.pack(uvs_format, *chain(*uvs)) | 96 uvs = struct.pack(uvs_format, *chain(*uvs)) |
97 colors = struct.pack(colors_format, *chain(*colors)) | 97 colors = struct.pack(colors_format, *chain(*colors)) |
98 assert len(self.anm_wrapper.anm_files) == 1 #TODO | 98 assert len(self.anm_wrapper.anm_files) == 1 #TODO |
99 anm = self.anm_wrapper.anm_files[0] | 99 anm = self.anm_wrapper.anm_files[0] |
100 self.objects_by_texture = {(anm.first_name, anm.secondary_name): (nb_vertices, vertices, uvs, colors)} | 100 self.objects_by_texture = {((anm.first_name, anm.secondary_name), 0): (nb_vertices, vertices, uvs, colors)} #TODO: blendfunc |
101 | 101 |
102 for frame_num, message_type, args in self.stage.script: | 102 for frame_num, message_type, args in self.stage.script: |
103 if frame_num == frame: | 103 if frame_num == frame: |
104 if message_type == 0: | 104 if message_type == 0: |
105 self.position_interpolator.set_interpolation_start(frame_num, args) | 105 self.position_interpolator.set_interpolation_start(frame_num, args) |