bn::sprite_affine_second_attributes class

Manages the attributes to commit to the second GBA register of an affine sprite (with an attached sprite_affine_mat_ptr).

Constructors, destructors, conversion operators

sprite_affine_second_attributes(fixed x, const sprite_affine_mat_ptr& affine_mat)
Constructor.
sprite_affine_second_attributes(fixed x, sprite_affine_mat_ptr&& affine_mat)
Constructor.

Public functions

auto x() const -> fixed
Returns the horizontal position of a sprite (relative to its camera, if it has one).
void set_x(fixed x)
Sets the horizontal position of a sprite (relative to its camera, if it has one).
auto affine_mat() const -> const sprite_affine_mat_ptr&
Returns the sprite_affine_mat_ptr attached to a sprite.
void set_affine_mat(const sprite_affine_mat_ptr& affine_mat)
Sets the sprite_affine_mat_ptr attached to a sprite.
void set_affine_mat(sprite_affine_mat_ptr&& affine_mat)
Sets the sprite_affine_mat_ptr attached to a sprite.

Friends

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

Function documentation

bn::sprite_affine_second_attributes::sprite_affine_second_attributes(fixed x, const sprite_affine_mat_ptr& affine_mat)

Constructor.

Parameters
x Horizontal position of a sprite (relative to its camera, if it has one).
affine_mat Reference to the sprite_affine_mat_ptr attached to a sprite.

bn::sprite_affine_second_attributes::sprite_affine_second_attributes(fixed x, sprite_affine_mat_ptr&& affine_mat)

Constructor.

Parameters
x Horizontal position of a sprite (relative to its camera, if it has one).
affine_mat Moved reference to the sprite_affine_mat_ptr attached to a sprite.

void bn::sprite_affine_second_attributes::set_affine_mat(const sprite_affine_mat_ptr& affine_mat)

Sets the sprite_affine_mat_ptr attached to a sprite.

Parameters
affine_mat sprite_affine_mat_ptr to copy.

void bn::sprite_affine_second_attributes::set_affine_mat(sprite_affine_mat_ptr&& affine_mat)

Sets the sprite_affine_mat_ptr attached to a sprite.

Parameters
affine_mat sprite_affine_mat_ptr to move.