Display » Sprites module

Small animated objects that can move freely from the background(s).

In GBA's jargon they are called OBJs.

Files

file bn_config_sprite_tiles.h
file bn_config_sprites.h
file bn_sprite_actions.h
file bn_sprite_affine_mat_actions.h
file bn_sprite_affine_mat_attributes_hbe_ptr.h
file bn_sprite_affine_mat_pa_register_hbe_ptr.h
file bn_sprite_affine_mat_pb_register_hbe_ptr.h
file bn_sprite_affine_mat_pc_register_hbe_ptr.h
file bn_sprite_affine_mat_pd_register_hbe_ptr.h
file bn_sprite_affine_mat_ptr.h
file bn_sprite_affine_mats.h
file bn_sprite_affine_second_attributes.h
file bn_sprite_affine_second_attributes_hbe_ptr.h
file bn_sprite_animate_actions.h
file bn_sprite_builder.h
file bn_sprite_double_size_mode.h
file bn_sprite_first_attributes.h
file bn_sprite_first_attributes_hbe_ptr.h
file bn_sprite_font.h
file bn_sprite_item.h
file bn_sprite_palette_actions.h
file bn_sprite_palette_color_hbe_ptr.h
file bn_sprite_palette_item.h
file bn_sprite_palette_ptr.h
file bn_sprite_palettes.h
file bn_sprite_palettes_actions.h
file bn_sprite_position_hbe_ptr.h
file bn_sprite_ptr.h
file bn_sprite_regular_second_attributes.h
file bn_sprite_regular_second_attributes_hbe_ptr.h
file bn_sprite_shape_size.h
file bn_sprite_text_generator.h
file bn_sprite_third_attributes.h
file bn_sprite_third_attributes_hbe_ptr.h
file bn_sprite_tiles.h
file bn_sprite_tiles_item.h
file bn_sprite_tiles_ptr.h
file bn_sprites.h
file bn_sprites_mosaic.h
file bn_sprites_mosaic_actions.h

Namespaces

namespace bn
Main Butano namespace.
namespace bn::sprite_affine_mats
Sprite affine transformation matrices related functions.
namespace bn::sprite_palettes
Sprite color palettes related functions.
namespace bn::sprite_tiles
Sprite tiles related functions.
namespace bn::sprites
Sprites related functions.
namespace bn::sprites_mosaic
Functions related with the mosaic applied to the sprites.

Classes

