bn::regular_bg_attributes class

Manages the attributes to commit to the GBA register of a regular background.

Constructors, destructors, conversion operators

regular_bg_attributes(const regular_bg_map_ptr& map, int priority, bool mosaic_enabled)
Constructor.
regular_bg_attributes(regular_bg_map_ptr&& map, int priority, bool mosaic_enabled)
Constructor.

Public functions

auto map() const -> const regular_bg_map_ptr&
Returns the regular_bg_map_ptr of a regular background.
void set_map(const regular_bg_map_ptr& map)
Sets the regular_bg_map_ptr of a regular background.
void set_map(regular_bg_map_ptr&& map)
Sets the regular_bg_map_ptr of a regular background.
auto priority() const -> int
Returns the priority of a regular background relative to sprites and other backgrounds.
void set_priority(int priority)
Sets the priority of a regular background relative to sprites and other backgrounds.
auto mosaic_enabled() const -> bool
Indicates if the mosaic effect is applied to a regular background or not.
void set_mosaic_enabled(bool mosaic_enabled)
Sets if the mosaic effect must be applied to a regular background or not.

Friends

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

Function documentation

bn::regular_bg_attributes::regular_bg_attributes(const regular_bg_map_ptr& map, int priority, bool mosaic_enabled)

Constructor.

Parameters
map regular_bg_map_ptr of a regular background to copy.
priority Priority of a regular background relative to sprites and other backgrounds, in the range [0..3].
mosaic_enabled Indicates if the mosaic effect is applied to a regular background or not.

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

bn::regular_bg_attributes::regular_bg_attributes(regular_bg_map_ptr&& map, int priority, bool mosaic_enabled)

Constructor.

Parameters
map regular_bg_map_ptr of a regular background to move.
priority Priority of a regular background relative to sprites and other backgrounds, in the range [0..3].
mosaic_enabled Indicates if the mosaic effect is applied to a regular background or not.

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

void bn::regular_bg_attributes::set_map(const regular_bg_map_ptr& map)

Sets the regular_bg_map_ptr of a regular background.

Parameters
map regular_bg_map_ptr of a regular background to copy.

void bn::regular_bg_attributes::set_map(regular_bg_map_ptr&& map)

Sets the regular_bg_map_ptr of a regular background.

Parameters
map regular_bg_map_ptr of a regular background to move.

int bn::regular_bg_attributes::priority() const

Returns the priority of a regular 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::regular_bg_attributes::set_priority(int priority)

Sets the priority of a regular 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).