dp_direct_bitmap_bg_builder class
#include <bn_dp_direct_bitmap_bg_builder.h>
Creates dp_
Public functions
- auto x() const -> fixed
- Returns the horizontal position of the backgrounds to generate (relative to their camera, if they are going to have one).
-
auto set_x(fixed x) -> dp_
direct_ bitmap_ bg_ builder& - Sets the horizontal position of the backgrounds to generate (relative to their camera, if they are going to have one).
- auto y() const -> fixed
- Returns the vertical position of the backgrounds to generate (relative to their camera, if they are going to have one).
-
auto set_y(fixed y) -> dp_
direct_ bitmap_ bg_ builder& - Sets the vertical position of the backgrounds to generate (relative to their camera, if they are going to have one).
-
auto position() const -> const fixed_
point& - Returns the position of the backgrounds to generate (relative to their camera, if they are going to have one).
-
auto set_position(fixed x,
fixed y) -> dp_
direct_ bitmap_ bg_ builder& - Sets the position of the backgrounds to generate (relative to their camera, if they are going to have one).
-
auto set_position(const fixed_
point& position) -> dp_ direct_ bitmap_ bg_ builder& - Sets the position of the backgrounds to generate (relative to their camera, if they are going to have one).
- auto top_left_x() const -> fixed
- Returns the horizontal top-left position of the backgrounds to generate (relative to their camera, if they are going to have one).
-
auto set_top_left_x(fixed top_left_x) -> dp_
direct_ bitmap_ bg_ builder& - Sets the horizontal top-left position of the backgrounds to generate (relative to their camera, if they are going to have one).
- auto top_left_y() const -> fixed
- Returns the vertical top-left position of the backgrounds to generate (relative to their camera, if they are going to have one).
-
auto set_top_left_y(fixed top_left_y) -> dp_
direct_ bitmap_ bg_ builder& - Sets the vertical top-left position of the backgrounds to generate (relative to their camera, if they are going to have one).
-
auto top_left_position() const -> fixed_
point - Returns the top-left position of the backgrounds to generate (relative to their camera, if they are going to have one).
-
auto set_top_left_position(fixed top_left_x,
fixed top_left_y) -> dp_
direct_ bitmap_ bg_ builder& - Sets the top-left position of the backgrounds to generate (relative to their camera, if they are going to have one).
-
auto set_top_left_position(const fixed_
point& top_left_position) -> dp_ direct_ bitmap_ bg_ builder& - Sets the top-left position of the backgrounds to generate (relative to their camera, if they are going to have one).
- auto rotation_angle() const -> fixed
- Returns the rotation angle in degrees of the backgrounds to generate.
-
auto set_rotation_angle(fixed rotation_angle) -> dp_
direct_ bitmap_ bg_ builder& - Sets the rotation angle in degrees of the backgrounds to generate.
-
auto set_rotation_angle_safe(fixed rotation_angle) -> dp_
direct_ bitmap_ bg_ builder& - Sets the rotation angle in degrees of the backgrounds to generate.
- auto horizontal_scale() const -> fixed
- Returns the horizontal scale of the backgrounds to generate.
-
auto set_horizontal_scale(fixed horizontal_scale) -> dp_
direct_ bitmap_ bg_ builder& - Sets the horizontal scale of the backgrounds to generate.
- auto vertical_scale() const -> fixed
- Returns the vertical scale of the backgrounds to generate.
-
auto set_vertical_scale(fixed vertical_scale) -> dp_
direct_ bitmap_ bg_ builder& - Sets the vertical scale of the backgrounds to generate.
-
auto set_scale(fixed scale) -> dp_
direct_ bitmap_ bg_ builder& - Sets the scale of the backgrounds to generate.
-
auto set_scale(fixed horizontal_scale,
fixed vertical_scale) -> dp_
direct_ bitmap_ bg_ builder& - Sets the scale of the backgrounds to generate.
-
auto expand() -> dp_
direct_ bitmap_ bg_ builder& - Sets the scale of the backgrounds to generate to fill the screen.
- auto horizontal_shear() const -> fixed
- Returns the horizontal shear of the backgrounds to generate.
-
auto set_horizontal_shear(fixed horizontal_shear) -> dp_
direct_ bitmap_ bg_ builder& - Sets the horizontal shear of the backgrounds to generate.
- auto vertical_shear() const -> fixed
- Returns the vertical shear of the backgrounds to generate.
-
auto set_vertical_shear(fixed vertical_shear) -> dp_
direct_ bitmap_ bg_ builder& - Sets the vertical shear of the backgrounds to generate.
-
auto set_shear(fixed shear) -> dp_
direct_ bitmap_ bg_ builder& - Sets the shear of the backgrounds to generate.
-
auto set_shear(fixed horizontal_shear,
fixed vertical_shear) -> dp_
direct_ bitmap_ bg_ builder& - Sets the shear of the backgrounds to generate.
- auto horizontal_flip() const -> bool
- Indicates if the backgrounds to generate are flipped in the horizontal axis or not.
-
auto set_horizontal_flip(bool horizontal_flip) -> dp_
direct_ bitmap_ bg_ builder& - Sets if the backgrounds to generate must be flipped in the horizontal axis or not.
- auto vertical_flip() const -> bool
- Indicates if the backgrounds to generate are flipped in the vertical axis or not.
-
auto set_vertical_flip(bool vertical_flip) -> dp_
direct_ bitmap_ bg_ builder& - Sets if the backgrounds to generate must be flipped in the vertical axis or not.
- auto pivot_x() const -> fixed
- Returns the horizontal position of the affine transformations pivot point of the backgrounds to generate.
- void set_pivot_x(fixed pivot_x)
- Sets the horizontal position of the affine transformations pivot point of the backgrounds to generate.
- auto pivot_y() const -> fixed
- Returns the vertical position of the affine transformations pivot point of the backgrounds to generate.
- void set_pivot_y(fixed pivot_y)
- Sets the vertical position of the affine transformations pivot point of the backgrounds to generate.
-
auto pivot_position() const -> const fixed_
point& - Returns the position of the affine transformations pivot point of the backgrounds to generate.
- void set_pivot_position(fixed pivot_x, fixed pivot_y)
- Sets the position of the affine transformations pivot point of the backgrounds to generate.
-
void set_pivot_position(const fixed_
point& pivot_position) - Sets the position of the affine transformations pivot point of the backgrounds to generate.
-
auto mat_attributes() const -> const affine_
mat_ attributes& - Returns the attributes of the affine transformation matrix of the backgrounds to generate.
-
auto set_affine_mat(const affine_
mat_ attributes& mat_attributes) -> dp_ direct_ bitmap_ bg_ builder& - Sets the attributes of the affine transformation matrix of the backgrounds to generate.
- auto priority() const -> int
- Returns the priority of the backgrounds to generate relative to sprites and other backgrounds.
-
auto set_priority(int priority) -> dp_
direct_ bitmap_ bg_ builder& - Sets the priority of the backgrounds to generate relative to sprites and other backgrounds.
- auto mosaic_enabled() const -> bool
- Indicates if the mosaic effect must be applied to the backgrounds to generate or not.
-
auto set_mosaic_enabled(bool mosaic_enabled) -> dp_
direct_ bitmap_ bg_ builder& - Sets if the mosaic effect must be applied to the backgrounds to generate or not.
- auto blending_enabled() const -> bool
- Indicates if blending must be applied to the backgrounds to generate or not.
-
auto set_blending_enabled(bool blending_enabled) -> dp_
direct_ bitmap_ bg_ builder& - Sets if blending must be applied to the backgrounds to generate or not.
- auto blending_top_enabled() const -> bool
- Indicates if the backgrounds to generate must be part of the blending top layer or not.
-
auto set_blending_top_enabled(bool blending_top_enabled) -> dp_
direct_ bitmap_ bg_ builder& - Sets if the backgrounds to generate must be part of the blending top layer or not.
- auto blending_bottom_enabled() const -> bool
- Indicates if the backgrounds to generate must be part of the blending bottom layer or not.
-
auto set_blending_bottom_enabled(bool blending_bottom_enabled) -> dp_
direct_ bitmap_ bg_ builder& - Sets if the backgrounds to generate must be part of the blending bottom layer or not.
-
auto green_swap_mode() const -> bn::
green_swap_mode - Indicates how the backgrounds to generate must be displayed when green swap is enabled.
-
auto set_green_swap_mode(bn::
green_swap_mode green_swap_mode) -> dp_ direct_ bitmap_ bg_ builder& - Sets how the backgrounds to generate must be displayed when green swap is enabled.
- auto visible() const -> bool
- Indicates if the backgrounds to generate must be committed to the GBA or not.
-
auto set_visible(bool visible) -> dp_
direct_ bitmap_ bg_ builder& - Sets if the backgrounds to generate must be committed to the GBA or not.
-
auto camera() const -> const optional<camera_
ptr>& - Returns the camera_
ptr to attach to the backgrounds to generate (if any). -
auto set_camera(const camera_
ptr& camera) -> dp_ direct_ bitmap_ bg_ builder& - Sets the camera_
ptr to attach to the backgrounds to generate. -
auto set_camera(camera_
ptr&& camera) -> dp_ direct_ bitmap_ bg_ builder& - Sets the camera_
ptr to attach to the backgrounds to generate. -
auto set_camera(const optional<camera_
ptr>& camera) -> dp_ direct_ bitmap_ bg_ builder& - Sets or removes the camera_
ptr to attach to the backgrounds to generate. -
auto set_camera(optional<camera_
ptr>&& camera) -> dp_ direct_ bitmap_ bg_ builder& - Sets or removes the camera_
ptr to attach to the backgrounds to generate. -
auto remove_camera() -> dp_
direct_ bitmap_ bg_ builder& - Removes the camera_
ptr to attach to the backgrounds to generate. -
auto release_camera() -> optional<camera_
ptr> - Releases and returns the camera_
ptr to attach to the backgrounds to generate (if any). -
auto build() const -> dp_
direct_ bitmap_ bg_ ptr - Generates and returns a dp_
direct_ bitmap_ bg_ ptr without releasing the acquired resources. -
auto release_build() -> dp_
direct_ bitmap_ bg_ ptr - Generates and returns a dp_
direct_ bitmap_ bg_ ptr releasing the acquired resources. -
auto build_optional() const -> optional<dp_
direct_ bitmap_ bg_ ptr> - Generates and returns a dp_
direct_ bitmap_ bg_ ptr without releasing the acquired resources if it could be allocated; bn:: nullopt otherwise. -
auto release_build_optional() -> optional<dp_
direct_ bitmap_ bg_ ptr> - Generates and returns a dp_
direct_ bitmap_ bg_ ptr releasing the acquired resources if it could be allocated; bn:: nullopt otherwise.
Function documentation
dp_ direct_ bitmap_ bg_ builder& bn:: dp_direct_bitmap_bg_builder:: set_x(fixed x)
Sets the horizontal position of the backgrounds to generate (relative to their camera, if they are going to have one).
| Parameters | |
|---|---|
| x | Horizontal position of the backgrounds to generate. |
| Returns | Reference to this. |
dp_ direct_ bitmap_ bg_ builder& bn:: dp_direct_bitmap_bg_builder:: set_y(fixed y)
Sets the vertical position of the backgrounds to generate (relative to their camera, if they are going to have one).
| Parameters | |
|---|---|
| y | vertical position of the backgrounds to generate. |
| Returns | Reference to this. |
dp_ direct_ bitmap_ bg_ builder& bn:: dp_direct_bitmap_bg_builder:: set_position(fixed x,
fixed y)
Sets the position of the backgrounds to generate (relative to their camera, if they are going to have one).
| Parameters | |
|---|---|
| x | Horizontal position of the backgrounds to generate. |
| y | Vertical position of the backgrounds to generate. |
| Returns | Reference to this. |
dp_ direct_ bitmap_ bg_ builder& bn:: dp_direct_bitmap_bg_builder:: set_position(const fixed_ point& position)
Sets the position of the backgrounds to generate (relative to their camera, if they are going to have one).
| Parameters | |
|---|---|
| position | Position of the backgrounds to generate. |
| Returns | Reference to this. |
dp_ direct_ bitmap_ bg_ builder& bn:: dp_direct_bitmap_bg_builder:: set_top_left_x(fixed top_left_x)
Sets the horizontal top-left position of the backgrounds to generate (relative to their camera, if they are going to have one).
| Parameters | |
|---|---|
| top_left_x | Horizontal top-left position of the backgrounds to generate. |
| Returns | Reference to this. |
dp_ direct_ bitmap_ bg_ builder& bn:: dp_direct_bitmap_bg_builder:: set_top_left_y(fixed top_left_y)
Sets the vertical top-left position of the backgrounds to generate (relative to their camera, if they are going to have one).
| Parameters | |
|---|---|
| top_left_y | Vertical top-left position of the backgrounds to generate. |
| Returns | Reference to this. |
dp_ direct_ bitmap_ bg_ builder& bn:: dp_direct_bitmap_bg_builder:: set_top_left_position(fixed top_left_x,
fixed top_left_y)
Sets the top-left position of the backgrounds to generate (relative to their camera, if they are going to have one).
| Parameters | |
|---|---|
| top_left_x | Horizontal top-left position of the backgrounds to generate. |
| top_left_y | Vertical top-left position of the backgrounds to generate. |
| Returns | Reference to this. |
dp_ direct_ bitmap_ bg_ builder& bn:: dp_direct_bitmap_bg_builder:: set_top_left_position(const fixed_ point& top_left_position)
Sets the top-left position of the backgrounds to generate (relative to their camera, if they are going to have one).
| Parameters | |
|---|---|
| top_left_position | Top-left position of the backgrounds to generate. |
| Returns | Reference to this. |
dp_ direct_ bitmap_ bg_ builder& bn:: dp_direct_bitmap_bg_builder:: set_rotation_angle(fixed rotation_angle)
Sets the rotation angle in degrees of the backgrounds to generate.
| Parameters | |
|---|---|
| rotation_angle | Rotation angle in degrees, in the range [0..360]. |
| Returns | Reference to this. |
dp_ direct_ bitmap_ bg_ builder& bn:: dp_direct_bitmap_bg_builder:: set_rotation_angle_safe(fixed rotation_angle)
Sets the rotation angle in degrees of the backgrounds to generate.
| Parameters | |
|---|---|
| rotation_angle | Rotation angle in degrees, in any range. |
| Returns | Reference to this. |
dp_ direct_ bitmap_ bg_ builder& bn:: dp_direct_bitmap_bg_builder:: set_horizontal_scale(fixed horizontal_scale)
Sets the horizontal scale of the backgrounds to generate.
| Parameters | |
|---|---|
| horizontal_scale | Horizontal scale of the backgrounds to generate. |
| Returns | Reference to this. |
dp_ direct_ bitmap_ bg_ builder& bn:: dp_direct_bitmap_bg_builder:: set_vertical_scale(fixed vertical_scale)
Sets the vertical scale of the backgrounds to generate.
| Parameters | |
|---|---|
| vertical_scale | Vertical scale of the backgrounds to generate. |
| Returns | Reference to this. |
dp_ direct_ bitmap_ bg_ builder& bn:: dp_direct_bitmap_bg_builder:: set_scale(fixed scale)
Sets the scale of the backgrounds to generate.
| Parameters | |
|---|---|
| scale | Scale of the backgrounds to generate. |
| Returns | Reference to this. |
dp_ direct_ bitmap_ bg_ builder& bn:: dp_direct_bitmap_bg_builder:: set_scale(fixed horizontal_scale,
fixed vertical_scale)
Sets the scale of the backgrounds to generate.
| Parameters | |
|---|---|
| horizontal_scale | Horizontal scale of the backgrounds to generate. |
| vertical_scale | Vertical scale of the backgrounds to generate. |
| Returns | Reference to this. |
dp_ direct_ bitmap_ bg_ builder& bn:: dp_direct_bitmap_bg_builder:: expand()
Sets the scale of the backgrounds to generate to fill the screen.
| Returns | Reference to this. |
|---|
dp_ direct_ bitmap_ bg_ builder& bn:: dp_direct_bitmap_bg_builder:: set_horizontal_shear(fixed horizontal_shear)
Sets the horizontal shear of the backgrounds to generate.
| Parameters | |
|---|---|
| horizontal_shear | Horizontal shear of the backgrounds to generate. |
| Returns | Reference to this. |
dp_ direct_ bitmap_ bg_ builder& bn:: dp_direct_bitmap_bg_builder:: set_vertical_shear(fixed vertical_shear)
Sets the vertical shear of the backgrounds to generate.
| Parameters | |
|---|---|
| vertical_shear | Vertical shear of the backgrounds to generate. |
| Returns | Reference to this. |
dp_ direct_ bitmap_ bg_ builder& bn:: dp_direct_bitmap_bg_builder:: set_shear(fixed shear)
Sets the shear of the backgrounds to generate.
| Parameters | |
|---|---|
| shear | Shear of the backgrounds to generate. |
| Returns | Reference to this. |
dp_ direct_ bitmap_ bg_ builder& bn:: dp_direct_bitmap_bg_builder:: set_shear(fixed horizontal_shear,
fixed vertical_shear)
Sets the shear of the backgrounds to generate.
| Parameters | |
|---|---|
| horizontal_shear | Horizontal shear of the backgrounds to generate. |
| vertical_shear | Vertical shear of the backgrounds to generate. |
| Returns | Reference to this. |
dp_ direct_ bitmap_ bg_ builder& bn:: dp_direct_bitmap_bg_builder:: set_horizontal_flip(bool horizontal_flip)
Sets if the backgrounds to generate must be flipped in the horizontal axis or not.
| Parameters | |
|---|---|
| horizontal_flip | true if the backgrounds must be flipped in the horizontal axis; false otherwise. |
| Returns | Reference to this. |
dp_ direct_ bitmap_ bg_ builder& bn:: dp_direct_bitmap_bg_builder:: set_vertical_flip(bool vertical_flip)
Sets if the backgrounds to generate must be flipped in the vertical axis or not.
| Parameters | |
|---|---|
| vertical_flip | true if the backgrounds must be flipped in the vertical axis; false otherwise. |
| Returns | Reference to this. |
void bn:: dp_direct_bitmap_bg_builder:: set_pivot_position(fixed pivot_x,
fixed pivot_y)
Sets the position of the affine transformations pivot point of the backgrounds to generate.
| Parameters | |
|---|---|
| pivot_x | Horizontal position of the pivot point. |
| pivot_y | Vertical position of the pivot point. |
void bn:: dp_direct_bitmap_bg_builder:: set_pivot_position(const fixed_ point& pivot_position)
Sets the position of the affine transformations pivot point of the backgrounds to generate.
| Parameters | |
|---|---|
| pivot_position | Position of the pivot point. |
dp_ direct_ bitmap_ bg_ builder& bn:: dp_direct_bitmap_bg_builder:: set_affine_mat(const affine_ mat_ attributes& mat_attributes)
Sets the attributes of the affine transformation matrix of the backgrounds to generate.
| Parameters | |
|---|---|
| mat_attributes | affine_ |
| Returns | Reference to this. |
int bn:: dp_direct_bitmap_bg_builder:: priority() const
Returns the priority of the backgrounds to generate relative to sprites and other backgrounds.
Backgrounds with higher priority are drawn first (and therefore can be covered by later sprites and backgrounds).
dp_ direct_ bitmap_ bg_ builder& bn:: dp_direct_bitmap_bg_builder:: set_priority(int priority)
Sets the priority of the backgrounds to generate relative to sprites and other backgrounds.
| Parameters | |
|---|---|
| priority | Priority in the range [0..3]. |
| Returns | Reference to this. |
Backgrounds with higher priority are drawn first (and therefore can be covered by later sprites and backgrounds).
dp_ direct_ bitmap_ bg_ builder& bn:: dp_direct_bitmap_bg_builder:: set_mosaic_enabled(bool mosaic_enabled)
Sets if the mosaic effect must be applied to the backgrounds to generate or not.
| Parameters | |
|---|---|
| mosaic_enabled | true if the mosaic effect must be applied; false otherwise. |
| Returns | Reference to this. |
bool bn:: dp_direct_bitmap_bg_builder:: blending_enabled() const
Indicates if blending must be applied to the backgrounds to generate or not.
Blending is applied to backgrounds by making them part of the blending top layer.
dp_ direct_ bitmap_ bg_ builder& bn:: dp_direct_bitmap_bg_builder:: set_blending_enabled(bool blending_enabled)
Sets if blending must be applied to the backgrounds to generate or not.
| Parameters | |
|---|---|
| blending_enabled | true if blending must be applied; false otherwise. |
| Returns | Reference to this. |
Blending is applied to backgrounds by making them part of the blending top layer.
dp_ direct_ bitmap_ bg_ builder& bn:: dp_direct_bitmap_bg_builder:: set_blending_top_enabled(bool blending_top_enabled)
Sets if the backgrounds to generate must be part of the blending top layer or not.
| Parameters | |
|---|---|
| blending_top_enabled | true if generated backgrounds must be part of the blending top layer; false otherwise. |
| Returns | Reference to this. |
dp_ direct_ bitmap_ bg_ builder& bn:: dp_direct_bitmap_bg_builder:: set_blending_bottom_enabled(bool blending_bottom_enabled)
Sets if the backgrounds to generate must be part of the blending bottom layer or not.
| Parameters | |
|---|---|
| blending_bottom_enabled | true if generated backgrounds must be part of the blending bottom layer; false otherwise. |
| Returns | Reference to this. |
dp_ direct_ bitmap_ bg_ builder& bn:: dp_direct_bitmap_bg_builder:: set_green_swap_mode(bn:: green_swap_mode green_swap_mode)
Sets how the backgrounds to generate must be displayed when green swap is enabled.
| Parameters | |
|---|---|
| green_swap_mode | Green swap mode. |
| Returns | Reference to this. |
dp_ direct_ bitmap_ bg_ builder& bn:: dp_direct_bitmap_bg_builder:: set_visible(bool visible)
Sets if the backgrounds to generate must be committed to the GBA or not.
| Parameters | |
|---|---|
| visible | true if the backgrounds must be committed to the GBA; false otherwise. |
| Returns | Reference to this. |
dp_ direct_ bitmap_ bg_ builder& bn:: dp_direct_bitmap_bg_builder:: set_camera(const camera_ ptr& camera)
Sets the camera_
| Parameters | |
|---|---|
| camera | camera_ |
| Returns | Reference to this. |
dp_ direct_ bitmap_ bg_ builder& bn:: dp_direct_bitmap_bg_builder:: set_camera(camera_ ptr&& camera)
Sets the camera_
| Parameters | |
|---|---|
| camera | camera_ |
| Returns | Reference to this. |
dp_ direct_ bitmap_ bg_ builder& bn:: dp_direct_bitmap_bg_builder:: set_camera(const optional<camera_ ptr>& camera)
Sets or removes the camera_
| Parameters | |
|---|---|
| camera | Optional camera_ |
| Returns | Reference to this. |
dp_ direct_ bitmap_ bg_ builder& bn:: dp_direct_bitmap_bg_builder:: set_camera(optional<camera_ ptr>&& camera)
Sets or removes the camera_
| Parameters | |
|---|---|
| camera | Optional camera_ |
| Returns | Reference to this. |
dp_ direct_ bitmap_ bg_ builder& bn:: dp_direct_bitmap_bg_builder:: remove_camera()
Removes the camera_
| Returns | Reference to this. |
|---|
dp_ direct_ bitmap_ bg_ ptr bn:: dp_direct_bitmap_bg_builder:: release_build()
Generates and returns a dp_
dp_
optional<dp_ direct_ bitmap_ bg_ ptr> bn:: dp_direct_bitmap_bg_builder:: release_build_optional()
Generates and returns a dp_
dp_