class bn::sprite_visible_manager
Manages if a sprite_ptr must be committed to the GBA or not.
class bn::sprite_visible_toggle_action
Toggles if a sprite_ptr must be committed to the GBA or not when the action is updated a given number of times.
class bn::sprite_position_manager
Manages the position of a sprite_ptr.
class bn::sprite_move_by_action
Modifies the position of a sprite_ptr by a given delta.
class bn::sprite_move_to_action
Modifies the position of a sprite_ptr until it has a given state.
class bn::sprite_move_loop_action
Modifies the position of a sprite_ptr from a minimum to a maximum. When the position is equal to the given final state, it goes back to its initial state and vice versa.
class bn::sprite_move_toggle_action
Changes the position of a sprite_ptr when the action is updated a given number of times.
class bn::sprite_rotation_manager
Manages the rotation angle of a sprite_ptr.
class bn::sprite_rotate_by_action
Modifies the rotation angle of a sprite_ptr by delta_rotation_angle. When the rotation angle is over 360, it goes back to 0 and vice versa.
class bn::sprite_rotate_to_action
Modifies the rotation angle of a sprite_ptr until it has a given state.
class bn::sprite_rotate_loop_action
Modifies the rotation angle of a sprite_ptr from a minimum to a maximum. When the rotation angle is equal to the given final state, it goes back to its initial state and vice versa.
class bn::sprite_rotate_toggle_action
Changes the rotation angle of a sprite_ptr when the action is updated a given number of times.
class bn::sprite_horizontal_scale_manager
Manages the horizontal scale of a sprite_ptr.
class bn::sprite_horizontal_scale_to_action
Modifies the horizontal scale of a sprite_ptr until it has a given state.
class bn::sprite_horizontal_scale_loop_action
Modifies the horizontal scale of a sprite_ptr from a minimum to a maximum. When the horizontal scale is equal to the given final state, it goes back to its initial state and vice versa.
class bn::sprite_horizontal_scale_toggle_action
Changes the horizontal scale of a sprite_ptr when the action is updated a given number of times.
class bn::sprite_vertical_scale_manager
Manages the vertical scale of a sprite_ptr.
class bn::sprite_vertical_scale_to_action
Modifies the vertical scale of a sprite_ptr until it has a given state.
class bn::sprite_vertical_scale_loop_action
Modifies the vertical scale of a sprite_ptr from a minimum to a maximum. When the vertical scale is equal to the given final state, it goes back to its initial state and vice versa.
class bn::sprite_vertical_scale_toggle_action
Changes the vertical scale of a sprite_ptr when the action is updated a given number of times.
class bn::sprite_scale_manager
Manages the scale of a sprite_ptr.
class bn::sprite_scale_to_action
Modifies the scale of a sprite_ptr until it has a given state.
class bn::sprite_scale_loop_action
Modifies the scale of a sprite_ptr from a minimum to a maximum. When the scale is equal to the given final state, it goes back to its initial state and vice versa.
class bn::sprite_scale_toggle_action
Changes the scale of a sprite_ptr when the action is updated a given number of times.
class bn::sprite_horizontal_shear_manager
Manages the horizontal shear of a sprite_ptr.
class bn::sprite_horizontal_shear_to_action
Modifies the horizontal shear of a sprite_ptr until it has a given state.
class bn::sprite_horizontal_shear_loop_action
Modifies the horizontal shear of a sprite_ptr from a minimum to a maximum. When the horizontal shear is equal to the given final state, it goes back to its initial state and vice versa.
class bn::sprite_horizontal_shear_toggle_action
Changes the horizontal shear of a sprite_ptr when the action is updated a given number of times.
class bn::sprite_vertical_shear_manager
Manages the vertical shear of a sprite_ptr.
class bn::sprite_vertical_shear_to_action
Modifies the vertical shear of a sprite_ptr until it has a given state.
class bn::sprite_vertical_shear_loop_action
Modifies the vertical shear of a sprite_ptr from a minimum to a maximum. When the vertical shear is equal to the given final state, it goes back to its initial state and vice versa.
class bn::sprite_vertical_shear_toggle_action
Changes the vertical shear of a sprite_ptr when the action is updated a given number of times.
class bn::sprite_shear_manager
Manages the shear of a sprite_ptr.
class bn::sprite_shear_to_action
Modifies the shear of a sprite_ptr until it has a given state.
class bn::sprite_shear_loop_action
Modifies the shear of a sprite_ptr from a minimum to a maximum. When the shear is equal to the given final state, it goes back to its initial state and vice versa.
class bn::sprite_shear_toggle_action
Changes the shear of a sprite_ptr when the action is updated a given number of times.
class bn::sprite_horizontal_flip_manager
Manages if a sprite_ptr is flipped in its horizontal axis or not.
class bn::sprite_horizontal_flip_toggle_action
Toggles if a sprite_ptr must be flipped in the horizontal axis or not when the action is updated a given number of times.
class bn::sprite_vertical_flip_manager
Manages if a sprite_ptr is flipped in its vertical axis or not.
class bn::sprite_vertical_flip_toggle_action
Toggles if a sprite_ptr must be flipped in the vertical axis or not when the action is updated a given number of times.
class bn::sprite_mosaic_manager
Manages if the mosaic effect must be applied to a sprite_ptr or not.
class bn::sprite_mosaic_toggle_action
Toggles if the mosaic effect must be applied to a sprite_ptr or not when the action is updated a given number of times.
class bn::sprite_blending_manager
Manages if blending must be applied to a sprite_ptr or not.
class bn::sprite_blending_toggle_action
Toggles if blending must be applied to a sprite_ptr or not when the action is updated a given number of times.
class bn::sprite_window_manager
Manages if a sprite_ptr must be part of the silhouette of the sprite window or not.
class bn::sprite_window_toggle_action
Toggles if a sprite_ptr must be part of the silhouette of the sprite window or not when the action is updated a given number of times.
class bn::sprite_affine_mat_rotation_manager
Manages the rotation angle of a sprite_affine_mat_ptr.
class bn::sprite_affine_mat_rotate_by_action
Modifies the rotation angle of a sprite_affine_mat_ptr by delta_rotation_angle. When the rotation angle is over 360, it goes back to 0 and vice versa.
class bn::sprite_affine_mat_rotate_to_action
Modifies the rotation angle of a sprite_affine_mat_ptr until it has a given state.
class bn::sprite_affine_mat_rotate_loop_action
Modifies the rotation angle of a sprite_affine_mat_ptr from a minimum to a maximum. When the rotation angle is equal to the given final state, it goes back to its initial state and vice versa.
class bn::sprite_affine_mat_rotate_toggle_action
Changes the rotation angle of a sprite_affine_mat_ptr when the action is updated a given number of times.
class bn::sprite_affine_mat_horizontal_scale_manager
Manages the horizontal scale of a sprite_affine_mat_ptr.
class bn::sprite_affine_mat_horizontal_scale_to_action
Modifies the horizontal scale of a sprite_affine_mat_ptr until it has a given state.
class bn::sprite_affine_mat_horizontal_scale_loop_action
Modifies the horizontal scale of a sprite_affine_mat_ptr from a minimum to a maximum. When the horizontal scale is equal to the given final state, it goes back to its initial state and vice versa.
class bn::sprite_affine_mat_horizontal_scale_toggle_action
Changes the horizontal scale of a sprite_affine_mat_ptr when the action is updated a given number of times.
class bn::sprite_affine_mat_vertical_scale_manager
Manages the vertical scale of a sprite_affine_mat_ptr.
class bn::sprite_affine_mat_vertical_scale_to_action
Modifies the vertical scale of a sprite_affine_mat_ptr until it has a given state.
class bn::sprite_affine_mat_vertical_scale_loop_action
Modifies the vertical scale of a sprite_affine_mat_ptr from a minimum to a maximum. When the vertical scale is equal to the given final state, it goes back to its initial state and vice versa.
class bn::sprite_affine_mat_vertical_scale_toggle_action
Changes the vertical scale of a sprite_affine_mat_ptr when the action is updated a given number of times.
class bn::sprite_affine_mat_scale_manager
Manages the scale of a sprite_affine_mat_ptr.
class bn::sprite_affine_mat_scale_to_action
Modifies the scale of a sprite_affine_mat_ptr until it has a given state.
class bn::sprite_affine_mat_scale_loop_action
Modifies the scale of a sprite_affine_mat_ptr from a minimum to a maximum. When the scale is equal to the given final state, it goes back to its initial state and vice versa.
class bn::sprite_affine_mat_scale_toggle_action
Changes the scale of a sprite_affine_mat_ptr when the action is updated a given number of times.
class bn::sprite_affine_mat_horizontal_shear_manager
Manages the horizontal shear of a sprite_affine_mat_ptr.
class bn::sprite_affine_mat_horizontal_shear_to_action
Modifies the horizontal shear of a sprite_affine_mat_ptr until it has a given state.
class bn::sprite_affine_mat_horizontal_shear_loop_action
Modifies the horizontal shear of a sprite_affine_mat_ptr from a minimum to a maximum. When the horizontal shear is equal to the given final state, it goes back to its initial state and vice versa.
class bn::sprite_affine_mat_horizontal_shear_toggle_action
Changes the horizontal shear of a sprite_affine_mat_ptr when the action is updated a given number of times.
class bn::sprite_affine_mat_vertical_shear_manager
Manages the vertical shear of a sprite_affine_mat_ptr.
class bn::sprite_affine_mat_vertical_shear_to_action
Modifies the vertical shear of a sprite_affine_mat_ptr until it has a given state.
class bn::sprite_affine_mat_vertical_shear_loop_action
Modifies the vertical shear of a sprite_affine_mat_ptr from a minimum to a maximum. When the vertical shear is equal to the given final state, it goes back to its initial state and vice versa.
class bn::sprite_affine_mat_vertical_shear_toggle_action
Changes the vertical shear of a sprite_affine_mat_ptr when the action is updated a given number of times.
class bn::sprite_affine_mat_shear_manager
Manages the shear of a sprite_affine_mat_ptr.
class bn::sprite_affine_mat_shear_to_action
Modifies the shear of a sprite_affine_mat_ptr until it has a given state.
class bn::sprite_affine_mat_shear_loop_action
Modifies the shear of a sprite_affine_mat_ptr from a minimum to a maximum. When the shear is equal to the given final state, it goes back to its initial state and vice versa.
class bn::sprite_affine_mat_shear_toggle_action
Changes the shear of a sprite_affine_mat_ptr when the action is updated a given number of times.
class bn::sprite_affine_mat_horizontal_flip_manager
Manages if a sprite_affine_mat_ptr is flipped in its horizontal axis or not.
class bn::sprite_affine_mat_horizontal_flip_toggle_action
Toggles if a sprite_affine_mat_ptr must be flipped in the horizontal axis or not when the action is updated a given number of times.
class bn::sprite_affine_mat_vertical_flip_manager
Manages if a sprite_affine_mat_ptr is flipped in its vertical axis or not.
class bn::sprite_affine_mat_vertical_flip_toggle_action
Toggles if a sprite_affine_mat_ptr must be flipped in the vertical axis or not when the action is updated a given number of times.
class bn::sprite_affine_mat_attributes_hbe_ptr
std::shared_ptr like smart pointer that retains shared ownership of a H-Blank effect which changes the attributes of a sprite_affine_mat_ptr in each screen horizontal line.
template<>
struct bn::hash<sprite_affine_mat_attributes_hbe_ptr>
Hash support for sprite_affine_mat_attributes_hbe_ptr.
class bn::sprite_affine_mat_pa_register_hbe_ptr
std::shared_ptr like smart pointer that retains shared ownership of a H-Blank effect which changes the attributes or the values to commit to the first GBA register of a sprite_affine_mat_ptr in each screen horizontal line.
class bn::sprite_affine_mat_pb_register_hbe_ptr
std::shared_ptr like smart pointer that retains shared ownership of a H-Blank effect which changes the attributes or the values to commit to the second GBA register of a sprite_affine_mat_ptr in each screen horizontal line.
class bn::sprite_affine_mat_pc_register_hbe_ptr
std::shared_ptr like smart pointer that retains shared ownership of a H-Blank effect which changes the attributes or the values to commit to the third GBA register of a sprite_affine_mat_ptr in each screen horizontal line.
class bn::sprite_affine_mat_pd_register_hbe_ptr
std::shared_ptr like smart pointer that retains shared ownership of a H-Blank effect which changes the attributes or the values to commit to the fourth GBA register of a sprite_affine_mat_ptr in each screen horizontal line.
class bn::sprite_affine_mat_ptr
std::shared_ptr like smart pointer that retains shared ownership of a sprite affine transformation matrix.
template<>
struct bn::hash<sprite_affine_mat_ptr>
Hash support for sprite_affine_mat_ptr.
class bn::sprite_affine_second_attributes
Manages the attributes to commit to the second GBA register of an affine sprite (with an attached sprite_affine_mat_ptr).
class bn::sprite_affine_second_attributes_hbe_ptr
std::shared_ptr like smart pointer that retains shared ownership of a H-Blank effect which changes the attributes to commit to the second GBA register of an affine sprite (with an attached sprite_affine_mat_ptr) in each screen horizontal line.
template<int MaxSize>
class bn::sprite_animate_action
Changes the tile set of a sprite_ptr when the action is updated a given number of times.
template<int MaxSize>
class bn::sprite_cached_animate_action
Changes the tile set of a sprite_ptr when the action is updated a given number of times.
class bn::sprite_builder
Creates sprite_ptr objects with custom attributes.
class bn::sprite_first_attributes
Manages the attributes to commit to the first GBA register of a sprite.
class bn::sprite_first_attributes_hbe_ptr
std::shared_ptr like smart pointer that retains shared ownership of a H-Blank effect which changes the attributes to commit to the first GBA register of a sprite in each screen horizontal line.
class bn::sprite_font
Contains the required information to generate text sprites.
class bn::sprite_item
Contains the required information to generate sprites.
class bn::sprite_palette_inverted_manager
Manages if the colors of a sprite_palette_ptr must be inverted or not.
class bn::sprite_palette_inverted_toggle_action
Toggles if the colors of a sprite_palette_ptr must be inverted or not when the action is updated a given number of times.
class bn::sprite_palette_grayscale_manager
Manages the intensity of the grayscale effect applied to a sprite_palette_ptr.
class bn::sprite_palette_grayscale_to_action
Modifies the intensity of the grayscale effect applied to a sprite_palette_ptr until it has a given state.
class bn::sprite_palette_grayscale_loop_action
Modifies the intensity of the grayscale effect applied to a sprite_palette_ptr from a minimum to a maximum. When the intensity is equal to the given final state, it goes back to its initial state and vice versa.
class bn::sprite_palette_grayscale_toggle_action
Changes the intensity of the grayscale effect applied to a sprite_palette_ptr when the action is updated a given number of times.
class bn::sprite_palette_fade_manager
Manages the intensity of the fade effect applied to a sprite_palette_ptr.
class bn::sprite_palette_fade_to_action
Modifies the intensity of the fade effect applied to a sprite_palette_ptr until it has a given state.
class bn::sprite_palette_fade_loop_action
Modifies the intensity of the fade effect applied to a sprite_palette_ptr from a minimum to a maximum. When the intensity is equal to the given final state, it goes back to its initial state and vice versa.
class bn::sprite_palette_fade_toggle_action
Changes the intensity of the fade effect applied to a sprite_palette_ptr when the action is updated a given number of times.
class bn::sprite_palette_rotate_manager
Manages the number of colors to rotate to the right in a sprite_palette_ptr.
class bn::sprite_palette_rotate_by_action
Modifies the number of colors to rotate to the right in a sprite_palette_ptr by delta_count when the action is updated a given number of times. When the property is over the given maximum, it goes back to the given minimum and vice versa.
class bn::sprite_palette_rotate_to_action
Modifies the number of colors to rotate to the right in a sprite_palette_ptr until it has a given state.
class bn::sprite_palette_rotate_loop_action
Modifies the number of colors to rotate to the right in a sprite_palette_ptr from a minimum to a maximum. When the number of colors to rotate to the right is equal to the given final state, it goes back to its initial state and vice versa.
class bn::sprite_palette_rotate_toggle_action
Changes the number of colors to rotate to the right in a sprite_palette_ptr when the action is updated a given number of times.
class bn::sprite_palette_color_hbe_ptr
std::shared_ptr like smart pointer that retains shared ownership of a H-Blank effect which changes the color of a sprite color palette in each screen horizontal line.
class bn::sprite_palette_item
Contains the required information to generate sprite color palettes.
class bn::sprite_palette_ptr
std::shared_ptr like smart pointer that retains shared ownership of a sprite color palette.
template<>
struct bn::hash<sprite_palette_ptr>
Hash support for sprite_palette_ptr.
class bn::sprite_palettes_brightness_manager
Manages the brightness of all sprite color palettes.
class bn::sprite_palettes_brightness_to_action
Modifies the brightness of all sprite color palettes until it has a given state.
class bn::sprite_palettes_brightness_loop_action
Modifies the brightness of all sprite color palettes from a minimum to a maximum. When the brightness is equal to the given final state, it goes back to its initial state and vice versa.
class bn::sprite_palettes_brightness_toggle_action
Changes the brightness of all sprite color palettes when the action is updated a given number of times.
class bn::sprite_palettes_contrast_manager
Manages the contrast of all sprite color palettes.
class bn::sprite_palettes_contrast_to_action
Modifies the contrast of all sprite color palettes until it has a given state.
class bn::sprite_palettes_contrast_loop_action
Modifies the contrast of all sprite color palettes from a minimum to a maximum. When the contrast is equal to the given final state, it goes back to its initial state and vice versa.
class bn::sprite_palettes_contrast_toggle_action
Changes the contrast of all sprite color palettes when the action is updated a given number of times.
class bn::sprite_palettes_intensity_manager
Manages the intensity of all sprite color palettes.
class bn::sprite_palettes_intensity_to_action
Modifies the intensity of all sprite color palettes until it has a given state.
class bn::sprite_palettes_intensity_loop_action
Modifies the intensity of all sprite color palettes from a minimum to a maximum. When the intensity is equal to the given final state, it goes back to its initial state and vice versa.
class bn::sprite_palettes_intensity_toggle_action
Changes the intensity of all sprite color palettes when the action is updated a given number of times.
class bn::sprite_palettes_inverted_manager
Manages if the colors of all sprite color palettes must be inverted or not.
class bn::sprite_palettes_inverted_toggle_action
Toggles if the colors of all sprite color palettes must be inverted or not when the action is updated a given number of times.
class bn::sprite_palettes_grayscale_manager
Manages the intensity of the grayscale effect applied to all sprite color palettes.
class bn::sprite_palettes_grayscale_to_action
Modifies the intensity of the grayscale effect applied to all sprite color palettes until it has a given state.
class bn::sprite_palettes_grayscale_loop_action
Modifies the intensity of the grayscale effect applied to all sprite color palettes from a minimum to a maximum. When the intensity is equal to the given final state, it goes back to its initial state and vice versa.
class bn::sprite_palettes_grayscale_toggle_action
Changes the intensity of the grayscale effect applied to all sprite color palettes when the action is updated a given number of times.
class bn::sprite_palettes_fade_manager
Manages the intensity of the fade effect applied to all sprite color palettes.
class bn::sprite_palettes_fade_to_action
Modifies the intensity of the fade effect applied to all sprite color palettes until it has a given state.
class bn::sprite_palettes_fade_loop_action
Modifies the intensity of the fade effect applied to all sprite color palettes from a minimum to a maximum. When the intensity is equal to the given final state, it goes back to its initial state and vice versa.
class bn::sprite_palettes_fade_toggle_action
Changes the intensity of the fade effect applied to all sprite color palettes when the action is updated a given number of times.
class bn::sprite_position_hbe_ptr
std::shared_ptr like smart pointer that retains shared ownership of a H-Blank effect which changes the position of a sprite in each screen horizontal line.
class bn::sprite_ptr
std::shared_ptr like smart pointer that retains shared ownership of a sprite.
template<>
struct bn::hash<sprite_ptr>
Hash support for sprite_ptr.
class bn::sprite_regular_second_attributes
Manages the attributes to commit to the second GBA register of a regular sprite (without an attached sprite_affine_mat_ptr).
class bn::sprite_regular_second_attributes_hbe_ptr
std::shared_ptr like smart pointer that retains shared ownership of a H-Blank effect which changes the attributes to commit to the second GBA register of a regular sprite (without an attached sprite_affine_mat_ptr) in each screen horizontal line.
class bn::sprite_shape_size
Calculates sprite dimensions from its shape and size.
class bn::sprite_text_generator
Generates sprites containing text from a given sprite_font.
class bn::sprite_third_attributes
Manages the attributes to commit to the third GBA register of a sprite.
class bn::sprite_third_attributes_hbe_ptr
std::shared_ptr like smart pointer that retains shared ownership of a H-Blank effect which changes the attributes to commit to the third GBA register of a sprite in each screen horizontal line.
class bn::sprite_tiles_item
Contains the required information to generate sprite tiles.
class bn::sprite_tiles_ptr
std::shared_ptr like smart pointer that retains shared ownership of the tiles of a sprite.
template<>
struct bn::hash<sprite_tiles_ptr>
Hash support for sprite_tiles_ptr.
class bn::sprites_mosaic_horizontal_stretch_manager
Manages the horizontal stretch of the mosaic applied to the sprites.
class bn::sprites_mosaic_horizontal_stretch_to_action
Modifies the horizontal stretch of the mosaic applied to the sprites until it has a given state.
class bn::sprites_mosaic_horizontal_stretch_loop_action
Modifies the horizontal stretch of the mosaic applied to the sprites from a minimum to a maximum. When the horizontal stretch is equal to the given final state, it goes back to its initial state and vice versa.
class bn::sprites_mosaic_horizontal_stretch_toggle_action
Changes the horizontal stretch of the mosaic applied to the sprites when the action is updated a given number of times.
class bn::sprites_mosaic_vertical_stretch_manager
Manages the vertical stretch of the mosaic applied to the sprites.
class bn::sprites_mosaic_vertical_stretch_to_action
Modifies the vertical stretch of the mosaic applied to the sprites until it has a given state.
class bn::sprites_mosaic_vertical_stretch_loop_action
Modifies the vertical stretch of the mosaic applied to the sprites from a minimum to a maximum. When the vertical stretch is equal to the given final state, it goes back to its initial state and vice versa.
class bn::sprites_mosaic_vertical_stretch_toggle_action
Changes the vertical stretch of the mosaic applied to the sprites when the action is updated a given number of times.
class bn::sprites_mosaic_stretch_manager
Manages the stretch of the mosaic applied to the sprites.
class bn::sprites_mosaic_stretch_to_action
Modifies the stretch of the mosaic applied to the sprites until it has a given state.
class bn::sprites_mosaic_stretch_loop_action
Modifies the stretch of the mosaic applied to the sprites from a minimum to a maximum. When the stretch is equal to the given final state, it goes back to its initial state and vice versa.
class bn::sprites_mosaic_stretch_toggle_action
Changes the stretch of the mosaic applied to the sprites when the action is updated a given number of times.

