comparison pytouhou/game/sprite.pxd @ 526:0b2a92a25245

Store data in C arrays in Sprite, and add an interface to access them as tuples.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Wed, 18 Dec 2013 18:15:45 +0100
parents 43ecf0f98f4d
children dacdcca59b66
comparison
equal deleted inserted replaced
525:43ecf0f98f4d 526:0b2a92a25245
8 cdef public bint automatic_orientation, allow_dest_offset, mirrored 8 cdef public bint automatic_orientation, allow_dest_offset, mirrored
9 cdef public bint corner_relative_placement 9 cdef public bint corner_relative_placement
10 cdef public Interpolator scale_interpolator, fade_interpolator 10 cdef public Interpolator scale_interpolator, fade_interpolator
11 cdef public Interpolator offset_interpolator, rotation_interpolator 11 cdef public Interpolator offset_interpolator, rotation_interpolator
12 cdef public Interpolator color_interpolator 12 cdef public Interpolator color_interpolator
13 cdef public tuple texcoords, dest_offset, texoffsets, rescale, scale_speed
14 cdef public tuple rotations_3d, rotations_speed_3d, color
15 cdef public unsigned char alpha
16 cdef public ANM anm 13 cdef public ANM anm
17 cdef public object _rendering_data 14 cdef public object _rendering_data
15
16 cdef float _dest_offset[3]
17 cdef double _texcoords[4]
18 cdef double _texoffsets[2]
19 cdef double _rescale[2]
20 cdef double _scale_speed[2]
21 cdef double _rotations_3d[3]
22 cdef double _rotations_speed_3d[3]
23 cdef unsigned char _color[4]
18 24
19 cpdef fade(self, unsigned long duration, alpha, formula=*) 25 cpdef fade(self, unsigned long duration, alpha, formula=*)
20 cpdef scale_in(self, unsigned long duration, sx, sy, formula=*) 26 cpdef scale_in(self, unsigned long duration, sx, sy, formula=*)
21 cpdef move_in(self, unsigned long duration, x, y, z, formula=*) 27 cpdef move_in(self, unsigned long duration, x, y, z, formula=*)
22 cpdef rotate_in(self, unsigned long duration, rx, ry, rz, formula=*) 28 cpdef rotate_in(self, unsigned long duration, rx, ry, rz, formula=*)