bn::sprites namespace

Sprites related functions.

Functions

auto used_items_count() -> int
Returns the number of used sprite items created with sprite_ptr static constructors.
auto available_items_count() -> int
Returns the number of available sprite items that can be created with sprite_ptr static constructors.
auto min_bg_priority() -> int constexpr
auto max_bg_priority() -> int constexpr
auto min_z_order() -> int constexpr
auto max_z_order() -> int constexpr
auto visible() -> bool
Indicates if the sprite layer is visible or not.
void set_visible(bool visible)
Sets if the sprite layer is visible or not.
auto blending_bottom_enabled() -> bool
Indicates if the sprite layer is part of the blending bottom layer or not.
void set_blending_bottom_enabled(bool blending_bottom_enabled)
Sets if the sprite layer must be part of the blending bottom layer or not.
auto reserved_handles_count() -> int
Returns the number of hardware sprite handles not used by Butano sprites manager.
void set_reserved_handles_count(int reserved_handles_count)
Sets the number of hardware sprite handles not used by Butano sprites manager.
void reload()
Reloads the internal attributes of all sprites (including the reserved ones).

Function documentation

int bn::sprites::used_items_count()

Returns the number of used sprite items created with 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.

int bn::sprites::available_items_count()

Returns the number of available sprite items that can be created with 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.

int bn::sprites::min_bg_priority() constexpr

Returns Returns the minimum priority of a sprite relative to backgrounds.

int bn::sprites::max_bg_priority() constexpr

Returns Returns the maximum priority of a sprite relative to backgrounds.

int bn::sprites::min_z_order() constexpr

Returns Returns the minimum priority of a sprite relative to other sprites.

int bn::sprites::max_z_order() constexpr

Returns Returns the maximum priority of a sprite relative to other sprites.

int bn::sprites::reserved_handles_count()

Returns the number of hardware sprite handles not used by Butano sprites manager.

Normally you should not need to reserve handles, but it can be useful for messing with HDMA for example.

void bn::sprites::set_reserved_handles_count(int reserved_handles_count)

Sets the number of hardware sprite handles not used by Butano sprites manager.

Normally you should not need to reserve handles, but it can be useful for messing with HDMA for example.

Changing reserved handles count reloads the internal attributes of all sprites (including the reserved ones).

void bn::sprites::reload()

Reloads the internal attributes of all sprites (including the reserved ones).

Normally you should not need to call this function, but it can be useful after messing with HDMA for example.