![]() |
Jo Engine 2026.11.1
Jo Sega Saturn Engine
|
Jo Engine Image definition and tools. More...
Go to the source code of this file.
Macros | |
| #define | JO_TILE_COUNT(TILE_TABLE) |
| Get tile count in table (see Tileset Demo). | |
Functions | |
| void | jo_replace_color (const jo_img *const img, const jo_color src_color, const jo_color dest_color) |
| Add a sprite. | |
| bool | jo_bin_loader (jo_img *img, const char *const sub_dir, const char *const filename, const jo_color transparent_color) |
| Load a BIN image. | |
| int | jo_sprite_add_bin_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 BIN file. | |
| int | jo_sprite_add_bin (const char *const sub_dir, const char *const filename, const jo_color transparent_color) |
| Add a sprite from a BIN file. | |
| int | jo_sprite_add_bin_4bits_lut (const char *const sub_dir, const char *const filename, const jo_color transparent_color) |
| Add a sprite from a BIN file as a 16 colors texture with its color lookup table when it has 14 colors at most (the index 15 is the end code) (see jo_sprite_add_image_4bits_lut(): 4 times less VRAM), else as an RGB sprite. | |
| int | jo_sprite_add_image_pack (const char *const sub_dir, const char *const filename, const jo_color transparent_color) |
| Add a set of image from a TEX file format. | |
| bool | jo_bin_loader_from_stream (jo_img *img, char *stream, const jo_color transparent_color) |
| Load a BIN image from stream. | |
| int | jo_sprite_add_bin_from_stream (char *stream, const jo_color transparent_color) |
| Add a sprite from a BIN file. | |
| void | jo_free_img (void *const img) |
| Free an image loaded from CD. | |
Jo Engine Image definition and tools.
| #define JO_TILE_COUNT | ( | TILE_TABLE | ) |
Get tile count in table (see Tileset Demo).
| TILE_TABLE | jo_tile[] TABLE |
| bool jo_bin_loader | ( | jo_img * | img, |
| const char *const | sub_dir, | ||
| const char *const | filename, | ||
| const jo_color | transparent_color ) |
Load a BIN 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.BIN") |
| transparent_color | Transparent color (see colors.h). Use JO_COLOR_Transparent by default |
Load a BIN image from stream.
| img | Image (set data to NULL for dynamic allocation) |
| stream | Raw bin file contents |
| transparent_color | Transparent color (see colors.h). Use JO_COLOR_Transparent by default |
| void jo_free_img | ( | void *const | img | ) |
Free an image loaded from CD.
| img | Pointer to an image struct (jo_img, jo_img_8bits or jo_raw_img) |
| void jo_replace_color | ( | const jo_img *const | img, |
| const jo_color | src_color, | ||
| const jo_color | dest_color ) |
Add a sprite.
| img | Pointer to an image struct |
| src_color | Color to replace |
| dest_color | New color |
| int jo_sprite_add_bin | ( | const char *const | sub_dir, |
| const char *const | filename, | ||
| const jo_color | transparent_color ) |
Add a sprite from a BIN 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.BIN") |
| transparent_color | Transparent color (see colors.h). Use JO_COLOR_Transparent by default |
| int jo_sprite_add_bin_4bits_lut | ( | const char *const | sub_dir, |
| const char *const | filename, | ||
| const jo_color | transparent_color ) |
Add a sprite from a BIN file as a 16 colors texture with its color lookup table when it has 14 colors at most (the index 15 is the end code) (see jo_sprite_add_image_4bits_lut(): 4 times less VRAM), else as an RGB sprite.
| 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.BIN") |
| transparent_color | Transparent color (see colors.h). Use JO_COLOR_Transparent by default |
| int jo_sprite_add_bin_from_stream | ( | char * | stream, |
| const jo_color | transparent_color ) |
Add a sprite from a BIN file.
| stream | Raw bin file contents |
| transparent_color | Transparent color (see colors.h). Use JO_COLOR_Transparent by default |
| int jo_sprite_add_bin_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 BIN 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.BIN") |
| transparent_color | Transparent color (see colors.h). Use JO_COLOR_Transparent by default |
| tileset | Table of tiles |
| tile_count | Number of tile in the entire image |
| int jo_sprite_add_image_pack | ( | const char *const | sub_dir, |
| const char *const | filename, | ||
| const jo_color | transparent_color ) |
Add a set of image from a TEX file format.
| 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.TEX") |
| transparent_color | Transparent color (see colors.h). Use JO_COLOR_Transparent by default |