![]() |
Jo Engine 2026.11.1
Jo Sega Saturn Engine
|
Jo Engine Truevision Targa format support. More...
Go to the source code of this file.
Typedefs | |
| typedef jo_palette *(*) | jo_tga_palette_handling_callback(void) |
| Function prototype for (). | |
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 | |
| void | jo_set_tga_palette_handling (jo_tga_palette_handling_callback callback) |
| Set the callback to handle TGA palette for 8 bits image. | |
| void | jo_set_tga_default_palette (jo_palette *palette) |
| Set the palette to use for 8 bits image. | |
| 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. | |
| int | jo_sprite_add_tga_from_stream (char *stream, const jo_color transparent_color) |
| Add a sprite from a TGA stream. | |
| 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 | jo_tga_loader (jo_img *img, const char *const sub_dir, const char *const filename, const jo_color transparent_color) |
| Load a TGA 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. | |
| 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. | |
| 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. | |
Jo Engine Truevision Targa format support.
| typedef jo_palette *(*) jo_tga_palette_handling_callback(void) |
Function prototype for ().
| enum t_tga_error_code |
| void jo_set_tga_default_palette | ( | jo_palette * | palette | ) |
Set the palette to use for 8 bits image.
| palette | The Palette |
| void jo_set_tga_palette_handling | ( | jo_tga_palette_handling_callback | callback | ) |
Set the callback to handle TGA palette for 8 bits image.
| callback | The callback |
| 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.
| sub_dir | Sub directory name (use JO_ROOT_DIR if the file is on the root directory) |
| filename | Filename (upper case and shorter as possible like "A.TGA") |
| transparent_color | Transparent color or palette index for 8 bits image. Use JO_COLOR_Transparent by default |
| int jo_sprite_add_tga_from_stream | ( | char * | stream, |
| const jo_color | transparent_color ) |
Add a sprite from a TGA stream.
| stream | Raw TGA contents |
| transparent_color | Transparent color (see colors.h). Use JO_COLOR_Transparent by default |
| 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.
| sub_dir | Sub directory name (use JO_ROOT_DIR if the file is on the root directory) |
| filename | Filename (upper case and shorter as possible like "A.TGA") |
| transparent_color | Transparent color or palette index for 8 bits image. Use JO_COLOR_Transparent by default |
| tileset | Tileset definition |
| tile_count | Number of tile in the entire 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.
| img | Image (set data to NULL for dynamic allocation) |
| sub_dir | Sub directory name (use JO_ROOT_DIR if the file is on the root directory) |
| filename | Filename (upper case and shorter as possible like "A.TGA") |
| transparent_color_index_in_palette | Transparent color in palette index. Use 0 by default |
| 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.
| img | Image (set data to NULL for dynamic allocation) |
| stream | Raw TGA contents |
| transparent_color_index_in_palette | Transparent color in palette index. Use 0 by default |
| 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.
| sub_dir | Sub directory name (use JO_ROOT_DIR if the file is on the root directory) |
| filename | Filename (upper case and shorter as possible like "A.TGA") |
| transparent_color | Transparent color or palette index for 8 bits image. Use JO_COLOR_Transparent by default |
| tileset | Tileset definition |
| tile_count | Number of tile in the entire image |
| output_tiles | an array of tile_count * jo_raw_img. |
| 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.
| img | Image (set data to NULL for dynamic allocation) |
| sub_dir | Sub directory name (use JO_ROOT_DIR if the file is on the root directory) |
| filename | Filename (upper case and shorter as possible like "A.TGA") |
| transparent_color | Transparent color or palette index for 8 bits image. Use JO_COLOR_Transparent by default |
| 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.
| img | Image (set data to NULL for dynamic allocation) |
| stream | Raw TGA contents |
| transparent_color | Transparent color or palette index for 8 bits image. Use JO_COLOR_Transparent by default |