#include <sprite.h>
Data Fields | |
| int | texture_number |
| Texture number to be displayed. | |
| float | u |
| U coordinate of frame. | |
| float | v |
| V coordinate of frame. | |
| float | xoff |
| X-Offset for this frame. | |
| float | yoff |
| Y-Offset for this frame. | |
| float | zoff |
| Z-Offset for this frame. | |
Each frame of each animation has one cc_sprite_anim_frame_t object associated with it. This object describes the position in the cc_texture_t that this frame resides.
Texture number to be displayed.
This integer works with cc_sprite_ts that contain lists of textures. In these types of sprites, the u/v coordinates are ignored, and this number is used instead to tell which frame to display.
| float cc_sprite_anim_frame::u |
U coordinate of frame.
This is ratio of the X position of the upper left corner of the frame to the width of the texture.
| float cc_sprite_anim_frame::v |
V coordinate of frame.
This is ratio of the Y position of the upper left corner of the frame to the height of the texture.
X-Offset for this frame.
This value is only useful for subsprite animations. It is completely ignored for top-level cc_sprite_ts. This value describes where on the top-level cc_sprite_t that this frame should be drawn, starting from the upper-left corner of the top-level cc_sprite_t.
Y-Offset for this frame.
This value is only useful for subsprite animations. It is completely ignored for top-level cc_sprite_ts. This value describes where on the top-level cc_sprite_t that this frame should be drawn, starting from the upper-left corner of the top-level cc_sprite_t.
Z-Offset for this frame.
This value is only useful for subsprite animations. It is completely ignored for top-level cc_sprite_ts. This value describes where on the top-level cc_sprite_t that this frame should be drawn, starting from the upper-left corner of the top-level cc_sprite_t.