38#ifdef JO_COMPILE_WITH_TGA_SUPPORT
44typedef jo_palette* (*jo_tga_palette_handling_callback)(void);
85#ifdef JO_COMPILE_WITH_FS_SUPPORT
t_tga_error_code jo_tga_8bits_loader_from_stream(jo_img_8bits *img, char *stream, const int transparent_color_index_in_palette)
Load a 8 bits 255 colors max TGA image.
jo_palette *(*) jo_tga_palette_handling_callback(void)
Function prototype for ().
Definition tga.h:44
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.
void jo_set_tga_default_palette(jo_palette *palette)
Set the palette to use for 8 bits image.
t_tga_error_code jo_tga_8bits_loader(jo_img_8bits *img, const char *const sub_dir, const char *const filename, const int transparent_color_index_in_palette)
Load a 8 bits 255 colors max TGA image.
void jo_set_tga_palette_handling(jo_tga_palette_handling_callback callback)
Set the callback to handle TGA palette for 8 bits image.
t_tga_error_code jo_tga_8bits_tileset_loader(const char *const sub_dir, const char *const filename, const jo_color transparent_color, const jo_tile *const tileset, const unsigned int tile_count, jo_raw_img *output_tiles)
Load a tileset TGA image.
int jo_sprite_add_tga_tileset(const char *const sub_dir, const char *const filename, const jo_color transparent_color, const jo_tile *const tileset, const unsigned int tile_count)
Add tileset sprites from a TGA file.
int jo_sprite_add_tga(const char *const sub_dir, const char *const filename, const jo_color transparent_color)
Add a sprite from a TGA file.
t_tga_error_code
tga error code
Definition tga.h:48
@ JO_TGA_FILE_NOT_FOUND
Definition tga.h:50
@ JO_TGA_OK
Definition tga.h:49
@ JO_TGA_OUT_OF_MEMORY
Definition tga.h:52
@ JO_TGA_UNSUPPORTED_FORMAT
Definition tga.h:51
int jo_sprite_add_tga_from_stream(char *stream, const jo_color transparent_color)
Add a sprite from a TGA stream.
t_tga_error_code jo_tga_loader(jo_img *img, const char *const sub_dir, const char *const filename, const jo_color transparent_color)
Load a TGA image.
unsigned short jo_color
15 bits color type
Definition types.h:42
15 bits image struct
Definition types.h:231
8 bits image struct
Definition types.h:239
Palette contents struct.
Definition types.h:255
Raw image struct.
Definition types.h:247
Struct of one tile (pos and size).
Definition types.h:262