Enums

enum class sprite_double_size_mode: uint8_t { AUTO, ENABLED, DISABLED }
Specifies the area a sprite uses to be drawn when it has an attached sprite_affine_mat_ptr.
enum class sprite_shape: uint8_t { SQUARE, WIDE, TALL }
Valid sprite shapes enum.
enum class sprite_size: uint8_t { SMALL, NORMAL, BIG, HUGE }
Valid sprite sizes enum.

Functions

template<typename ... Args>
auto create_sprite_animate_action_once(const sprite_ptr& sprite, int wait_updates, const sprite_tiles_item& tiles_item, Args ... graphics_indexes) -> auto
Generates a sprite_animate_action which loops over the given sprite tile sets only once.
template<typename ... Args>
auto create_sprite_animate_action_once(sprite_ptr&& sprite, int wait_updates, const sprite_tiles_item& tiles_item, Args ... graphics_indexes) -> auto
Generates a sprite_animate_action which loops over the given sprite tile sets only once.
template<typename ... Args>
auto create_sprite_animate_action_forever(const sprite_ptr& sprite, int wait_updates, const sprite_tiles_item& tiles_item, Args ... graphics_indexes) -> auto
Generates a sprite_animate_action which loops over the given sprite tile sets forever.
template<typename ... Args>
auto create_sprite_animate_action_forever(sprite_ptr&& sprite, int wait_updates, const sprite_tiles_item& tiles_item, Args ... graphics_indexes) -> auto
Generates a sprite_animate_action which loops over the given sprite tile sets forever.
template<typename ... Args>
auto create_sprite_cached_animate_action_once(const sprite_ptr& sprite, int wait_updates, const sprite_tiles_item& tiles_item, Args ... graphics_indexes) -> auto
Generates a sprite_cached_animate_action which loops over the given sprite tile sets only once.
template<typename ... Args>
auto create_sprite_cached_animate_action_once(sprite_ptr&& sprite, int wait_updates, const sprite_tiles_item& tiles_item, Args ... graphics_indexes) -> auto
Generates a sprite_cached_animate_action which loops over the given sprite tile sets only once.
template<typename ... Args>
auto create_sprite_cached_animate_action_forever(const sprite_ptr& sprite, int wait_updates, const sprite_tiles_item& tiles_item, Args ... graphics_indexes) -> auto
Generates a sprite_cached_animate_action which loops over the given sprite tile sets forever.
template<typename ... Args>
auto create_sprite_cached_animate_action_forever(sprite_ptr&& sprite, int wait_updates, const sprite_tiles_item& tiles_item, Args ... graphics_indexes) -> auto
Generates a sprite_cached_animate_action which loops over the given sprite tile sets forever.

