bn::sprite_affine_mat_attributes_hbe_ptr class

std::shared_ptr like smart pointer that retains shared ownership of a H-Blank effect which changes the attributes of a sprite_affine_mat_ptr in each screen horizontal line.

Public static functions

static auto create(const sprite_affine_mat_ptr& affine_mat, const span<const affine_mat_attributes>& attributes_ref) -> sprite_affine_mat_attributes_hbe_ptr
Creates a sprite_affine_mat_attributes_hbe_ptr which changes the attributes of a sprite_affine_mat_ptr in each screen horizontal line.
static auto create_optional(const sprite_affine_mat_ptr& affine_mat, const span<const affine_mat_attributes>& attributes_ref) -> optional<sprite_affine_mat_attributes_hbe_ptr>
Creates a sprite_affine_mat_attributes_hbe_ptr which changes the attributes of a sprite_affine_mat_ptr in each screen horizontal line.

Public functions

auto id() const -> int
Returns the internal id.
auto visible() const -> bool
Indicates if this H-Blank effect must be committed to the GBA or not.
void set_visible(bool visible)
Sets if this H-Blank effect must be committed to the GBA or not.
auto affine_mat() const -> const sprite_affine_mat_ptr&
Returns the sprite_affine_mat_ptr modified by this H-Blank effect.
auto attributes_ref() const -> span<const affine_mat_attributes>
Returns the referenced array of 160 affine_mat_attributes objects to set to the given sprite_affine_mat_ptr in each screen horizontal line.
void set_attributes_ref(const span<const affine_mat_attributes>& attributes_ref)
Sets the reference to an array of 160 affine_mat_attributes objects to set to the given sprite_affine_mat_ptr in each screen horizontal line.
void reload_attributes_ref()
Rereads the content of the referenced attributes to set to the given sprite_affine_mat_ptr in each screen horizontal line.
void swap(sprite_affine_mat_attributes_hbe_ptr& other)
Exchanges the contents of this sprite_affine_mat_attributes_hbe_ptr with those of the other one.

Friends

void swap(sprite_affine_mat_attributes_hbe_ptr& a, sprite_affine_mat_attributes_hbe_ptr& b)
Exchanges the contents of a sprite_affine_mat_attributes_hbe_ptr with those of another one.
auto operator==(const sprite_affine_mat_attributes_hbe_ptr& a, const sprite_affine_mat_attributes_hbe_ptr& b) -> bool
Equal operator.
auto operator!=(const sprite_affine_mat_attributes_hbe_ptr& a, const sprite_affine_mat_attributes_hbe_ptr& b) -> bool
Not equal operator.

Function documentation

static sprite_affine_mat_attributes_hbe_ptr bn::sprite_affine_mat_attributes_hbe_ptr::create(const sprite_affine_mat_ptr& affine_mat, const span<const affine_mat_attributes>& attributes_ref)

Creates a sprite_affine_mat_attributes_hbe_ptr which changes the attributes of a sprite_affine_mat_ptr in each screen horizontal line.

Parameters
affine_mat sprite_affine_mat_ptr to be modified.
attributes_ref Reference to an array of 160 affine_mat_attributes objects with the attributes to set to the given sprite_affine_mat_ptr in each screen horizontal line.
Returns The requested sprite_affine_mat_attributes_hbe_ptr.

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

static optional<sprite_affine_mat_attributes_hbe_ptr> bn::sprite_affine_mat_attributes_hbe_ptr::create_optional(const sprite_affine_mat_ptr& affine_mat, const span<const affine_mat_attributes>& attributes_ref)

Creates a sprite_affine_mat_attributes_hbe_ptr which changes the attributes of a sprite_affine_mat_ptr in each screen horizontal line.

Parameters
affine_mat sprite_affine_mat_ptr to be modified.
attributes_ref Reference to an array of 160 affine_mat_attributes objects with the attributes to set to the given sprite_affine_mat_ptr in each screen horizontal line.
Returns The requested sprite_affine_mat_attributes_hbe_ptr if it could be allocated; bn::nullopt otherwise.

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

span<const affine_mat_attributes> bn::sprite_affine_mat_attributes_hbe_ptr::attributes_ref() const

Returns the referenced array of 160 affine_mat_attributes objects to set to the given sprite_affine_mat_ptr in each screen horizontal line.

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

void bn::sprite_affine_mat_attributes_hbe_ptr::set_attributes_ref(const span<const affine_mat_attributes>& attributes_ref)

Sets the reference to an array of 160 affine_mat_attributes objects to set to the given sprite_affine_mat_ptr in each screen horizontal line.

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

void bn::sprite_affine_mat_attributes_hbe_ptr::reload_attributes_ref()

Rereads the content of the referenced attributes to set to the given sprite_affine_mat_ptr in each screen horizontal line.

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

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

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

Parameters
other sprite_affine_mat_attributes_hbe_ptr to exchange the contents with.

void swap(sprite_affine_mat_attributes_hbe_ptr& a, sprite_affine_mat_attributes_hbe_ptr& b)

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

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

bool operator==(const sprite_affine_mat_attributes_hbe_ptr& a, const sprite_affine_mat_attributes_hbe_ptr& b)

Equal operator.

Parameters
a First sprite_affine_mat_attributes_hbe_ptr to compare.
b Second sprite_affine_mat_attributes_hbe_ptr to compare.
Returns true if the first sprite_affine_mat_attributes_hbe_ptr is equal to the second one, otherwise false.

bool operator!=(const sprite_affine_mat_attributes_hbe_ptr& a, const sprite_affine_mat_attributes_hbe_ptr& b)

Not equal operator.

Parameters
a First sprite_affine_mat_attributes_hbe_ptr to compare.
b Second sprite_affine_mat_attributes_hbe_ptr to compare.
Returns true if the first sprite_affine_mat_attributes_hbe_ptr is not equal to the second one, otherwise false.