---
name: "sprite.c"
section: "3caca"
platform: "linux"
package: "libcaca-dev"
version: "0.9-4"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/sprite.c"
---

# sprite.c(3caca)

Sprite loading and blitting.

## NAME

sprite.c - Sprite loading and blitting.

## SYNOPSIS

### Functions

caca\_sprite \* **caca\_load\_sprite** (char const \*file)\
 *Allocate a sprite loaded from a file.*  int **caca\_get\_sprite\_frames** (struct caca\_sprite const \*sprite)\
 *Return the number of frames in a sprite.*  int **caca\_get\_sprite\_width** (struct caca\_sprite const \*sprite, int f)\
 *Return the width of a sprite.*  int **caca\_get\_sprite\_height** (struct caca\_sprite const \*sprite, int f)\
 *Return the height of a sprite.*  int **caca\_get\_sprite\_dx** (struct caca\_sprite const \*sprite, int f)\
 *Return the X coordinate of a sprite's handle.*  int **caca\_get\_sprite\_dy** (struct caca\_sprite const \*sprite, int f)\
 *Return the Y coordinate of a sprite's handle.*  void **caca\_draw\_sprite** (int x, int y, struct caca\_sprite const \*sprite, int f)\
 *Draw a sprite's specific frame at the given coordinates. If the frame does not exist, nothing is displayed.*  void **caca\_free\_sprite** (struct caca\_sprite \*sprite)\
 *Free the memory associated with a sprite.*

## Detailed Description

**Version:**

$Id: **sprite.c** 219 2004-01-07 12:45:02Z sam $

**Author:**

Sam Hocevar \<sam@zoy.org\>

This file contains a small framework for sprite loading and blitting.

## Author

Generated automatically by Doxygen for libcaca from the source code.
