Mercurial > touhou
comparison pytouhou/game/player.py @ 236:741860192b56
Implement ANM0 interrupts
“Instruction” 22 is used as a label for interrupts.
If the normal animation is interrupted, it goes straight to the matched
instruction. Interrupt -1 matches all interrupts.
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Sun, 01 Jan 2012 19:47:34 +0100 |
parents | e59bd7979ddc |
children | 77b83064b57e |
comparison
equal
deleted
inserted
replaced
235:e59bd7979ddc | 236:741860192b56 |
---|---|
128 | 128 |
129 #TODO: find a better way to do that. | 129 #TODO: find a better way to do that. |
130 bullet_type = BulletType(self.anm_wrapper, shot.sprite % 256, | 130 bullet_type = BulletType(self.anm_wrapper, shot.sprite % 256, |
131 shot.sprite % 256 + 32, #TODO: find the real cancel anim | 131 shot.sprite % 256 + 32, #TODO: find the real cancel anim |
132 0, 0, 0, 0.) | 132 0, 0, 0, 0.) |
133 #TODO: Type 1 (homing bullets) and type 3 (laser) | |
133 if shot.type == 2: | 134 if shot.type == 2: |
134 #TODO: triple-check acceleration! | 135 #TODO: triple-check acceleration! |
135 bullets.append(Bullet((x, y), bullet_type, 0, | 136 bullets.append(Bullet((x, y), bullet_type, 0, |
136 shot.angle, shot.speed, | 137 shot.angle, shot.speed, |
137 (-1, 0, 0, 0, 0.15, -pi/2., 0., 0.), | 138 (-1, 0, 0, 0, 0.15, -pi/2., 0., 0.), |
138 16, self, self._game, player_bullet=True, | 139 16, self, self._game, player_bullet=True, |
139 damage=shot.damage, hitbox=shot.hitbox)) | 140 damage=shot.damage, hitbox=shot.hitbox)) |
140 #TODO: types 1 and 4 | |
141 else: | 141 else: |
142 bullets.append(Bullet((x, y), bullet_type, 0, | 142 bullets.append(Bullet((x, y), bullet_type, 0, |
143 shot.angle, shot.speed, | 143 shot.angle, shot.speed, |
144 (0, 0, 0, 0, 0., 0., 0., 0.), | 144 (0, 0, 0, 0, 0., 0., 0., 0.), |
145 0, self, self._game, player_bullet=True, | 145 0, self, self._game, player_bullet=True, |