Defines

#define BN_CFG_SPRITE_TILES_MAX_ITEMS
#define BN_CFG_SPRITE_TILES_LOG_ENABLED
#define BN_CFG_SPRITES_MAX_ITEMS
#define BN_CFG_SPRITES_MAX_SORT_LAYERS

Enum documentation

enum class sprite_double_size_mode: uint8_t

Specifies the area a sprite uses to be drawn when it has an attached sprite_affine_mat_ptr.

Enumerators
AUTO

The sprite uses 2x the area specified by its shape and size only when its sprite_affine_mat_ptr requires it.

ENABLED

The sprite always uses 2x the area specified by its shape and size.

DISABLED

The sprite never uses more pixels than the area specified by its shape and size.

enum class sprite_shape: uint8_t

Valid sprite shapes enum.

enum class sprite_size: uint8_t

Valid sprite sizes enum.

Function documentation

template<typename ... Args>
auto create_sprite_animate_action_once(const sprite_ptr& sprite, int wait_updates, const sprite_tiles_item& tiles_item, Args ... graphics_indexes)

Generates a sprite_animate_action which loops over the given sprite tile sets only once.

Parameters
sprite sprite_ptr to copy.
wait_updates Number of times the action must be updated before changing the tiles of the given sprite_ptr.
tiles_item It creates the new sprite tiles to use by the given sprite_ptr.
graphics_indexes Indexes of the tile sets to reference in tiles_item.
Returns The requested sprite_animate_action.

