#include <SDL.h>#include <action.h>#include <object.h>| Definiciones | |
| #define | obj_sprite(world, id, x, y, angle, lifetime, color) object_init(sprite_init(world,id,x,y,angle,lifetime,color),&sprite_object_operations) | 
| Macro to make it easy to construct an object of a sprite. | |
| Funciones | |
| sprite | sprite_init (world, display display, id, int x, int y, int w, int h, int lifetime, char *bitmap) | 
| Initializes a sprite. Más... | |
| void | sprite_destroy (sprite) | 
| Destroy a sprite object. Más... | |
| int | sprite_step (sprite) | 
| A function part of the object operations. Más... | |
| int | sprite_alive (sprite) | 
| A function part of the object operations. Más... | |
| int | sprite_show (sprite) | 
| A function needed to create an object to attach to a world. Más... | |
| int | sprite_action (sprite, SDL_Event *action) | 
| A function needed to create an object to attach to a world. Más... | |
| Variables | |
| object_operations | sprite_object_operations | 
| Template of the object_operation related with a sprite. Más... | |
| object | sprite_obj_template | 
| Template of a sprite object. Más... | |
| 
 | ||||||||||||||||||||||||||||||||||||||||
| Initializes a sprite. Allocates the resorces needed by a sprite, loads the grapics. It must be called befor te use of any other function related to this sprite. 
 
 | 
| 
 | 
| It unallocates the resources used by the prite. | 
| 
 | 
| A function part of the object operations. It doesn't do anything. 
 | 
| 
 | 
| A function part of the object operations. It checks if the sprite is still alive or active or running or being. 
 | 
| 
 | 
| A function needed to create an object to attach to a world. Draw the sprite in the display. | 
| 
 | ||||||||||||
| A function needed to create an object to attach to a world. Dummy | 
| 
 | 
| Valor inicial: {
    obj_step: &sprite_step,
    obj_action: &sprite_action,
    obj_alive: &sprite_alive,
    obj_destroy: &sprite_destroy
}
 | 
| 
 | 
| Valor inicial: {
    object_ops: &sprite_object_operations,
}
 | 
 1.2.15
1.2.15