cc_sprite_anim_frame Struct Reference

Sprite animation frame. More...

#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.


Detailed Description

Sprite animation 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.

Since:
1.0.0

Field Documentation

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.

Since:
1.0.0

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.

Since:
1.0.0

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.

Since:
1.0.0

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.

Since:
1.0.0

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.

Since:
1.0.0

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.

Since:
1.0.0


The documentation for this struct was generated from the following file:
SourceForge.net Logo