class
#include <bn_sprite_third_attributes.h>
sprite_third_attributes Manages the attributes to commit to the third GBA register of a sprite.
Constructors, destructors, conversion operators
-
sprite_third_attributes(sprite_
tiles_ ptr tiles, sprite_ palette_ ptr palette, int bg_priority) - Constructor.
Public functions
-
auto tiles() const -> const sprite_
tiles_ ptr& - Returns the smart pointer to a sprite tile set.
-
void set_tiles(const sprite_
tiles_ ptr& tiles) - Sets the smart pointer to a sprite tile set.
-
void set_tiles(sprite_
tiles_ ptr&& tiles) - Sets the smart pointer to a sprite tile set.
-
auto palette() const -> const sprite_
palette_ ptr& - Returns the smart pointer to a sprite color palette.
-
void set_palette(const sprite_
palette_ ptr& palette) - Sets the smart pointer to a sprite color palette.
-
void set_palette(sprite_
palette_ ptr&& palette) - Sets the smart pointer to a sprite color palette.
- auto bg_priority() const -> int
- Returns the priority relative to backgrounds.
- void set_bg_priority(int bg_priority)
- Sets the priority relative to backgrounds.
Friends
-
auto operator==(const sprite_
third_ attributes& a, const sprite_ third_ attributes& b) -> bool defaulted - Default equal operator.
Function documentation
bn:: sprite_third_attributes:: sprite_third_attributes(sprite_ tiles_ ptr tiles,
sprite_ palette_ ptr palette,
int bg_priority)
Constructor.
Parameters | |
---|---|
tiles | Smart pointer to a sprite tile set. |
palette | Smart pointer to a sprite color palette. |
bg_priority | Drawing priority relative to backgrounds in the range [0..3]. |
Sprites with higher priority are drawn first (and therefore can be covered by later sprites and backgrounds). Sprites cover backgrounds of the same priority.
void bn:: sprite_third_attributes:: set_tiles(const sprite_ tiles_ ptr& tiles)
Sets the smart pointer to a sprite tile set.
Parameters | |
---|---|
tiles | Smart pointer to copy. |
void bn:: sprite_third_attributes:: set_tiles(sprite_ tiles_ ptr&& tiles)
Sets the smart pointer to a sprite tile set.
Parameters | |
---|---|
tiles | Smart pointer to move. |
void bn:: sprite_third_attributes:: set_palette(const sprite_ palette_ ptr& palette)
Sets the smart pointer to a sprite color palette.
Parameters | |
---|---|
palette | Smart pointer to copy. |
void bn:: sprite_third_attributes:: set_palette(sprite_ palette_ ptr&& palette)
Sets the smart pointer to a sprite color palette.
Parameters | |
---|---|
palette | Smart pointer to move. |
int bn:: sprite_third_attributes:: bg_priority() const
Returns the priority relative to backgrounds.
Sprites with higher priority are drawn first (and therefore can be covered by later sprites and backgrounds). Sprites cover backgrounds of the same priority.
void bn:: sprite_third_attributes:: set_bg_priority(int bg_priority)
Sets the priority relative to backgrounds.
Parameters | |
---|---|
bg_priority | Priority relative to backgrounds in the range [0..3]. |
Sprites with higher priority are drawn first (and therefore can be covered by later sprites and backgrounds). Sprites cover backgrounds of the same priority.