citro2d
|
Functions | |
static void | C2D_SpriteFromImage (C2D_Sprite *sprite, C2D_Image image) |
Initializes a sprite from an image. More... | |
static void | C2D_SpriteFromSheet (C2D_Sprite *sprite, C2D_SpriteSheet sheet, size_t index) |
Initializes a sprite from an image stored in a sprite sheet. More... | |
static void | C2D_SpriteScale (C2D_Sprite *sprite, float x, float y) |
Scale sprite (relative) More... | |
static void | C2D_SpriteRotate (C2D_Sprite *sprite, float radians) |
Rotate sprite (relative) More... | |
static void | C2D_SpriteRotateDegrees (C2D_Sprite *sprite, float degrees) |
Rotate sprite (relative) More... | |
static void | C2D_SpriteMove (C2D_Sprite *sprite, float x, float y) |
Move sprite (relative) More... | |
static void | C2D_SpriteSetScale (C2D_Sprite *sprite, float x, float y) |
Scale sprite (absolute) More... | |
static void | C2D_SpriteSetRotation (C2D_Sprite *sprite, float radians) |
Rotate sprite (absolute) More... | |
static void | C2D_SpriteSetRotationDegrees (C2D_Sprite *sprite, float degrees) |
Rotate sprite (absolute) More... | |
static void | C2D_SpriteSetCenter (C2D_Sprite *sprite, float x, float y) |
Set the center of a sprite in values independent of the sprite size (absolute) More... | |
static void | C2D_SpriteSetCenterRaw (C2D_Sprite *sprite, float x, float y) |
Set the center of a sprite in terms of pixels (absolute) More... | |
static void | C2D_SpriteSetPos (C2D_Sprite *sprite, float x, float y) |
Move sprite (absolute) More... | |
static void | C2D_SpriteSetDepth (C2D_Sprite *sprite, float depth) |
Sets the depth level of a sprite (absolute) More... | |
static bool | C2D_DrawSprite (const C2D_Sprite *sprite) |
Draw sprite. More... | |
static bool | C2D_DrawSpriteTinted (const C2D_Sprite *sprite, const C2D_ImageTint *tint) |
Draw sprite with color tinting. More... | |
|
inlinestatic |
Draw sprite.
[in] | sprite | Sprite to draw |
|
inlinestatic |
Draw sprite with color tinting.
[in] | sprite | Sprite to draw |
[in] | tint | Color tinting parameters to apply to the sprite |
|
inlinestatic |
Initializes a sprite from an image.
[in] | Pointer | to sprite |
[in] | image | Image to use |
|
inlinestatic |
Initializes a sprite from an image stored in a sprite sheet.
[in] | Pointer | to sprite |
[in] | sheet | Sprite sheet handle |
[in] | index | Index of the image inside the sprite sheet |
|
inlinestatic |
Move sprite (relative)
[in] | sprite | Pointer to sprite |
[in] | x | X translation |
[in] | y | Y translation |
|
inlinestatic |
Rotate sprite (relative)
[in] | sprite | Pointer to sprite |
[in] | radians | Amount to rotate in radians |
|
inlinestatic |
Rotate sprite (relative)
[in] | sprite | Pointer to sprite |
[in] | degrees | Amount to rotate in degrees |
|
inlinestatic |
Scale sprite (relative)
[in] | sprite | Pointer to sprite |
[in] | x | X scale (negative values flip the sprite horizontally) |
[in] | y | Y scale (negative values flip the sprite vertically) |
|
inlinestatic |
Set the center of a sprite in values independent of the sprite size (absolute)
[in] | sprite | Pointer to sprite |
[in] | x | X position of the center (0.0 through 1.0) |
[in] | y | Y position of the center (0.0 through 1.0) |
|
inlinestatic |
Set the center of a sprite in terms of pixels (absolute)
[in] | sprite | Pointer to sprite |
[in] | x | X position of the center (in pixels) |
[in] | y | Y position of the center (in pixels) |
|
inlinestatic |
Sets the depth level of a sprite (absolute)
[in] | sprite | Pointer to sprite |
[in] | depth | Depth value |
|
inlinestatic |
Move sprite (absolute)
[in] | sprite | Pointer to sprite |
[in] | x | X position |
[in] | y | Y position |
|
inlinestatic |
Rotate sprite (absolute)
[in] | sprite | Pointer to sprite |
[in] | radians | Amount to rotate in radians |
|
inlinestatic |
Rotate sprite (absolute)
[in] | sprite | Pointer to sprite |
[in] | degrees | Amount to rotate in degrees |
|
inlinestatic |
Scale sprite (absolute)
[in] | sprite | Pointer to sprite |
[in] | x | X scale (negative values flip the sprite horizontally) |
[in] | y | Y scale (negative values flip the sprite vertically) |