comparison 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
comparison
equal deleted inserted replaced
524:7f016dfbdfb1 525:43ecf0f98f4d
1 from pytouhou.utils.interpolator cimport Interpolator 1 from pytouhou.utils.interpolator cimport Interpolator
2 from pytouhou.formats.anm0 cimport ANM
2 3
3 cdef class Sprite: 4 cdef class Sprite:
4 cdef public long blendfunc, frame 5 cdef public long blendfunc, frame
5 cdef public double width_override, height_override, angle 6 cdef public double width_override, height_override, angle
6 cdef public bint removed, changed, visible, force_rotation 7 cdef public bint removed, changed, visible, force_rotation
10 cdef public Interpolator offset_interpolator, rotation_interpolator 11 cdef public Interpolator offset_interpolator, rotation_interpolator
11 cdef public Interpolator color_interpolator 12 cdef public Interpolator color_interpolator
12 cdef public tuple texcoords, dest_offset, texoffsets, rescale, scale_speed 13 cdef public tuple texcoords, dest_offset, texoffsets, rescale, scale_speed
13 cdef public tuple rotations_3d, rotations_speed_3d, color 14 cdef public tuple rotations_3d, rotations_speed_3d, color
14 cdef public unsigned char alpha 15 cdef public unsigned char alpha
15 cdef public object anm, _rendering_data 16 cdef public ANM anm
17 cdef public object _rendering_data
16 18
17 cpdef fade(self, unsigned long duration, alpha, formula=*) 19 cpdef fade(self, unsigned long duration, alpha, formula=*)
18 cpdef scale_in(self, unsigned long duration, sx, sy, formula=*) 20 cpdef scale_in(self, unsigned long duration, sx, sy, formula=*)
19 cpdef move_in(self, unsigned long duration, x, y, z, formula=*) 21 cpdef move_in(self, unsigned long duration, x, y, z, formula=*)
20 cpdef rotate_in(self, unsigned long duration, rx, ry, rz, formula=*) 22 cpdef rotate_in(self, unsigned long duration, rx, ry, rz, formula=*)