template<typename ... Args>
auto create_sprite_animate_action_once(sprite_ptr&& sprite, int wait_updates, const sprite_tiles_item& tiles_item, Args ... graphics_indexes)

Generates a sprite_animate_action which loops over the given sprite tile sets only once.

Parameters
sprite sprite_ptr to move.
wait_updates Number of times the action must be updated before changing the tiles of the given sprite_ptr.
tiles_item It creates the new sprite tiles to use by the given sprite_ptr.
graphics_indexes Indexes of the tile sets to reference in tiles_item.
Returns The requested sprite_animate_action.

template<typename ... Args>
auto create_sprite_animate_action_forever(const sprite_ptr& sprite, int wait_updates, const sprite_tiles_item& tiles_item, Args ... graphics_indexes)

Generates a sprite_animate_action which loops over the given sprite tile sets forever.

Parameters
sprite sprite_ptr to copy.
wait_updates Number of times the action must be updated before changing the tiles of the given sprite_ptr.
tiles_item It creates the new sprite tiles to use by the given sprite_ptr.
graphics_indexes Indexes of the tile sets to reference in tiles_item.
Returns The requested sprite_animate_action.

template<typename ... Args>
auto create_sprite_animate_action_forever(sprite_ptr&& sprite, int wait_updates, const sprite_tiles_item& tiles_item, Args ... graphics_indexes)

