bn::palette_bitmap_bg_attributes_hbe_ptr class

std::shared_ptr like smart pointer that retains shared ownership of a H-Blank effect which changes the attributes to commit to the GBA register of a palette bitmap background in each screen horizontal line.

Base classes

class hbe_ptr
std::shared_ptr like smart pointer that retains shared ownership of a H-Blank effect.

Public static functions

static auto create(palette_bitmap_bg_ptr bg, const span<const bitmap_bg_attributes>& attributes_ref) -> palette_bitmap_bg_attributes_hbe_ptr
Creates a palette_bitmap_bg_attributes_hbe_ptr which changes the attributes to commit to the GBA register of a palette bitmap background in each screen horizontal line.
static auto create_optional(palette_bitmap_bg_ptr bg, const span<const bitmap_bg_attributes>& attributes_ref) -> optional<palette_bitmap_bg_attributes_hbe_ptr>
Creates a palette_bitmap_bg_attributes_hbe_ptr which changes the attributes to commit to the GBA register of a palette bitmap background in each screen horizontal line.

Public functions

auto bg() const -> const palette_bitmap_bg_ptr&
Returns the affine background modified by this H-Blank effect.
auto attributes_ref() const -> span<const bitmap_bg_attributes>
Returns the referenced array of 160 bitmap_bg_attributes objects with the attributes to commit to the GBA register of the managed background in each screen horizontal line.
void set_attributes_ref(const span<const bitmap_bg_attributes>& attributes_ref)
Sets the reference to an array of 160 bitmap_bg_attributes objects with the attributes to commit to the GBA register of the managed background in each screen horizontal line.
void reload_attributes_ref()
Rereads the content of the referenced attributes to the GBA register of the managed background in each screen horizontal line.
void swap(palette_bitmap_bg_attributes_hbe_ptr& other)
Exchanges the contents of this palette_bitmap_bg_attributes_hbe_ptr with those of the other one.

Friends

void swap(palette_bitmap_bg_attributes_hbe_ptr& a, palette_bitmap_bg_attributes_hbe_ptr& b)
Exchanges the contents of a palette_bitmap_bg_attributes_hbe_ptr with those of another one.

Function documentation

static palette_bitmap_bg_attributes_hbe_ptr bn::palette_bitmap_bg_attributes_hbe_ptr::create(palette_bitmap_bg_ptr bg, const span<const bitmap_bg_attributes>& attributes_ref)

Creates a palette_bitmap_bg_attributes_hbe_ptr which changes the attributes to commit to the GBA register of a palette bitmap background in each screen horizontal line.

Parameters
bg Background to be modified.
attributes_ref Reference to an array of 160 bitmap_bg_attributes objects with the attributes to commit to the GBA register of the given background in each screen horizontal line.
Returns The requested palette_bitmap_bg_attributes_hbe_ptr.

The attributes are not copied but referenced, so they should outlive the palette_bitmap_bg_attributes_hbe_ptr to avoid dangling references.

static optional<palette_bitmap_bg_attributes_hbe_ptr> bn::palette_bitmap_bg_attributes_hbe_ptr::create_optional(palette_bitmap_bg_ptr bg, const span<const bitmap_bg_attributes>& attributes_ref)

Creates a palette_bitmap_bg_attributes_hbe_ptr which changes the attributes to commit to the GBA register of a palette bitmap background in each screen horizontal line.

Parameters
bg Background to be modified.
attributes_ref Reference to an array of 160 bitmap_bg_attributes objects with the attributes to commit to the GBA register of the given background in each screen horizontal line.
Returns The requested palette_bitmap_bg_attributes_hbe_ptr if it could be allocated; bn::nullopt otherwise.

The attributes are not copied but referenced, so they should outlive the palette_bitmap_bg_attributes_hbe_ptr to avoid dangling references.

span<const bitmap_bg_attributes> bn::palette_bitmap_bg_attributes_hbe_ptr::attributes_ref() const

Returns the referenced array of 160 bitmap_bg_attributes objects with the attributes to commit to the GBA register of the managed background in each screen horizontal line.

The attributes are not copied but referenced, so they should outlive the palette_bitmap_bg_attributes_hbe_ptr to avoid dangling references.

void bn::palette_bitmap_bg_attributes_hbe_ptr::set_attributes_ref(const span<const bitmap_bg_attributes>& attributes_ref)

Sets the reference to an array of 160 bitmap_bg_attributes objects with the attributes to commit to the GBA register of the managed background in each screen horizontal line.

The attributes are not copied but referenced, so they should outlive the palette_bitmap_bg_attributes_hbe_ptr to avoid dangling references.

void bn::palette_bitmap_bg_attributes_hbe_ptr::reload_attributes_ref()

Rereads the content of the referenced attributes to the GBA register of the managed background in each screen horizontal line.

The attributes are not copied but referenced, so they should outlive the palette_bitmap_bg_attributes_hbe_ptr to avoid dangling references.

void bn::palette_bitmap_bg_attributes_hbe_ptr::swap(palette_bitmap_bg_attributes_hbe_ptr& other)

Exchanges the contents of this palette_bitmap_bg_attributes_hbe_ptr with those of the other one.

Parameters
other palette_bitmap_bg_attributes_hbe_ptr to exchange the contents with.

void swap(palette_bitmap_bg_attributes_hbe_ptr& a, palette_bitmap_bg_attributes_hbe_ptr& b)

Exchanges the contents of a palette_bitmap_bg_attributes_hbe_ptr with those of another one.

Parameters
a First palette_bitmap_bg_attributes_hbe_ptr to exchange the contents with.
b Second palette_bitmap_bg_attributes_hbe_ptr to exchange the contents with.