Jo Engine  9
Jo Sega Saturn Engine
Enumerations | Functions
tga.h File Reference

Jo Engine Truevision Targa format support. More...

Go to the source code of this file.

Enumerations

enum  t_tga_error_code { JO_TGA_OK, JO_TGA_FILE_NOT_FOUND, JO_TGA_UNSUPPORTED_FORMAT, JO_TGA_OUT_OF_MEMORY }
 tga error code More...
 

Functions

t_tga_error_code jo_tga_loader_from_stream (jo_img *img, char *stream, const jo_color transparent_color)
 Load a TGA image from stream. More...
 
int jo_sprite_add_tga_from_stream (char *stream, const jo_color transparent_color)
 Add a sprite from a TGA stream. More...
 

Detailed Description

Jo Engine Truevision Targa format support.

Author
Johannes Fetz
Bug:
jo_tga_tileset_loader is not tested

Enumeration Type Documentation

tga error code

Enumerator
JO_TGA_OK 
JO_TGA_FILE_NOT_FOUND 
JO_TGA_UNSUPPORTED_FORMAT 
JO_TGA_OUT_OF_MEMORY 

Function Documentation

int jo_sprite_add_tga_from_stream ( char *  stream,
const jo_color  transparent_color 
)

Add a sprite from a TGA stream.

Parameters
streamRaw TGA contents
transparent_colorTransparent color (see colors.h). Use JO_COLOR_Transparent by default
Returns
Sprite Id or -1 if failed
t_tga_error_code jo_tga_loader_from_stream ( jo_img img,
char *  stream,
const jo_color  transparent_color 
)

Load a TGA image from stream.

Parameters
imgImage (set data to NULL for dynamic allocation)
streamRaw TGA contents
transparent_colorTransparent color (see colors.h). Use JO_COLOR_Transparent by default
Returns
t_tga_error_code