Logo Search packages:      
Sourcecode: libcaca version File versions  Download package

sprite.c File Reference


Detailed Description

Sprite loading and blitting.

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.

Definition in file sprite.c.

#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "caca.h"
#include "caca_internals.h"

Go to the source code of this file.

Classes

struct  caca_frame
struct  caca_sprite

Functions

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.
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.
int caca_get_sprite_frames (struct caca_sprite const *sprite)
 Return the number of frames in a sprite.
int caca_get_sprite_height (struct caca_sprite const *sprite, int f)
 Return the height of a sprite.
int caca_get_sprite_width (struct caca_sprite const *sprite, int f)
 Return the width of a sprite.
struct caca_sprite * caca_load_sprite (char const *file)
 Allocate a sprite loaded from a file.


Generated by  Doxygen 1.6.0   Back to index