- Main Page
- Classes
- Files

- File List
- File Members

# flSprite.h File Reference

`#include "flGlobal.h"`

Go to the source code of this file.

## Classes
struct | Sprite
## Functions
Sprite * | spriteCreate (Texture *inTex, int inFrameWidth, int inFrameHeight)
void | spriteFree (Sprite *inSprite)
void | spriteRotate (Sprite *inSprite, float inAngle)
void | spriteResize (Sprite *inSprite, float inWidth, float inHeight)
void | spriteMove (Sprite *inSprite, int inX, int inY)
void | spriteMoveTo (Sprite *inSprite, int inX, int inY)
void | spriteDraw2d (Sprite *inSprite)
void | spriteDraw2dFrame (Sprite *inSprite, int inFrame)

## Function Documentation

Sprite* spriteCreate | ( | Texture * | inTex,
|  | int | inFrameWidth,
|  | int | inFrameHeight |
| ) |  |  |

Definition at line 15 of file flSprite.c.

References debugError, debugWarning, memAlloc, NULL, Sprite::spriteAngle, Sprite::spriteFrame, Sprite::spriteFrameCount, Sprite::spriteHeight, Sprite::spriteScaleX, Sprite::spriteScaleY, Sprite::spriteTex, Sprite::spriteWidth, Sprite::spriteX, Sprite::spriteY, Texture::texHeight, and Texture::texWidth.

void spriteDraw2d | ( | Sprite * | inSprite | ) |

Definition at line 73 of file flSprite.c.

References spriteDraw2dFrame(), Sprite::spriteFrame, and Sprite::spriteFrameCount.

void spriteDraw2dFrame | ( | Sprite * | inSprite,
|  | int | inFrame |
| ) |  |  |

Definition at line 82 of file flSprite.c.

References MATH_PI, mathATanf(), mathCosf(), mathPythag2f(), mathSinf(), Sprite::spriteAngle, Sprite::spriteFrameCount, Sprite::spriteHeight, Sprite::spriteScaleX, Sprite::spriteScaleY, Sprite::spriteTex, Sprite::spriteWidth, Sprite::spriteX, Sprite::spriteY, texBind(), Texture::texWidth, vertTsVf::vertU, vertTsVf::vertV, vertTsVf::vertX, vertTsVf::vertY, and vertTsVf::vertZ.

Referenced by spriteDraw2d().

void spriteFree | ( | Sprite * | inSprite | ) |

Definition at line 44 of file flSprite.c.

References debugWarning, and memFree.

void spriteMove | ( | Sprite * | inSprite,
|  | int | inX,
|  | int | inY |
| ) |  |  |

Definition at line 63 of file flSprite.c.

References Sprite::spriteX, and Sprite::spriteY.

void spriteMoveTo | ( | Sprite * | inSprite,
|  | int | inX,
|  | int | inY |
| ) |  |  |

Definition at line 68 of file flSprite.c.

References Sprite::spriteX, and Sprite::spriteY.

void spriteResize | ( | Sprite * | inSprite,
|  | float | inWidth,
|  | float | inHeight |
| ) |  |  |

Definition at line 58 of file flSprite.c.

References Sprite::spriteHeight, Sprite::spriteScaleX, Sprite::spriteScaleY, and Sprite::spriteWidth.

void spriteRotate | ( | Sprite * | inSprite,
|  | float | inAngle |
| ) |  |  |

Definition at line 54 of file flSprite.c.

References Sprite::spriteAngle.