diff pytouhou/game/sprite.pxd @ 525:43ecf0f98f4d

Precalculate the inverse of the texture size at ANM load, to not recalculate at every sprite change.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Wed, 18 Dec 2013 18:15:45 +0100
parents 5bb7d2c0ff46
children 0b2a92a25245
line wrap: on
line diff
--- a/pytouhou/game/sprite.pxd
+++ b/pytouhou/game/sprite.pxd
@@ -1,4 +1,5 @@
 from pytouhou.utils.interpolator cimport Interpolator
+from pytouhou.formats.anm0 cimport ANM
 
 cdef class Sprite:
     cdef public long blendfunc, frame
@@ -12,7 +13,8 @@ cdef class Sprite:
     cdef public tuple texcoords, dest_offset, texoffsets, rescale, scale_speed
     cdef public tuple rotations_3d, rotations_speed_3d, color
     cdef public unsigned char alpha
-    cdef public object anm, _rendering_data
+    cdef public ANM anm
+    cdef public object _rendering_data
 
     cpdef fade(self, unsigned long duration, alpha, formula=*)
     cpdef scale_in(self, unsigned long duration, sx, sy, formula=*)