![]() |
Jo Engine 2026.11.6
Jo Sega Saturn Engine
|
Jo Engine Sprite definition and tools. More...
Go to the source code of this file.
Macros | |
| #define | __JO_SPRITE_IS_MISSING(SPRITE_ID) |
| Check the id of a sprite given to a function of the engine (Internal usage, JO_DEBUG). | |
| #define | JO_NO_GOURAUD_COLOR |
| Value used to keep the original color for jo_set_gouraud_shading_colors(). | |
| #define | JO_DEFAULT_BRIGHTNESS |
| Default brightness for jo_set_gouraud_shading_brightness(). | |
| #define | JO_MAX_BRIGHTNESS |
| Maximum brightness value for jo_set_gouraud_shading_brightness(). | |
| #define | JO_NO_ZOOM |
| Value used to keep the original scale (1.0 in jo_fixed). | |
Functions | |
| void | jo_sprite_draw (const int sprite_id, const jo_pos3D *const pos, const bool centered_style_coordinates, const bool billboard) |
| (internal engine usage) | |
| void | jo_sprite_draw_rotate (const int sprite_id, const jo_pos3D *const pos, const int angle, const bool centered_style_coordinates, const bool billboard) |
| (internal engine usage) | |
| static __jo_force_inline void | __internal_jo_sprite_set_position3D (const int x, const int y, const int z) |
| Internal usage don't use it. | |
| int | jo_get_last_sprite_id (void) |
| Get last Sprite Id. | |
| int | jo_sprite_add (const jo_img *const img) |
| Add a sprite. | |
| static __jo_force_inline int | jo_sprite_add_rgb (const jo_color *const pixels, const unsigned short width, const unsigned short height) |
| Add a sprite from its pixels (jo_sprite_add() without the image struct: a texture in an array of the program). | |
| int | jo_sprite_add_8bits_image (const jo_img_8bits *const img) |
| Add a 8 bits sprite. | |
| int | jo_sprite_add_4bits_lut (const unsigned char *const pixels, const unsigned short width, const unsigned short height, const jo_color *const lut) |
| Add a 16 colors texture with its color lookup table: 4 bits per pixel (4 times less VRAM than an RGB texture), drawn like an RGB texture (the colors of the table are RGB: gouraud shading, half transparency, lights). | |
| int | jo_sprite_add_image_4bits_lut (const jo_img *const img) |
| Add an RGB image of 14 colors at most (the index 15 is the end code of the VDP1) as a 16 colors texture with its color lookup table (see jo_sprite_add_4bits_lut()): the same pixels for 4 times less VRAM (a grey detail texture tinted by the gouraud shading has a few levels of grey). | |
| int | jo_sprite_replace (const jo_img *const img, const int sprite_id) |
| Replace a sprite. | |
| bool | jo_sprite_add_end_codes (const int sprite_id) |
| Write the VDP1 end codes after the last visible pixel of each line of a sprite (RGB sprites). | |
| void | jo_sprite_free_from (const int sprite_id) |
| Free all sprites from the given sprite_id. | |
| static __jo_force_inline void | jo_sprite_free_all (void) |
| Free all sprites. | |
| int | jo_sprite_name2id (const char *const filename) |
| Retrive the Sprite Id from filename based on the four first character in the filename. | |
| static __jo_force_inline void | jo_sprite_enable_screen_doors_filter (void) |
| Activate screen doors filter for every sprite displayed after this call. | |
| static __jo_force_inline void | jo_sprite_disable_screen_doors_filter (void) |
| Disable screen doors filter for every sprite displayed after this call. | |
| static __jo_force_inline void | jo_sprite_enable_half_transparency (void) |
| Activate half transparency for every sprite displayed after this call. | |
| static __jo_force_inline void | jo_sprite_disable_half_transparency (void) |
| Disable half transparency for every sprite displayed after this call. | |
| static __jo_force_inline void | jo_sprite_enable_shadow_filter (void) |
| Activate shadow filter for every sprite displayed after this call. | |
| static __jo_force_inline void | jo_sprite_disable_shadow_filter (void) |
| Disable shadow filter for every sprite displayed after this call. | |
| static __jo_force_inline void | jo_sprite_enable_dark_filter (void) |
| Activate dark filter for every sprite displayed after this call. | |
| static __jo_force_inline void | jo_sprite_disable_dark_filter (void) |
| Disable dark filter for every sprite displayed after this call. | |
| void | jo_set_gouraud_shading_colors (const jo_color topleft_color, const jo_color topright_color, const jo_color bottomright_color, const jo_color bottomleft_color) |
| Change Gouraud Shading colors (a new table for the sprites displayed after this call with jo_sprite_enable_gouraud_shading(): up to 32 tables per frame, the last one is reused after them). | |
| static __jo_force_inline void | jo_sprite_enable_gouraud_shading (void) |
| Activate Gouraud Shading for every sprite displayed after this call. | |
| static __jo_force_inline void | jo_sprite_disable_gouraud_shading (void) |
| Disable Gouraud Shading for every sprite displayed after this call. | |
| static __jo_force_inline void | jo_sprite_set_gouraud_table (const unsigned short table) |
| Gouraud table of the sprites displayed after this call with jo_sprite_enable_gouraud_shading() (instead of the last table of jo_set_gouraud_shading_colors(): the tables given by jo_3d_add_gouraud_tables() are kept from a frame to the next). | |
| void | jo_set_gouraud_shading_brightness (const unsigned char brightness) |
| Change Gouraud Shading brightness. | |
| static __jo_force_inline void | jo_sprite_enable_vertical_flip (void) |
| Activate vertical flip for every sprite displayed after this call. | |
| static __jo_force_inline void | jo_sprite_disable_vertical_flip (void) |
| Disable vertical flip for every sprite displayed after this call. | |
| static __jo_force_inline void | jo_sprite_enable_horizontal_flip (void) |
| Activate horizontal flip for every sprite displayed after this call. | |
| static __jo_force_inline void | jo_sprite_disable_horizontal_flip (void) |
| Disable horizontal flip for every sprite displayed after this call. | |
| static __jo_force_inline void | jo_sprite_change_sprite_scale_fixed (const jo_fixed scale) |
| Change scale for every sprite displayed after this call using fixed number. | |
| static __jo_force_inline void | jo_sprite_change_sprite_scale (const float scale) |
| Change scale for every sprite displayed after this call. | |
| static __jo_force_inline void | jo_sprite_change_sprite_scale_xy (const float scale_x, const float scale_y) |
| Change scale for every sprite displayed after this call. | |
| static __jo_force_inline void | jo_sprite_change_sprite_scale_xy_fixed (const jo_fixed scale_x, const jo_fixed scale_y) |
| Change scale for every sprite displayed after this call using fixed number. | |
| static __jo_force_inline void | jo_sprite_restore_sprite_scale (void) |
| Restore default scale for every sprite displayed after this call. | |
| static __jo_force_inline void | jo_sprite_set_palette (int palette_id) |
| Change palette for every 8 bits sprite displayed after this call. | |
| static __jo_force_inline void | jo_sprite_set_additive_palette (int palette_id) |
| Change palette for every 8 bits sprite displayed after this call: their light is added to the image under them (see jo_enable_additive_sprites()). | |
| void | __jo_vdp1_draw_sprite3D (const int sprite_id, const int x, const int y, const int z) |
| Draw a sprite of the current sprite attributes without rotation (internal usage: see jo_sprite_draw3D()). | |
| void | __jo_vdp1_draw_sprite3D2 (const int sprite_id, const int x, const int y, const int z) |
| Draw a sprite of the current sprite attributes without rotation (internal usage: see jo_sprite_draw3D2()). | |
| static __jo_force_inline void | jo_sprite_draw3D_and_rotate (const int sprite_id, const int x, const int y, const int z, const int angle) |
| Display a sprite in 3 dimensional space. | |
| static __jo_force_inline void | jo_sprite_draw3D (const int sprite_id, const int x, const int y, const int z) |
| Display a sprite in 3 dimensional space. | |
| static __jo_force_inline void | jo_sprite_draw3D_and_rotate2 (const int sprite_id, const int x, const int y, const int z, const int angle) |
| Display a sprite in 3 dimensional space. | |
| static __jo_force_inline void | jo_sprite_draw3D2 (const int sprite_id, const int x, const int y, const int z) |
| Display a sprite in 3 dimensional space. | |
| void | jo_sprite_draw_4p_fixed (const int sprite_id, const jo_pos2D_fixed *const four_points, const jo_fixed z, const bool centered_style_coordinates) |
| Display a sprite on 4 points (distorted sprite). | |
| void | jo_sprite_draw_rotated_fixed (const int sprite_id, const jo_fixed x, const jo_fixed y, const jo_fixed z, const jo_fixed half_width, const jo_fixed half_height, const int angle) |
| Display a sprite turned on the screen (any angle: the 4 corners are computed, the sprite is distorted by the VDP1). | |
| void | jo_sprite_draw_rectangle (const int x, const int y, const int width, const int height, const jo_color color, const int z) |
| Draw a rectangle of one color (no texture): a health bar, a frame, a window of text, a fade to black. | |
| void | jo_sprite_draw_color_4p_fixed (const jo_pos2D_fixed *const four_points, const jo_color color, const jo_fixed z, const bool centered_style_coordinates) |
| Draw a quadrilateral of one color (no texture) on 4 points: jo_sprite_draw_4p_fixed() with a color instead of a sprite. | |
| static __jo_force_inline void | jo_sprite_enable_clipping (bool outside) |
| Activate sprite clipping for every sprite displayed after this call. | |
| static __jo_force_inline void | jo_sprite_disable_clipping (void) |
| Disable sprite clipping for every sprite displayed after this call. | |
| void | jo_sprite_set_clipping_area (const unsigned int x, const unsigned int y, const unsigned int width, const unsigned int height, const int depth) |
| Set user clipping area. | |
| void | jo_sprite_set_system_clipping_area (const unsigned int width, const unsigned int height) |
| Set the VDP1 drawing area (system clipping). | |
| static __jo_force_inline jo_color | jo_sprite_get_pixel_color (const jo_color *const data, const unsigned int x, const unsigned int y, const unsigned int image_width) |
| Get a specific pixel color from image bytes. | |
| static __jo_force_inline unsigned char | jo_sprite_get_pixel_palette_index (const unsigned char *const data, const unsigned int x, const unsigned int y, const unsigned int image_width) |
| Get a specific pixel palette index from image bytes. | |
| static __jo_force_inline bool | jo_sprite_is_pixel_transparent (const jo_color *const data, const unsigned int x, const unsigned int y, const unsigned int image_width) |
| Get if a specific pixel is transparent (JO_COLOR_Transparent) in image bytes. | |
| static __jo_force_inline int | jo_sprite_get_width (const int sprite_id) |
| Get sprite width. | |
| static __jo_force_inline int | jo_sprite_get_height (const int sprite_id) |
| Get sprite height. | |
| static __jo_force_inline void * | jo_sprite_get_raw_data (const int sprite_id) |
| Get sprite raw image contents. | |
| static __jo_force_inline jo_color * | jo_sprite_get_lut (const int sprite_id) |
| Get the color lookup table of a 16 colors texture (jo_sprite_add_4bits_lut()): its 16 entries in the VRAM. The game writes them to change the colors of the texture (an animation of its colors, all the polygons of the texture at once) or reads them to find a texture by its colors. | |
| static __jo_force_inline int | jo_sprite_count (void) |
| Get sprite count. | |
| int | jo_sprite_usage_percent (void) |
| Get sprite memory usage. | |
| unsigned int | jo_sprite_free_memory (void) |
| Get the free sprite memory (VDP1 VRAM). | |
Variables | |
| jo_sprite_attributes | __jo_sprite_attributes |
| Current displayed sprite attribute (internal engine usage). | |
| jo_texture_definition | __jo_sprite_def [JO_MAX_SPRITE] |
| (internal engine usage) | |
| jo_picture_definition | __jo_sprite_pic [JO_MAX_SPRITE] |
| (internal engine usage) | |
| unsigned short | __jo_sprite_lut [JO_MAX_SPRITE] |
| (internal engine usage) | |
Jo Engine Sprite definition and tools.
| #define __JO_SPRITE_IS_MISSING | ( | SPRITE_ID | ) |
Check the id of a sprite given to a function of the engine (Internal usage, JO_DEBUG).
| SPRITE_ID | Sprite id (negative: no sprite, not checked) |
| #define JO_DEFAULT_BRIGHTNESS |
Default brightness for jo_set_gouraud_shading_brightness().
| #define JO_MAX_BRIGHTNESS |
Maximum brightness value for jo_set_gouraud_shading_brightness().
| #define JO_NO_GOURAUD_COLOR |
Value used to keep the original color for jo_set_gouraud_shading_colors().
| #define JO_NO_ZOOM |
Value used to keep the original scale (1.0 in jo_fixed).
|
static |
Internal usage don't use it.
| void __jo_vdp1_draw_sprite3D | ( | const int | sprite_id, |
| const int | x, | ||
| const int | y, | ||
| const int | z ) |
Draw a sprite of the current sprite attributes without rotation (internal usage: see jo_sprite_draw3D()).
| sprite_id | Sprite Id |
| x | Horizontal position of its center from the center of the screen |
| y | Vertical position of its center from the center of the screen |
| z | Z index (depth) |
| void __jo_vdp1_draw_sprite3D2 | ( | const int | sprite_id, |
| const int | x, | ||
| const int | y, | ||
| const int | z ) |
Draw a sprite of the current sprite attributes without rotation (internal usage: see jo_sprite_draw3D2()).
| sprite_id | Sprite Id |
| x | Horizontal position of its top left corner from the top left of the screen |
| y | Vertical position of its top left corner from the top left of the screen |
| z | Z index (depth) |
| int jo_get_last_sprite_id | ( | void | ) |
Get last Sprite Id.
| void jo_set_gouraud_shading_brightness | ( | const unsigned char | brightness | ) |
Change Gouraud Shading brightness.
| brightness | Brightness from 0 to 31 |
| void jo_set_gouraud_shading_colors | ( | const jo_color | topleft_color, |
| const jo_color | topright_color, | ||
| const jo_color | bottomright_color, | ||
| const jo_color | bottomleft_color ) |
Change Gouraud Shading colors (a new table for the sprites displayed after this call with jo_sprite_enable_gouraud_shading(): up to 32 tables per frame, the last one is reused after them).
| topleft_color | Top left corner color in sprite |
| topright_color | Top right corner color in sprite |
| bottomright_color | bottom right corner color in sprite |
| bottomleft_color | bottom left corner color in sprite |
| int jo_sprite_add | ( | const jo_img *const | img | ) |
Add a sprite.
| img | Pointer to a 15 bits image struct |
| int jo_sprite_add_4bits_lut | ( | const unsigned char *const | pixels, |
| const unsigned short | width, | ||
| const unsigned short | height, | ||
| const jo_color *const | lut ) |
Add a 16 colors texture with its color lookup table: 4 bits per pixel (4 times less VRAM than an RGB texture), drawn like an RGB texture (the colors of the table are RGB: gouraud shading, half transparency, lights).
| pixels | 2 pixels per byte (the left pixel in the high bits), the color 0 is transparent |
| width | Width (multiple of 8) |
| height | Height |
| lut | The 16 colors (RGB 555 of the Saturn, the color 0 is not used: transparent). An entry without its MSB is a color code of a palette (jo_palette_color()): the pixel has the color of the color RAM (opaque over a see-through bottom, see jo_vdp2_blend_rgb_sprites_only(); its bits 12-11: the blend ratio, see jo_vdp2_set_sprite_blend_ratios()) |
| int jo_sprite_add_8bits_image | ( | const jo_img_8bits *const | img | ) |
Add a 8 bits sprite.
| img | Pointer to a 8 bits bits image struct |
| bool jo_sprite_add_end_codes | ( | const int | sprite_id | ) |
Write the VDP1 end codes after the last visible pixel of each line of a sprite (RGB sprites).
| sprite_id | Sprite Id |
| int jo_sprite_add_image_4bits_lut | ( | const jo_img *const | img | ) |
Add an RGB image of 14 colors at most (the index 15 is the end code of the VDP1) as a 16 colors texture with its color lookup table (see jo_sprite_add_4bits_lut()): the same pixels for 4 times less VRAM (a grey detail texture tinted by the gouraud shading has a few levels of grey).
| img | Image (RGB, the width a multiple of 8, JO_COLOR_Transparent: transparent) |
|
static |
Add a sprite from its pixels (jo_sprite_add() without the image struct: a texture in an array of the program).
| pixels | RGB pixels (JO_COLOR_Transparent: transparent), copied into the VRAM |
| width | Width (multiple of 8) |
| height | Height |
|
static |
Change scale for every sprite displayed after this call.
| scale | Sprite scale |
|
static |
Change scale for every sprite displayed after this call using fixed number.
| scale | Sprite scale (both axes) |
|
static |
Change scale for every sprite displayed after this call.
| scale_x | Horizontal sprite scale |
| scale_y | Vertical sprite scale |
|
static |
Change scale for every sprite displayed after this call using fixed number.
| scale_x | Horizontal sprite scale |
| scale_y | Vertical sprite scale |
|
static |
Get sprite count.
|
static |
Disable sprite clipping for every sprite displayed after this call.
|
static |
Disable dark filter for every sprite displayed after this call.
|
static |
Disable Gouraud Shading for every sprite displayed after this call.
|
static |
Disable half transparency for every sprite displayed after this call.
|
static |
Disable horizontal flip for every sprite displayed after this call.
|
static |
Disable screen doors filter for every sprite displayed after this call.
|
static |
Disable shadow filter for every sprite displayed after this call.
|
static |
Disable vertical flip for every sprite displayed after this call.
| void jo_sprite_draw | ( | const int | sprite_id, |
| const jo_pos3D *const | pos, | ||
| const bool | centered_style_coordinates, | ||
| const bool | billboard ) |
(internal engine usage)
|
static |
Display a sprite in 3 dimensional space.
| sprite_id | Sprite Id |
| x | Horizontal position from the center of the screen |
| y | Vertical position from the center of the screen |
| z | Z index (depth)) |
|
static |
Display a sprite in 3 dimensional space.
| sprite_id | Sprite Id returned by jo_sprite_add(), jo_sprite_add_tga() or jo_sprite_add_image_pack() |
| x | Horizontal position from the top left corner |
| y | Vertical position from the top left corner |
| z | Z index (depth) |
|
static |
Display a sprite in 3 dimensional space.
| sprite_id | Sprite Id |
| x | Horizontal position from the center of the screen |
| y | Vertical position from the center of the screen |
| z | Z index (depth) |
| angle | Angle (Z axe) |
|
static |
Display a sprite in 3 dimensional space.
| sprite_id | Sprite Id returned by jo_sprite_add(), jo_sprite_add_tga() or jo_sprite_add_image_pack() |
| x | Horizontal position from the top left corner |
| y | Vertical position from the top left corner |
| z | Z index (depth) |
| angle | Angle (Z axe) |
| void jo_sprite_draw_4p_fixed | ( | const int | sprite_id, |
| const jo_pos2D_fixed *const | four_points, | ||
| const jo_fixed | z, | ||
| const bool | centered_style_coordinates ) |
Display a sprite on 4 points (distorted sprite).
| sprite_id | Sprite Id |
| four_points | The corners: top left, top right, bottom right, bottom left (fixed point) |
| z | Z index (depth) |
| centered_style_coordinates | true: (0, 0) is the center of the screen, false: the top left of the screen |
| void jo_sprite_draw_color_4p_fixed | ( | const jo_pos2D_fixed *const | four_points, |
| const jo_color | color, | ||
| const jo_fixed | z, | ||
| const bool | centered_style_coordinates ) |
Draw a quadrilateral of one color (no texture) on 4 points: jo_sprite_draw_4p_fixed() with a color instead of a sprite.
| four_points | The corners: top left, top right, bottom right, bottom left (pixels, fixed point: jo_int2fixed()). The corners are drawn (the corners 0 and 9 cover 10 pixels) |
| color | RGB color, or a color of the palette of the screen in the 8 bits modes (see jo_sprite_draw_rectangle()) |
| z | Depth (fixed point, see jo_sprite_draw_rectangle()) |
| centered_style_coordinates | true: (0, 0) is the center of the screen, false: the top left of the screen |
| void jo_sprite_draw_rectangle | ( | const int | x, |
| const int | y, | ||
| const int | width, | ||
| const int | height, | ||
| const jo_color | color, | ||
| const int | z ) |
Draw a rectangle of one color (no texture): a health bar, a frame, a window of text, a fade to black.
| x | Horizontal position of the left edge, from the left of the screen (pixels) |
| y | Vertical position of the top edge, from the top of the screen (pixels) |
| width | Width in pixels (nothing is drawn for 0 or less) |
| height | Height in pixels (nothing is drawn for 0 or less) |
| color | RGB color (JO_COLOR_RGB(), JO_COLOR_Red...). In the 8 bits modes of the screen (640 or 704 pixels wide): a color of the palette of the screen (palette id * 256 + index, see jo_core_set_screen_palette(), JO_PALETTE_LIGHT_COLOR()) |
| z | Depth like jo_sprite_draw3D() (bigger is farther): the rectangle is sorted with the sprites and the 3D polygons by this depth; at the same depth, in the order of the calls (the last one on top) |
| void jo_sprite_draw_rotate | ( | const int | sprite_id, |
| const jo_pos3D *const | pos, | ||
| const int | angle, | ||
| const bool | centered_style_coordinates, | ||
| const bool | billboard ) |
(internal engine usage)
| void jo_sprite_draw_rotated_fixed | ( | const int | sprite_id, |
| const jo_fixed | x, | ||
| const jo_fixed | y, | ||
| const jo_fixed | z, | ||
| const jo_fixed | half_width, | ||
| const jo_fixed | half_height, | ||
| const int | angle ) |
Display a sprite turned on the screen (any angle: the 4 corners are computed, the sprite is distorted by the VDP1).
| sprite_id | Sprite Id returned by jo_sprite_add(), jo_sprite_add_tga() or jo_sprite_add_image_pack() |
| x | Horizontal position of the center (pixels from the center of the screen, Q16.16) |
| y | Vertical position of the center (pixels from the center of the screen, Q16.16) |
| z | Z index (depth, Q16.16) |
| half_width | Half of the width on the screen (pixels, Q16.16) |
| half_height | Half of the height on the screen (pixels, Q16.16) |
| angle | Angle in degree (clockwise on the screen) |
|
static |
Activate sprite clipping for every sprite displayed after this call.
| outside | Clip everything inside clipping area |
|
static |
Activate dark filter for every sprite displayed after this call.
|
static |
Activate Gouraud Shading for every sprite displayed after this call.
|
static |
Activate half transparency for every sprite displayed after this call.
|
static |
Activate horizontal flip for every sprite displayed after this call.
|
static |
Activate screen doors filter for every sprite displayed after this call.
|
static |
Activate shadow filter for every sprite displayed after this call.
|
static |
Activate vertical flip for every sprite displayed after this call.
|
static |
Free all sprites.
| void jo_sprite_free_from | ( | const int | sprite_id | ) |
Free all sprites from the given sprite_id.
| sprite_id | Sprite ID to replace |
| unsigned int jo_sprite_free_memory | ( | void | ) |
Get the free sprite memory (VDP1 VRAM).
|
static |
Get sprite height.
| sprite_id | Sprite Id returned by jo_sprite_add(), jo_sprite_add_tga() or jo_sprite_add_image_pack() |
|
static |
Get the color lookup table of a 16 colors texture (jo_sprite_add_4bits_lut()): its 16 entries in the VRAM. The game writes them to change the colors of the texture (an animation of its colors, all the polygons of the texture at once) or reads them to find a texture by its colors.
| sprite_id | Sprite Id |
|
static |
Get a specific pixel color from image bytes.
| data | Bytes (raw image data) |
| x | Horizontal ccord in the image |
| y | Vertical ccord in the image |
| image_width | Image width (in pixels) |
|
static |
Get a specific pixel palette index from image bytes.
| data | Bytes (raw image data) |
| x | Horizontal ccord in the image |
| y | Vertical ccord in the image |
| image_width | Image width (in pixels) |
|
static |
Get sprite raw image contents.
| sprite_id | Sprite Id returned by jo_sprite_add(), jo_sprite_add_tga() or jo_sprite_add_image_pack() |
|
static |
Get sprite width.
| sprite_id | Sprite Id returned by jo_sprite_add(), jo_sprite_add_tga() or jo_sprite_add_image_pack() |
|
static |
Get if a specific pixel is transparent (JO_COLOR_Transparent) in image bytes.
| data | Bytes (raw image data) |
| x | Horizontal ccord in the image |
| y | Vertical ccord in the image |
| image_width | Image width (in pixels) |
| int jo_sprite_name2id | ( | const char *const | filename | ) |
Retrive the Sprite Id from filename based on the four first character in the filename.
| filename | Filename (upper case and shorter as possible like "A.TEX") |
| int jo_sprite_replace | ( | const jo_img *const | img, |
| const int | sprite_id ) |
Replace a sprite.
| img | Pointer to a image struct |
| sprite_id | Sprite ID to replace |
|
static |
Restore default scale for every sprite displayed after this call.
|
static |
Change palette for every 8 bits sprite displayed after this call: their light is added to the image under them (see jo_enable_additive_sprites()).
| palette_id | Palette id from jo_create_palette() |
| void jo_sprite_set_clipping_area | ( | const unsigned int | x, |
| const unsigned int | y, | ||
| const unsigned int | width, | ||
| const unsigned int | height, | ||
| const int | depth ) |
Set user clipping area.
| x | Horizontal coord from top left corner |
| y | Vertical coord from top left corner |
| width | Width of the clipping rectangle |
| height | Height of the clipping rectangle |
| depth | Specifies depth up to which sprites get clipped |
|
static |
Gouraud table of the sprites displayed after this call with jo_sprite_enable_gouraud_shading() (instead of the last table of jo_set_gouraud_shading_colors(): the tables given by jo_3d_add_gouraud_tables() are kept from a frame to the next).
| table | Address / 8 of the table (see jo_3d_add_gouraud_tables()), 0: the last table of jo_set_gouraud_shading_colors() |
|
static |
Change palette for every 8 bits sprite displayed after this call.
| palette_id | Palette id from jo_create_palette() |
| void jo_sprite_set_system_clipping_area | ( | const unsigned int | width, |
| const unsigned int | height ) |
Set the VDP1 drawing area (system clipping).
| width | Width of the drawing area (JO_TV_WIDTH by default) |
| height | Height of the drawing area (JO_TV_HEIGHT by default) |
| int jo_sprite_usage_percent | ( | void | ) |
Get sprite memory usage.
|
extern |
Current displayed sprite attribute (internal engine usage).
|
extern |
(internal engine usage)
|
extern |
(internal engine usage)
|
extern |
(internal engine usage)