bn::affine_bg_attributes class

Manages the attributes to commit to the GBA register of an affine background.

Constructors, destructors, conversion operators

affine_bg_attributes(const affine_bg_map_ptr& map, int priority, bool wrapping_enabled, bool mosaic_enabled)
Constructor.
affine_bg_attributes(affine_bg_map_ptr&& map, int priority, bool wrapping_enabled, bool mosaic_enabled)
Constructor.

Public functions

auto map() const -> const affine_bg_map_ptr&
Returns the affine_bg_map_ptr of an affine background.
void set_map(const affine_bg_map_ptr& map)
Sets the affine_bg_map_ptr of an affine background.
void set_map(affine_bg_map_ptr&& map)
Sets the affine_bg_map_ptr of an affine background.
auto priority() const -> int
Returns the priority of an affine background relative to sprites and other backgrounds.
void set_priority(int priority)
Sets the priority of an affine background relative to sprites and other backgrounds.
auto wrapping_enabled() const -> bool
Indicates if an affine background wraps around at the edges or not.
void set_wrapping_enabled(bool wrapping_enabled)
Sets if an affine background must wrap around at the edges or not.
auto mosaic_enabled() const -> bool
Indicates if the mosaic effect is applied to an affine background or not.
void set_mosaic_enabled(bool mosaic_enabled)
Sets if the mosaic effect must be applied to an affine background or not.

Friends

auto operator==(const affine_bg_attributes& a, const affine_bg_attributes& b) -> bool defaulted
Default equal operator.

Function documentation

bn::affine_bg_attributes::affine_bg_attributes(const affine_bg_map_ptr& map, int priority, bool wrapping_enabled, bool mosaic_enabled)

Constructor.

Parameters
map affine_bg_map_ptr of an affine background to copy.
priority Priority of an affine background relative to sprites and other backgrounds, in the range [0..3].
wrapping_enabled Indicates if an affine background wraps around at the edges or not.
mosaic_enabled Indicates if the mosaic effect is applied to an affine background or not.

Backgrounds with higher priority are drawn first (and therefore can be covered by later sprites and backgrounds).

bn::affine_bg_attributes::affine_bg_attributes(affine_bg_map_ptr&& map, int priority, bool wrapping_enabled, bool mosaic_enabled)

Constructor.

Parameters
map affine_bg_map_ptr of an affine background to move.
priority Priority of an affine background relative to sprites and other backgrounds, in the range [0..3].
wrapping_enabled Indicates if an affine background wraps around at the edges or not.
mosaic_enabled Indicates if the mosaic effect is applied to an affine background or not.

Backgrounds with higher priority are drawn first (and therefore can be covered by later sprites and backgrounds).

void bn::affine_bg_attributes::set_map(const affine_bg_map_ptr& map)

Sets the affine_bg_map_ptr of an affine background.

Parameters
map affine_bg_map_ptr of an affine background to copy.

void bn::affine_bg_attributes::set_map(affine_bg_map_ptr&& map)

Sets the affine_bg_map_ptr of an affine background.

Parameters
map affine_bg_map_ptr of an affine background to move.

int bn::affine_bg_attributes::priority() const

Returns the priority of an affine background relative to sprites and other backgrounds.

Backgrounds with higher priority are drawn first (and therefore can be covered by later sprites and backgrounds).

void bn::affine_bg_attributes::set_priority(int priority)

Sets the priority of an affine background relative to sprites and other backgrounds.

Parameters
priority Priority in the range [0..3].

Backgrounds with higher priority are drawn first (and therefore can be covered by later sprites and backgrounds).