bn::mosaic_attributes class

Manages the attributes to commit to the GBA mosaic register.

Constructors, destructors, conversion operators

mosaic_attributes() defaulted constexpr
Default constructor.
mosaic_attributes(fixed sprites_horizontal_stretch, fixed sprites_vertical_stretch, fixed bgs_horizontal_stretch, fixed bgs_vertical_stretch) constexpr
Constructor.

Public functions

auto sprites_horizontal_stretch() const -> fixed constexpr
Returns the horizontal stretch of the mosaic applied to the sprites.
void set_sprites_horizontal_stretch(fixed horizontal_stretch) constexpr
Sets the horizontal stretch of the mosaic applied to the sprites.
auto sprites_vertical_stretch() const -> fixed constexpr
Returns the vertical stretch of the mosaic applied to the sprites.
void set_sprites_vertical_stretch(fixed vertical_stretch) constexpr
Sets the vertical stretch of the mosaic applied to the sprites.
void set_sprites_stretch(fixed stretch) constexpr
Sets the stretch of the mosaic applied to the sprites.
void set_sprites_stretch(fixed horizontal_stretch, fixed vertical_stretch) constexpr
Sets the stretch of the mosaic applied to the sprites.
auto bgs_horizontal_stretch() const -> fixed constexpr
Returns the horizontal stretch of the mosaic applied to the backgrounds.
void set_bgs_horizontal_stretch(fixed horizontal_stretch) constexpr
Sets the horizontal stretch of the mosaic applied to the backgrounds.
auto bgs_vertical_stretch() const -> fixed constexpr
Returns the vertical stretch of the mosaic applied to the backgrounds.
void set_bgs_vertical_stretch(fixed vertical_stretch) constexpr
Sets the vertical stretch of the mosaic applied to the backgrounds.
void set_bgs_stretch(fixed stretch) constexpr
Sets the stretch of the mosaic applied to the backgrounds.
void set_bgs_stretch(fixed horizontal_stretch, fixed vertical_stretch) constexpr
Sets the stretch of the mosaic applied to the backgrounds.
void set_horizontal_stretch(fixed horizontal_stretch) constexpr
Sets the horizontal stretch of the mosaic applied to both sprites and backgrounds.
void set_vertical_stretch(fixed vertical_stretch) constexpr
Sets the vertical stretch of the mosaic applied to both sprites and backgrounds.
void set_stretch(fixed stretch) constexpr
Sets the stretch of the mosaic applied to both sprites and backgrounds.
void set_stretch(fixed horizontal_stretch, fixed vertical_stretch) constexpr
Sets the stretch of the mosaic applied to both sprites and backgrounds.

Friends

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

Function documentation

bn::mosaic_attributes::mosaic_attributes(fixed sprites_horizontal_stretch, fixed sprites_vertical_stretch, fixed bgs_horizontal_stretch, fixed bgs_vertical_stretch) constexpr

Constructor.

Parameters
sprites_horizontal_stretch Horizontal stretch of the mosaic applied to the sprites, in the range [0..1].
sprites_vertical_stretch Vertical stretch of the mosaic applied to the sprites, in the range [0..1].
bgs_horizontal_stretch Horizontal stretch of the mosaic applied to the backgrounds, in the range [0..1].
bgs_vertical_stretch Vertical stretch of the mosaic applied to the backgrounds, in the range [0..1].

void bn::mosaic_attributes::set_sprites_horizontal_stretch(fixed horizontal_stretch) constexpr

Sets the horizontal stretch of the mosaic applied to the sprites.

Parameters
horizontal_stretch Horizontal stretch in the range [0..1].

void bn::mosaic_attributes::set_sprites_vertical_stretch(fixed vertical_stretch) constexpr

Sets the vertical stretch of the mosaic applied to the sprites.

Parameters
vertical_stretch Vertical stretch in the range [0..1].

void bn::mosaic_attributes::set_sprites_stretch(fixed stretch) constexpr

Sets the stretch of the mosaic applied to the sprites.

Parameters
stretch Stretch in the range [0..1].

void bn::mosaic_attributes::set_sprites_stretch(fixed horizontal_stretch, fixed vertical_stretch) constexpr

Sets the stretch of the mosaic applied to the sprites.

Parameters
horizontal_stretch Horizontal stretch in the range [0..1].
vertical_stretch Vertical stretch in the range [0..1].

void bn::mosaic_attributes::set_bgs_horizontal_stretch(fixed horizontal_stretch) constexpr

Sets the horizontal stretch of the mosaic applied to the backgrounds.

Parameters
horizontal_stretch Horizontal stretch in the range [0..1].

void bn::mosaic_attributes::set_bgs_vertical_stretch(fixed vertical_stretch) constexpr

Sets the vertical stretch of the mosaic applied to the backgrounds.

Parameters
vertical_stretch Vertical stretch in the range [0..1].

void bn::mosaic_attributes::set_bgs_stretch(fixed stretch) constexpr

Sets the stretch of the mosaic applied to the backgrounds.

Parameters
stretch Stretch in the range [0..1].

void bn::mosaic_attributes::set_bgs_stretch(fixed horizontal_stretch, fixed vertical_stretch) constexpr

Sets the stretch of the mosaic applied to the backgrounds.

Parameters
horizontal_stretch Horizontal stretch in the range [0..1].
vertical_stretch Vertical stretch in the range [0..1].

void bn::mosaic_attributes::set_horizontal_stretch(fixed horizontal_stretch) constexpr

Sets the horizontal stretch of the mosaic applied to both sprites and backgrounds.

Parameters
horizontal_stretch Horizontal stretch in the range [0..1].

void bn::mosaic_attributes::set_vertical_stretch(fixed vertical_stretch) constexpr

Sets the vertical stretch of the mosaic applied to both sprites and backgrounds.

Parameters
vertical_stretch Vertical stretch in the range [0..1].

void bn::mosaic_attributes::set_stretch(fixed stretch) constexpr

Sets the stretch of the mosaic applied to both sprites and backgrounds.

Parameters
stretch Stretch in the range [0..1].

void bn::mosaic_attributes::set_stretch(fixed horizontal_stretch, fixed vertical_stretch) constexpr

Sets the stretch of the mosaic applied to both sprites and backgrounds.

Parameters
horizontal_stretch Horizontal stretch in the range [0..1].
vertical_stretch Vertical stretch in the range [0..1].