GRAPHICS: animation library, loading structures and blit funcs
Structures
| Name | |
|---|---|
| struct | ANIM_LIB structure of a library of gfxs |
| struct | ANIM_GFX struct of an animation |
| struct | ANIM_FRAME struct of the properties of a frame in an animation |
| struct | ANIM_DATA animation properties |
Functions
| Name | |
|---|---|
| int | update_anim(ANIM_DATA * data, unsigned int delta_t) update animation frame |
| int | draw_anim(ANIM_DATA * data, int x, int y) draw current animation frame |
| int | destroy_anim_lib(ANIM_LIB ** lib) destroy an animation library |
| int | delete_bmp_from_lib(ANIM_LIB * lib, unsigned int id) delete a bitmap from the library |
| ANIM_LIB * | create_anim_library(const char * name, unsigned int size) create a new animation library |
| int | add_bmp_to_lib(ANIM_LIB * lib, unsigned int pos, char * file, char * resfile) add a bitmap to the library |
Functions Documentation
function update_anim
int update_anim(
ANIM_DATA * data,
unsigned int delta_t
)
update animation frame
Parameters:
- data targetted ANIM_DATA
- delta_t elapsed time to apply (usecs)
Return: TRUE or FALSE
compute and update an ANIM_DATA context based on elapsed delta_t time in usecs
update animation frame
function draw_anim
int draw_anim(
ANIM_DATA * data,
int x,
int y
)
draw current animation frame
Parameters:
- data ANIM_DATA *source to use
- x x position on screen
- y y position on screen
Return: TRUE or FALSE
blit an ANIM_DATA at position x,y ( current selected video buffer is used )
draw current animation frame
function destroy_anim_lib
int destroy_anim_lib(
ANIM_LIB ** lib
)
destroy an animation library
Parameters:
- lib animation library to destroy
Return: TRUE or FALSE
Destroy an animation library.
destroy an animation library
function delete_bmp_from_lib
int delete_bmp_from_lib(
ANIM_LIB * lib,
unsigned int id
)
delete a bitmap from the library
Parameters:
- lib Target animation stream
- id Id of the frame to delete
Return: TRUE or FALSE
Delete the frame at 'id' from 'lib'.
delete a bitmap from the library
function create_anim_library
ANIM_LIB * create_anim_library(
const char * name,
unsigned int size
)
create a new animation library
Parameters:
- name Name for the library or NULL (in which case 'generic_name' will be assigned)
- size Number of animations
Return: An allocated ANIM_LIB *object or NULL
Allocate an animation library.
create a new animation library
function add_bmp_to_lib
int add_bmp_to_lib(
ANIM_LIB * lib,
unsigned int pos,
char * file,
char * resfile
)
add a bitmap to the library
Parameters:
- lib targetted library
- pos position in the animation library
- file input bitmap file
- resfile associated input bitmap text file
Return: TRUE or FALSE
add a bitmap to a ANIM_LIB *lib
add a bitmap to the library
Modules
- AABB3D
- ACCEPT_POOL
- ALLEGRO4
- ALLEGRO5
- ANIM_LIB
- ASTAR
- ATLAS_LIB
- AVRO
- CLOCK_SYNC
- COMMONS
- CONFIGFILE
- CYPHER_BASE64
- CYPHER_VIGENERE
- DEAD_RECKONING
- ENUMS
- EXCEPTIONS
- GAME_ENV
- GIT
- GUI
- HASH_TABLE
- ISOMETRIC_ENGINE
- LIST
- LOG
- LOGNODUP
- LZ4
- NETWORKING
- NETWORK_MSG
- N_COOKIES
- N_DIFF
- N_DIGEST
- N_DISK_CACHE
- N_DNS
- N_ECC
- N_ENTROPY
- N_FILES
- N_FLUIDS
- N_GUI_COLOR
- N_GUI_COLORWHEEL
- N_GUI_CURVE
- N_GUI_GRID
- N_GUI_POPUP
- N_HEX
- N_HTTP3
- N_HTTP_COOKIE
- N_HTTP_FORM
- N_HTTP_MIME
- N_HTTP_REQ
- N_HTTP_RESP
- N_HTTP_ROUTER
- N_HTTP_SERVER
- N_ICC
- N_JSON
- N_KAFKA
- N_LINALG
- N_MODULE
- N_OPENSSL_COMPAT
- N_PRETTY
- N_PTH
- N_QUERY
- N_RANDOM
- N_SHA256
- N_STR
- N_TIFF
- N_TIME
- N_USER
- N_X509
- N_ZIP
- PARTICLES
- PCRE
- PHYSICS
- SIGNALS
- STACK
- THREADS
- TRAJECTORY
- TREE
- ZLIB