Generates a sprite_animate_action which loops over the given sprite tile sets forever.

Parameters
sprite sprite_ptr to move.
wait_updates Number of times the action must be updated before changing the tiles of the given sprite_ptr.
tiles_item It creates the new sprite tiles to use by the given sprite_ptr.
graphics_indexes Indexes of the tile sets to reference in tiles_item.
Returns The requested sprite_animate_action.

template<typename ... Args>
auto create_sprite_cached_animate_action_once(const sprite_ptr& sprite, int wait_updates, const sprite_tiles_item& tiles_item, Args ... graphics_indexes)

Generates a sprite_cached_animate_action which loops over the given sprite tile sets only once.

Parameters
sprite sprite_ptr to copy.
wait_updates Number of times the action must be updated before changing the tiles of the given sprite_ptr.
tiles_item It creates the new sprite tiles to use by the given sprite_ptr.
graphics_indexes Indexes of the tile sets to reference in tiles_item.
Returns The requested sprite_cached_animate_action.

template<typename ... Args>
auto create_sprite_cached_animate_action_once(sprite_ptr&& sprite, int wait_updates, const sprite_tiles_item& tiles_item, Args ... graphics_indexes)

Generates a sprite_cached_animate_action which loops over the given sprite tile sets only once.

Parameters
sprite sprite_ptr to move.
wait_updates Number of times the action must be updated before changing the tiles of the given sprite_ptr.
tiles_item It creates the new sprite tiles to use by the given sprite_ptr.
graphics_indexes Indexes of the tile sets to reference in tiles_item.
Returns The requested sprite_cached_animate_action.

