diff pytouhou/ui/sprite.pyx @ 240:02de1563fa18

Fix ANM wait, translation/rotation order, and partially implement ANM0 instruction 24
author Thibaut Girka <thib@sitedethib.com>
date Sun, 01 Jan 2012 23:51:01 +0100
parents 741860192b56
children f037bca24f2d
line wrap: on
line diff
--- a/pytouhou/ui/sprite.pyx
+++ b/pytouhou/ui/sprite.pyx
@@ -44,8 +44,6 @@ 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,6 +51,8 @@ cpdef object get_sprite_rendering_data(o
             vertmat.rotate_y(ry)
         if rz:
             vertmat.rotate_z(-rz) #TODO: minus, really?
+    if sprite.allow_dest_offset:
+        vertmat.translate(sprite.dest_offset[0], sprite.dest_offset[1], sprite.dest_offset[2])
     if sprite.corner_relative_placement: # Reposition
         vertmat.translate(width / 2., height / 2., 0.)