bn::bitmap_bg_attributes class

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

Constructors, destructors, conversion operators

bitmap_bg_attributes(int priority, bool mosaic_enabled)
Constructor.
bitmap_bg_attributes(int priority, bool mosaic_enabled, bn::green_swap_mode green_swap_mode)
Constructor.

Public functions

auto priority() const -> int
Returns the priority of a background relative to sprites and other backgrounds.
void set_priority(int priority)
Sets the priority of a background relative to sprites and other backgrounds.
auto mosaic_enabled() const -> bool
Indicates if the mosaic effect is applied to a background or not.
void set_mosaic_enabled(bool mosaic_enabled)
Sets if the mosaic effect must be applied to a background or not.
auto green_swap_mode() const -> bn::green_swap_mode
Indicates how a background must be displayed when green swap is enabled.
void set_green_swap_mode(bn::green_swap_mode green_swap_mode)
Sets how a background must be displayed when green swap is enabled.

Friends

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

Function documentation

bn::bitmap_bg_attributes::bitmap_bg_attributes(int priority, bool mosaic_enabled)

Constructor.

Parameters
priority Priority of a background relative to sprites and other backgrounds, in the range [0..3].
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::bitmap_bg_attributes::bitmap_bg_attributes(int priority, bool mosaic_enabled, bn::green_swap_mode green_swap_mode)

Constructor.

Parameters
priority Priority of a background relative to sprites and other backgrounds, in the range [0..3].
mosaic_enabled Indicates if the mosaic effect is applied to a background or not.
green_swap_mode Indicates how a background must be displayed when green swap is enabled.

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

int bn::bitmap_bg_attributes::priority() const

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

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