template<typename ... Args>
auto create_sprite_cached_animate_action_forever(const sprite_ptr& sprite, int wait_updates, const sprite_tiles_item& tiles_item, Args ... graphics_indexes)

Generates a sprite_cached_animate_action which loops over the given sprite tile sets forever.

Parameters
sprite sprite_ptr to copy.
wait_updates Number of times the action must be updated before changing the tiles of the given sprite_ptr.
tiles_item It creates the new sprite tiles to use by the given sprite_ptr.
graphics_indexes Indexes of the tile sets to reference in tiles_item.
Returns The requested sprite_cached_animate_action.

template<typename ... Args>
auto create_sprite_cached_animate_action_forever(sprite_ptr&& sprite, int wait_updates, const sprite_tiles_item& tiles_item, Args ... graphics_indexes)

Generates a sprite_cached_animate_action which loops over the given sprite tile sets forever.

Parameters
sprite sprite_ptr to move.
wait_updates Number of times the action must be updated before changing the tiles of the given sprite_ptr.
tiles_item It creates the new sprite tiles to use by the given sprite_ptr.
graphics_indexes Indexes of the tile sets to reference in tiles_item.
Returns The requested sprite_cached_animate_action.

Define documentation

#define BN_CFG_SPRITE_TILES_MAX_ITEMS

Specifies the maximum number of sprite tile sets that can be created with bn::sprite_tiles_ptr static constructors.

#define BN_CFG_SPRITE_TILES_LOG_ENABLED

Specifies if the sprite tiles manager must be logged in detail or not.

Keep in mind that it is very slow, it is useful only for debugging.

#define BN_CFG_SPRITES_MAX_ITEMS

Specifies the maximum number of sprite items that can be created with bn::sprite_ptr static constructors.

A sprite item which is outside of the screen or hidden is not committed to the GBA, so there can be more than 128 sprite items.

#define BN_CFG_SPRITES_MAX_SORT_LAYERS

Specifies the maximum number of used sprite sort layers.

Sprites are grouped in layers depending of their background priority and z order, so to reduce memory usage and improve performance, please use as less unique z orders as possible.