Mercurial > touhou
diff pytouhou/ui/sprite.pyx @ 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 | ab6e6909ce04 |
children | 02de1563fa18 |
line wrap: on
line diff
--- a/pytouhou/ui/sprite.pyx +++ b/pytouhou/ui/sprite.pyx @@ -44,6 +44,8 @@ cpdef object get_sprite_rendering_data(o elif sprite.force_rotation: rz += sprite.angle + if sprite.allow_dest_offset: + vertmat.translate(sprite.dest_offset[0], sprite.dest_offset[1], sprite.dest_offset[2]) if (rx, ry, rz) != (0., 0., 0.): if rx: vertmat.rotate_x(-rx) @@ -53,8 +55,6 @@ cpdef object get_sprite_rendering_data(o vertmat.rotate_z(-rz) #TODO: minus, really? if sprite.corner_relative_placement: # Reposition vertmat.translate(width / 2., height / 2., 0.) - if sprite.allow_dest_offset: - vertmat.translate(sprite.dest_offset[0], sprite.dest_offset[1], sprite.dest_offset[2]) x_1 = 1. / sprite.anm.size[0] y_1 = 1. / sprite.anm.size[1]