### Basic GBA Initialization and VBlank Wait Source: https://github.com/gvaliente/butano/blob/master/butano/hw/3rd_party/stdgba/README.md This example demonstrates basic GBA setup, including interrupt handling and display configuration for vertical blanking interrupts. It requires including specific GBA headers. ```cpp #include #include #include int main() { gba::irq_handler = {}; gba::reg_dispstat = {.enable_irq_vblank = true}; gba::reg_ie = {.vblank = true}; gba::reg_ime = true; while (true) { gba::VBlankIntrWait(); } } ``` -------------------------------- ### AGB ABI Library Quick Start Example Source: https://github.com/gvaliente/butano/blob/master/butano/hw/3rd_party/agbabi/README.md Demonstrates basic usage of AGB ABI and aeabi functions, including integer division, square root, and context switching. Ensure to link with libagbabi.a and include the necessary headers. ```c #include #include #include /* POSIX context switching */ int main() { unsigned int a = __aeabi_uidiv(9u, 3u); int b = __agbabi_sqrt(25u); ucontext_t c; getcontext(&c); return 0; } ``` -------------------------------- ### Install Make Package Source: https://github.com/gvaliente/butano/blob/master/docs/getting_started_wt.html Installs the 'make' utility using pacman within the Wonderful Toolchain Shell. This is a prerequisite for building projects. ```bash pacman -S make ``` -------------------------------- ### Build Butano Example Source: https://github.com/gvaliente/butano/blob/master/docs/getting_started_wt.html Compiles a Butano example project using make. Adjust the '-j' flag based on your CPU's core count for faster compilation. ```bash make -j8 ``` -------------------------------- ### Install GBA Toolchain (Ubuntu) Source: https://github.com/gvaliente/butano/blob/master/butano/hw/3rd_party/libugba/readme.rst Installs the necessary GCC toolchain for GBA development on Ubuntu systems. ```bash sudo apt install gcc-arm-none-eabi ``` -------------------------------- ### Install GBA Target and Toolchain Source: https://github.com/gvaliente/butano/blob/master/docs/getting_started_wt.html Installs the GBA development target and the BlocksDS toolchain. These are essential for compiling GBA projects. ```bash wf-pacman -S target-gba ``` ```bash wf-pacman -S blocksds-toolchain ``` -------------------------------- ### Constructor Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1bg__palettes__brightness__loop__action.html Initializes the bn::bg_palettes_brightness_loop_action with a duration and a final brightness. ```APIDOC ## bn::bg_palettes_brightness_loop_action::bg_palettes_brightness_loop_action ### Description Constructor. ### Parameters * **duration_updates** (int) - How many times the action has to be updated before changing the direction of the brightness delta. * **final_brightness** (bn::fixed) - When the brightness is equal to this parameter, it goes back to its initial state and vice versa. This brightness must be in the range [0..1]. ``` -------------------------------- ### Update and Install Wonderful Toolchain Packages Source: https://github.com/gvaliente/butano/blob/master/docs/getting_started_wt.html Updates the package list and installs essential tools for the Wonderful Toolchain. Run these commands in the Wonderful Toolchain Shell. ```bash wf-pacman -Syu wf-tools ``` ```bash wf-pacman -Syu ``` -------------------------------- ### Constructor Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1blending__transparency__bottom__weight__loop__action.html Initializes the blending_transparency_bottom_weight_loop_action with a duration and a final weight. ```APIDOC ## bn::blending_transparency_bottom_weight_loop_action(int duration_updates, bn::fixed final_transparency_bottom_weight) ### Description Constructor for the blending_transparency_bottom_weight_loop_action. ### Parameters - **duration_updates** (int) - How many times the action has to be updated before changing the direction of the weight delta. - **final_transparency_bottom_weight** (bn::fixed) - When the weight of the transparency blending for the bottom layer is equal to this parameter, it goes back to its initial state and vice versa. This weight must be in the range [0..1]. ### Notes Keep in mind that transparency and fade blendings can't be enabled at the same time. ``` -------------------------------- ### Constructor Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1dp__direct__bitmap__bg__top__left__move__toggle__action.html Initializes the dp_direct_bitmap_bg_top_left_move_toggle_action with a background pointer, duration, and new top-left coordinates. ```APIDOC ## bn::dp_direct_bitmap_bg_top_left_move_toggle_action::dp_direct_bitmap_bg_top_left_move_toggle_action ### Description Constructor. ### Parameters - **bg** ([dp_direct_bitmap_bg_ptr](classbn_1_1dp__direct__bitmap__bg__ptr.html)) - dp_direct_bitmap_bg_ptr to copy. - **duration_updates** (int) - How many times the action has to be updated to change the top-left position of the given [dp_direct_bitmap_bg_ptr](classbn_1_1dp__direct__bitmap__bg__ptr.html). - **new_top_left_x** ([fixed](namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9)) - New horizontal top-left position when the action is updated duration_updates times. - **new_top_left_y** ([fixed](namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9)) - New vertical top-left position when the action is updated duration_updates times. ``` -------------------------------- ### get Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1rumble__manager.html Indicates if rumble is enabled or not. ```APIDOC ## get ### Description Indicates if rumble is enabled or not. ### Signature ```cpp static auto get() -> bool ``` ``` -------------------------------- ### Build PC Library (Linux/MinGW/Cygwin) Source: https://github.com/gvaliente/butano/blob/master/butano/hw/3rd_party/libugba/readme.rst Builds the PC version of the libugba library using CMake and Make. Ensure SDL2, Lua, and libpng development libraries are installed. ```bash sudo apt install libsdl2-dev liblua5.4-dev libpng-dev ``` ```bash git clone https://github.com/AntonioND/libugba cd libugba ``` ```bash mkdir build cd build cmake .. -DBUILD_GBA=OFF make -j`nproc` ``` -------------------------------- ### Constructors Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1palette__bitmap__bg__builder.html Initializes the palette_bitmap_bg_builder with palette information. ```APIDOC ## Constructors ### bn::palette_bitmap_bg_builder(const bn::bg_palette_item& palette_item) Constructor that initializes the builder with a `bg_palette_item`. Parameters: - `palette_item`: A `bg_palette_item` containing the required information to generate the palette used by the generated backgrounds. ### bn::palette_bitmap_bg_builder(const bn::bg_palette_ptr& palette) Constructor that initializes the builder by copying a `bg_palette_ptr`. Parameters: - `palette`: A `bg_palette_ptr` to copy for the generated backgrounds. ### bn::palette_bitmap_bg_builder(bn::bg_palette_ptr&& palette) Constructor that initializes the builder by moving a `bg_palette_ptr`. Parameters: - `palette`: A `bg_palette_ptr` to move for the generated backgrounds. ``` -------------------------------- ### get Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1sprites__visible__manager.html Indicates if the sprite layer is visible or not. ```APIDOC ## get ### Description Indicates if the sprite layer is visible or not. ### Method static auto get() -> bool ### Return Value Returns `true` if the sprite layer is visible, `false` otherwise. ``` -------------------------------- ### Constructor (move) Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1dp__direct__bitmap__bg__top__left__move__loop__action.html Initializes the action by moving a dp_direct_bitmap_bg_ptr and setting the duration for movement changes. ```APIDOC ## bn::dp_direct_bitmap_bg_top_left_move_loop_action::dp_direct_bitmap_bg_top_left_move_loop_action ### Description Constructor. ### Parameters * **bg** ([dp_direct_bitmap_bg_ptr](classbn_1_1dp__direct__bitmap__bg__ptr.html)&&) - dp_direct_bitmap_bg_ptr to move. * **duration_updates** (int) - How many times the action has to be updated before changing the direction of the top-left position delta. * **final_top_left_x** ([fixed](namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9)) - When the horizontal top-left position of the given [dp_direct_bitmap_bg_ptr](classbn_1_1dp__direct__bitmap__bg__ptr.html) is equal to this parameter, it goes back to its initial state and vice versa. * **final_top_left_y** ([fixed](namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9)) - When the vertical top-left position of the given [dp_direct_bitmap_bg_ptr](classbn_1_1dp__direct__bitmap__bg__ptr.html) is equal to this parameter, it goes back to its initial state and vice versa. ``` -------------------------------- ### get Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1sp__direct__bitmap__bg__position__manager.html Returns the position of the given sp_direct_bitmap_bg_ptr. ```APIDOC ## get ### Description Returns the position of the given [sp_direct_bitmap_bg_ptr](classbn_1_1sp__direct__bitmap__bg__ptr.html). ### Signature ```cpp static auto bn::sp_direct_bitmap_bg_position_manager::get(const bn::sp_direct_bitmap_bg_ptr& bg) -> const bn::fixed_point& ``` ### Parameters * **bg** ([sp_direct_bitmap_bg_ptr](classbn_1_1sp__direct__bitmap__bg__ptr.html) &) - The background pointer whose position is to be retrieved. ``` -------------------------------- ### Constructor (copy) Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1dp__direct__bitmap__bg__top__left__move__loop__action.html Initializes the action by copying a dp_direct_bitmap_bg_ptr and setting the duration for movement changes. ```APIDOC ## bn::dp_direct_bitmap_bg_top_left_move_loop_action::dp_direct_bitmap_bg_top_left_move_loop_action ### Description Constructor. ### Parameters * **bg** ([dp_direct_bitmap_bg_ptr](classbn_1_1dp__direct__bitmap__bg__ptr.html)) - dp_direct_bitmap_bg_ptr to copy. * **duration_updates** (int) - How many times the action has to be updated before changing the direction of the top-left position delta. * **final_top_left_x** ([fixed](namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9)) - When the horizontal top-left position of the given [dp_direct_bitmap_bg_ptr](classbn_1_1dp__direct__bitmap__bg__ptr.html) is equal to this parameter, it goes back to its initial state and vice versa. * **final_top_left_y** ([fixed](namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9)) - When the vertical top-left position of the given [dp_direct_bitmap_bg_ptr](classbn_1_1dp__direct__bitmap__bg__ptr.html) is equal to this parameter, it goes back to its initial state and vice versa. ``` -------------------------------- ### get Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1sound__speed__manager.html Returns the speed of the given sound_handle. ```APIDOC ## get ### Description Returns the speed of the given sound_handle. ### Signature ```cpp static auto get(sound_handle handle) -> fixed ``` ### Parameters * **handle** (sound_handle) - The handle of the sound effect. ### Returns * (fixed) - The speed of the sound effect. ``` -------------------------------- ### get Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1sound__panning__manager.html Returns the panning of the given sound_handle. ```APIDOC ## get ### Description Returns the panning of the given sound_handle. ### Method static auto get(sound_handle handle) -> fixed ### Parameters #### Path Parameters - **handle** (sound_handle) - Description not available ``` -------------------------------- ### Constructor (move with position) Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1dp__direct__bitmap__bg__top__left__move__loop__action.html Initializes the action by moving a dp_direct_bitmap_bg_ptr and setting a final top-left position for the loop. ```APIDOC ## bn::dp_direct_bitmap_bg_top_left_move_loop_action::dp_direct_bitmap_bg_top_left_move_loop_action ### Description Constructor. ### Parameters * **bg** ([dp_direct_bitmap_bg_ptr](classbn_1_1dp__direct__bitmap__bg__ptr.html)&&) - dp_direct_bitmap_bg_ptr to move. * **duration_updates** (int) - How many times the action has to be updated before changing the direction of the top-left position delta. * **final_top_left_position** (const [fixed_point](namespacebn.html#a9d90d92eb951850d75801f5508fc8e90)&) - When the top-left position of the given [dp_direct_bitmap_bg_ptr](classbn_1_1dp__direct__bitmap__bg__ptr.html) is equal to this parameter, it goes back to its initial state and vice versa. ``` -------------------------------- ### bn::affine_bg_scale_to_action Constructor (move) Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1affine__bg__scale__to__action.html Constructs an affine_bg_scale_to_action by moving an affine_bg_ptr. The action will modify the scale of this background over a given number of updates until it reaches the final scale. ```APIDOC ## bn::affine_bg_scale_to_action::affine_bg_scale_to_action(affine_bg_ptr&& bg, int duration_updates, fixed final_scale) ### Description Constructor. ### Parameters - **bg** (affine_bg_ptr) - affine_bg_ptr to move. - **duration_updates** (int) - Number of times that the action must be updated until the scale of the given affine_bg_ptr is equal to final_scale. - **final_scale** (fixed) - Scale when the action is updated duration_updates times. ``` -------------------------------- ### get Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1regular__bg__position__manager.html Returns the position of the given regular_bg_ptr. ```APIDOC ## get ### Description Returns the position of the given [regular_bg_ptr](classbn_1_1regular__bg__ptr.html). ### Method Signature `static auto bn::regular_bg_position_manager::get(const bn::regular_bg_ptr& bg) -> const bn::fixed_point&` ### Parameters * **bg** (const [regular_bg_ptr](classbn_1_1regular__bg__ptr.html)&) - The regular background pointer whose position is to be retrieved. ### Returns * (const [fixed_point](namespacebn.html#a9d90d92eb951850d75801f5508fc8e90)&) - The current position of the regular background pointer. ``` -------------------------------- ### Constructors Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1dp__direct__bitmap__bg__painter.html Initializes a new instance of the dp_direct_bitmap_bg_painter class. ```APIDOC ## dp_direct_bitmap_bg_painter(const dp_direct_bitmap_bg_ptr& bg) ### Description Class constructor. ### Parameters * **bg** (const [dp_direct_bitmap_bg_ptr](classbn_1_1dp__direct__bitmap__bg__ptr.html)&) - The background to be painted. ``` ```APIDOC ## dp_direct_bitmap_bg_painter(dp_direct_bitmap_bg_ptr&& bg) ### Description Class constructor. ### Parameters * **bg** (dp_direct_bitmap_bg_ptr&&) - The background to be painted. ``` ```APIDOC ## dp_direct_bitmap_bg_painter(dp_direct_bitmap_bg_painter&& other) noexcept ### Description Move constructor. ### Parameters * **other** (dp_direct_bitmap_bg_painter&&) - The object to move from. ``` -------------------------------- ### priority Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1palette__bitmap__bg__builder.html Gets the drawing priority of the backgrounds. ```APIDOC ## priority ### Description 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). ``` -------------------------------- ### get Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1dp__direct__bitmap__bg__position__manager.html Returns the position of the given dp_direct_bitmap_bg_ptr. ```APIDOC ## get ### Description Returns the position of the given [dp_direct_bitmap_bg_ptr](classbn_1_1dp__direct__bitmap__bg__ptr.html). ### Signature ```cpp static auto bn::dp_direct_bitmap_bg_position_manager::get(const bn::dp_direct_bitmap_bg_ptr& bg) -> const bn::fixed_point& ``` ### Parameters * **bg** (const [dp_direct_bitmap_bg_ptr](classbn_1_1dp__direct__bitmap__bg__ptr.html)&) - The background pointer whose position is to be retrieved. ``` -------------------------------- ### Constructor Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1sprite__palettes__contrast__loop__action.html Initializes the sprite palettes contrast loop action with a duration and a final contrast value. ```APIDOC ## bn::sprite_palettes_contrast_loop_action(int duration_updates, bn::fixed final_contrast) ### Description Constructor for the sprite palettes contrast loop action. ### Parameters - **duration_updates** (int) - Required - How many times the action has to be updated before changing the direction of the contrast delta. - **final_contrast** (bn::fixed) - Required - When the contrast is equal to this parameter, it goes back to its initial state and vice versa. This contrast must be in the range [0..1]. ``` -------------------------------- ### Static Creation Methods Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1palette__bitmap__bg__pb__register__hbe__ptr.html Methods for creating instances of palette_bitmap_bg_pb_register_hbe_ptr, with and without optional return types. ```APIDOC ## Static Functions ### `create` Creates a `palette_bitmap_bg_pb_register_hbe_ptr` which changes the attributes to commit to the second GBA register of a `palette_bitmap_bg_ptr`. **Parameters** * `bg` (`palette_bitmap_bg_ptr`): The background to modify. * `attributes_ref` (`span`): A reference to the span of attributes. **Returns** * `palette_bitmap_bg_pb_register_hbe_ptr`: The created H-Blank effect pointer. ### `create` Creates a `palette_bitmap_bg_pb_register_hbe_ptr` which changes the values to commit to the second GBA register of a `palette_bitmap_bg_ptr`. **Parameters** * `bg` (`palette_bitmap_bg_ptr`): The background to modify. * `values_ref` (`span`): A reference to the span of values. **Returns** * `palette_bitmap_bg_pb_register_hbe_ptr`: The created H-Blank effect pointer. ### `create_optional` Creates an optional `palette_bitmap_bg_pb_register_hbe_ptr` which changes the attributes to commit to the second GBA register of a `palette_bitmap_bg_ptr`. **Parameters** * `bg` (`palette_bitmap_bg_ptr`): The background to modify. * `attributes_ref` (`span`): A reference to the span of attributes. **Returns** * `optional`: An optional H-Blank effect pointer. ### `create_optional` Creates an optional `palette_bitmap_bg_pb_register_hbe_ptr` which changes the values to commit to the second GBA register of a `palette_bitmap_bg_ptr`. **Parameters** * `bg` (`palette_bitmap_bg_ptr`): The background to modify. * `values_ref` (`span`): A reference to the span of values. **Returns** * `optional`: An optional H-Blank effect pointer. ``` -------------------------------- ### get Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1sprite__visible__manager.html Indicates if the given sprite_ptr is committed to the GBA or not. ```APIDOC ## get ### Description Indicates if the given sprite_ptr is committed to the GBA or not. ### Signature ```cpp static auto get(const sprite_ptr& sprite) -> bool ``` ### Parameters * **sprite** (const sprite_ptr&): The sprite pointer to check. ### Returns * bool: True if the sprite is committed to the GBA, false otherwise. ``` -------------------------------- ### bn::palette_bitmap_bg_move_loop_action Constructors Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1palette__bitmap__bg__move__loop__action.html Provides documentation for the different constructors of the bn::palette_bitmap_bg_move_loop_action class, allowing for initialization with various parameter types. ```APIDOC ## bn::palette_bitmap_bg_move_loop_action::palette_bitmap_bg_move_loop_action ### Description Constructor for creating a looping background move action. ### Parameters - **bg** ([palette_bitmap_bg_ptr](classbn_1_1palette__bitmap__bg__ptr.html)&&) - The palette bitmap background pointer to move. - **duration_updates** (int) - The number of updates before changing the direction of the position delta. - **final_x** ([fixed](namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9)) - The final X position at which the movement reverses. - **final_y** ([fixed](namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9)) - The final Y position at which the movement reverses. ``` ```APIDOC ## bn::palette_bitmap_bg_move_loop_action::palette_bitmap_bg_move_loop_action ### Description Constructor for creating a looping background move action with a fixed point for final position. ### Parameters - **bg** (const [palette_bitmap_bg_ptr](classbn_1_1palette__bitmap__bg__ptr.html)&) - The palette bitmap background pointer to copy. - **duration_updates** (int) - The number of updates before changing the direction of the position delta. - **final_position** (const [fixed_point](namespacebn.html#a9d90d92eb951850d75801f5508fc8e90)&) - The final position (x, y) at which the movement reverses. ``` ```APIDOC ## bn::palette_bitmap_bg_move_loop_action::palette_bitmap_bg_move_loop_action ### Description Constructor for creating a looping background move action with a fixed point for final position, taking ownership of the background pointer. ### Parameters - **bg** ([palette_bitmap_bg_ptr](classbn_1_1palette__bitmap__bg__ptr.html)&&) - The palette bitmap background pointer to move. - **duration_updates** (int) - The number of updates before changing the direction of the position delta. - **final_position** (const [fixed_point](namespacebn.html#a9d90d92eb951850d75801f5508fc8e90)&) - The final position (x, y) at which the movement reverses. ``` -------------------------------- ### get Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1sprite__vertical__scale__manager.html Retrieves the current vertical scale of a sprite. ```APIDOC ## get ### Description Returns the vertical scale of the given [sprite_ptr](classbn_1_1sprite__ptr.html). ### Signature `static auto bn::sprite_vertical_scale_manager::get(const bn::sprite_ptr& sprite) -> bn::fixed` ``` -------------------------------- ### bn::bg_palette_grayscale_to_action Constructors Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1bg__palette__grayscale__to__action.html Constructors for the bn::bg_palette_grayscale_to_action class. ```APIDOC ## bn::bg_palette_grayscale_to_action::bg_palette_grayscale_to_action ### Description Constructor. ### Parameters - **palette** ([bg_palette_ptr](classbn_1_1bg__palette__ptr.html)) - Copy of the bg_palette_ptr. - **duration_updates** (int) - Number of times the action must be updated until the intensity is equal to final_intensity. - **final_intensity** ([fixed](namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9)) - Intensity when the action is updated duration_updates times. This intensity must be in the range [0..1]. ``` ```APIDOC ## bn::bg_palette_grayscale_to_action::bg_palette_grayscale_to_action ### Description Constructor. ### Parameters - **palette** ([bg_palette_ptr](classbn_1_1bg__palette__ptr.html) &&) - Moved bg_palette_ptr. - **duration_updates** (int) - Number of times the action must be updated until the intensity is equal to final_intensity. - **final_intensity** ([fixed](namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9)) - Intensity when the action is updated duration_updates times. This intensity must be in the range [0..1]. ``` -------------------------------- ### get Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1sprite__scale__manager.html Returns the horizontal scale of the given sprite_ptr. ```APIDOC ## get ### Description Returns the horizontal scale of the given sprite_ptr. ### Signature ```cpp static auto get(const sprite_ptr& sprite) -> fixed ``` ### Parameters * **sprite** (const sprite_ptr&): The sprite to get the scale from. ``` -------------------------------- ### Constructors Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1affine__bg__scale__loop__action.html Constructs an affine background scale loop action. ```APIDOC ## bn::affine_bg_scale_loop_action::affine_bg_scale_loop_action(const bn::affine_bg_ptr& bg, int duration_updates, bn::fixed final_scale) ### Description Constructor. ### Parameters * **bg** (bn::affine_bg_ptr) - bn::affine_bg_ptr to copy. * **duration_updates** (int) - How many times the action has to be updated before changing the direction of the scale delta. * **final_scale** (bn::fixed) - When the scale of the given bn::affine_bg_ptr is equal to this parameter, it goes back to its initial state and vice versa. ``` ```APIDIDOC ## bn::affine_bg_scale_loop_action::affine_bg_scale_loop_action(bn::affine_bg_ptr&& bg, int duration_updates, bn::fixed final_scale) ### Description Constructor. ### Parameters * **bg** (bn::affine_bg_ptr) - bn::affine_bg_ptr to move. * **duration_updates** (int) - How many times the action has to be updated before changing the direction of the scale delta. * **final_scale** (bn::fixed) - When the scale of the given bn::affine_bg_ptr is equal to this parameter, it goes back to its initial state and vice versa. ``` -------------------------------- ### x Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1sprite__affine__second__attributes.html Gets or sets the horizontal position of the sprite. ```APIDOC ## fixed bn::sprite_affine_second_attributes::x ### Description Returns the horizontal position of a sprite (relative to its camera, if it has one). ## void bn::sprite_affine_second_attributes::set_x ### Description Sets the horizontal position of a sprite (relative to its camera, if it has one). ### Parameters * **x** (fixed) - The new horizontal position. ``` -------------------------------- ### get Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1sprite__affine__mat__shear__manager.html Returns the horizontal shear of the given sprite_affine_mat_ptr. ```APIDOC ## get ### Description Returns the horizontal shear of the given [sprite_affine_mat_ptr](classbn_1_1sprite__affine__mat__ptr.html). ### Signature ```cpp static auto get(const [sprite_affine_mat_ptr](classbn_1_1sprite__affine__mat__ptr.html)& affine_mat) -> [fixed](namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9) ``` ### Parameters * **affine_mat** ([sprite_affine_mat_ptr](classbn_1_1sprite__affine__mat__ptr.html)&) - The affine matrix to get the shear from. ``` -------------------------------- ### Constructor (copy with position) Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1dp__direct__bitmap__bg__top__left__move__loop__action.html Initializes the action by copying a dp_direct_bitmap_bg_ptr and setting a final top-left position for the loop. ```APIDOC ## bn::dp_direct_bitmap_bg_top_left_move_loop_action::dp_direct_bitmap_bg_top_left_move_loop_action ### Description Constructor. ### Parameters * **bg** ([dp_direct_bitmap_bg_ptr](classbn_1_1dp__direct__bitmap__bg__ptr.html)) - dp_direct_bitmap_bg_ptr to copy. * **duration_updates** (int) - How many times the action has to be updated before changing the direction of the top-left position delta. * **final_top_left_position** (const [fixed_point](namespacebn.html#a9d90d92eb951850d75801f5508fc8e90)&) - When the top-left position of the given [dp_direct_bitmap_bg_ptr](classbn_1_1dp__direct__bitmap__bg__ptr.html) is equal to this parameter, it goes back to its initial state and vice versa. ``` -------------------------------- ### Constructor Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1bgs__mosaic__horizontal__stretch__to__action.html Initializes the action with a duration and a target horizontal stretch. ```APIDOC ## bn::bgs_mosaic_horizontal_stretch_to_action::bgs_mosaic_horizontal_stretch_to_action ### Description Constructor. ### Parameters - **duration_updates** (int) - Number of times that the action must be updated until the horizontal stretch is equal to final_horizontal_stretch. - **final_horizontal_stretch** (fixed) - Horizontal stretch when the action is updated duration_updates times. This horizontal stretch must be in the range [0..1]. ``` -------------------------------- ### get Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1sp__direct__bitmap__bg__vertical__shear__manager.html Returns the vertical shear of the given sp_direct_bitmap_bg_ptr. ```APIDOC ## get ### Description Returns the vertical shear of the given [sp_direct_bitmap_bg_ptr](classbn_1_1sp__direct__bitmap__bg__ptr.html). ### Method static auto get(const [sp_direct_bitmap_bg_ptr](classbn_1_1sp__direct__bitmap__bg__ptr.html)& bg) -> [fixed](namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9) ### Parameters #### Path Parameters - **bg** ([sp_direct_bitmap_bg_ptr](classbn_1_1sp__direct__bitmap__bg__ptr.html)) - The background pointer. ### Return Value [fixed](namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9) - The vertical shear value. ``` -------------------------------- ### bn::affine_bg_scale_to_action Constructor (copy) Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1affine__bg__scale__to__action.html Constructs an affine_bg_scale_to_action by copying an affine_bg_ptr. The action will modify the scale of this background over a given number of updates until it reaches the final scale. ```APIDOC ## bn::affine_bg_scale_to_action::affine_bg_scale_to_action(const affine_bg_ptr& bg, int duration_updates, fixed final_scale) ### Description Constructor. ### Parameters - **bg** (affine_bg_ptr) - affine_bg_ptr to copy. - **duration_updates** (int) - Number of times that the action must be updated until the scale of the given affine_bg_ptr is equal to final_scale. - **final_scale** (fixed) - scale when the action is updated duration_updates times. ``` -------------------------------- ### get Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1sp__direct__bitmap__bg__vertical__scale__manager.html Returns the vertical scale of the given sp_direct_bitmap_bg_ptr. ```APIDOC ## get ### Description Returns the vertical scale of the given [sp_direct_bitmap_bg_ptr](classbn_1_1sp__direct__bitmap__bg__ptr.html). ### Method static auto get(const [sp_direct_bitmap_bg_ptr](classbn_1_1sp__direct__bitmap__bg__ptr.html)& bg) -> [fixed](namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9) ### Parameters #### Path Parameters - **bg** ([sp_direct_bitmap_bg_ptr](classbn_1_1sp__direct__bitmap__bg__ptr.html)) - The background pointer to get the scale from. ``` -------------------------------- ### Constructor Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1bgs__mosaic__stretch__toggle__action.html Initializes a new instance of the bgs_mosaic_stretch_toggle_action class. ```APIDOC ## bn::bgs_mosaic_stretch_toggle_action::bgs_mosaic_stretch_toggle_action ### Description Constructor. ### Parameters - **duration_updates** (int) - How many times the action has to be updated to change the stretch. - **new_stretch** (fixed) - New stretch to set when the action is updated duration_updates times. This stretch must be in the range [0..1]. ``` -------------------------------- ### get Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1sp__direct__bitmap__bg__vertical__flip__manager.html Checks if a given sp_direct_bitmap_bg_ptr is flipped vertically. ```APIDOC ## get ### Description Indicates if the given [sp_direct_bitmap_bg_ptr](classbn_1_1sp__direct__bitmap__bg__ptr.html) is flipped in the vertical axis or not. ### Signature `static auto get(const [sp_direct_bitmap_bg_ptr](classbn_1_1sp__direct__bitmap__bg__ptr.html)& bg) -> bool` ### Parameters * **bg** ([sp_direct_bitmap_bg_ptr](classbn_1_1sp__direct__bitmap__bg__ptr.html)) - The background pointer to check. ### Returns `bool` - True if the background is flipped vertically, false otherwise. ``` -------------------------------- ### Constructor Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1palette__bitmap__bg__top__left__move__loop__action.html Initializes the action to modify the top-left position of a palette bitmap background. ```APIDOC ## bn::palette_bitmap_bg_top_left_move_loop_action::palette_bitmap_bg_top_left_move_loop_action ### Description Constructor. ### Parameters * **bg** ([palette_bitmap_bg_ptr](classbn_1_1palette__bitmap__bg__ptr.html)) - The palette_bitmap_bg_ptr to copy. * **duration_updates** (int) - How many times the action has to be updated before changing the direction of the top-left position delta. * **final_top_left_x** ([fixed](namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9)) - When the horizontal top-left position of the given palette_bitmap_bg_ptr is equal to this parameter, it goes back to its initial state and vice versa. * **final_top_left_y** ([fixed](namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9)) - When the vertical top-left position of the given palette_bitmap_bg_ptr is equal to this parameter, it goes back to its initial state and vice versa. ``` -------------------------------- ### get Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1sp__direct__bitmap__bg__rotation__manager.html Returns the rotation angle of the given sp_direct_bitmap_bg_ptr. ```APIDOC ## get ### Description Returns the rotation angle of the given [sp_direct_bitmap_bg_ptr](classbn_1_1sp__direct__bitmap__bg__ptr.html). ### Signature ```cpp static auto bn::sp_direct_bitmap_bg_rotation_manager::get(const bn::sp_direct_bitmap_bg_ptr& bg) -> bn::fixed ``` ### Parameters * **bg** (const [sp_direct_bitmap_bg_ptr](classbn_1_1sp__direct__bitmap__bg__ptr.html)&) - The background pointer to get the rotation angle from. ``` -------------------------------- ### get Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1sp__direct__bitmap__bg__pivot__position__manager.html Returns the position of the pivot of the given sp_direct_bitmap_bg_ptr. ```APIDOC ## get ### Description Returns the position of the pivot of the given [sp_direct_bitmap_bg_ptr](classbn_1_1sp__direct__bitmap__bg__ptr.html). ### Signature ```cpp static auto bn::sp_direct_bitmap_bg_pivot_position_manager::get(const bn::sp_direct_bitmap_bg_ptr& bg) -> const bn::fixed_point& ``` ### Parameters * **bg** (const [sp_direct_bitmap_bg_ptr](classbn_1_1sp__direct__bitmap__bg__ptr.html)&) - The sp_direct_bitmap_bg_ptr to get the pivot position from. ``` -------------------------------- ### Constructors Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1affine__bg__visible__toggle__action.html Constructs an affine background visibility toggle action. ```APIDOC ## bn::affine_bg_visible_toggle_action::affine_bg_visible_toggle_action ### Description Constructor. ### Parameters * **bg** ([affine_bg_ptr](classbn_1_1affine__bg__ptr.html)) - affine_bg_ptr to copy. * **duration_updates** (int) - How many times the action has to be updated to toggle if the given [affine_bg_ptr](classbn_1_1affine__bg__ptr.html) must be committed to the GBA or not. ## bn::affine_bg_visible_toggle_action::affine_bg_visible_toggle_action ### Description Constructor. ### Parameters * **bg** ([affine_bg_ptr](classbn_1_1affine__bg__ptr.html)&&) - affine_bg_ptr to move. * **duration_updates** (int) - How many times the action has to be updated to toggle if the given [affine_bg_ptr](classbn_1_1affine__bg__ptr.html) must be committed to the GBA or not. ``` -------------------------------- ### get Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1sp__direct__bitmap__bg__horizontal__shear__manager.html Returns the horizontal shear of the given sp_direct_bitmap_bg_ptr. ```APIDOC ## get ### Description Returns the horizontal shear of the given [sp_direct_bitmap_bg_ptr](classbn_1_1sp__direct__bitmap__bg__ptr.html). ### Signature ```cpp static auto bn::sp_direct_bitmap_bg_horizontal_shear_manager::get(const bn::sp_direct_bitmap_bg_ptr& bg) -> bn::fixed ``` ### Parameters * **bg** ([sp_direct_bitmap_bg_ptr](classbn_1_1sp__direct__bitmap__bg__ptr.html)) - The background object. ### Returns ([fixed](namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9)) The horizontal shear value. ``` -------------------------------- ### Constructors Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1sp__direct__bitmap__bg__painter.html Initializes a sp_direct_bitmap_bg_painter object. ```APIDOC ## sp_direct_bitmap_bg_painter(const sp_direct_bitmap_bg_ptr& bg) explicit ### Description Class constructor. ### Parameters * **bg** (const sp_direct_bitmap_bg_ptr&) - The background to be painted. ``` ```APIDOC ## sp_direct_bitmap_bg_painter(sp_direct_bitmap_bg_ptr&& bg) explicit ### Description Class constructor. ### Parameters * **bg** (sp_direct_bitmap_bg_ptr&&) - The background to be painted. ``` -------------------------------- ### Constructor Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1bgs__mosaic__horizontal__stretch__loop__action.html Initializes the bn::bgs_mosaic_horizontal_stretch_loop_action with a duration and a final horizontal stretch value. ```APIDOC ## bn::bgs_mosaic_horizontal_stretch_loop_action(int duration_updates, bn::fixed final_horizontal_stretch) ### Description Constructor for the horizontal stretch loop action. ### Parameters - **duration_updates** (int) - How many times the action has to be updated before changing the direction of the horizontal stretch delta. - **final_horizontal_stretch** (bn::fixed) - When the horizontal stretch is equal to this parameter, it goes back to its initial state and vice versa. This horizontal stretch must be in the range [0..1]. ``` -------------------------------- ### get Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1sp__direct__bitmap__bg__horizontal__scale__manager.html Returns the horizontal scale of the given sp_direct_bitmap_bg_ptr. ```APIDOC ## get ### Description Returns the horizontal scale of the given [sp_direct_bitmap_bg_ptr](classbn_1_1sp__direct__bitmap__bg__ptr.html). ### Signature ```cpp static auto bn::sp_direct_bitmap_bg_horizontal_scale_manager::get(const bn::sp_direct_bitmap_bg_ptr& bg) -> bn::fixed ``` ### Parameters * **bg** (const [sp_direct_bitmap_bg_ptr](classbn_1_1sp__direct__bitmap__bg__ptr.html)&) - The background pointer. ### Returns * [fixed](namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9) - The horizontal scale. ``` -------------------------------- ### get Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1sp__direct__bitmap__bg__blending__manager.html Indicates if blending is applied to the given sp_direct_bitmap_bg_ptr or not. ```APIDOC ## get ### Description Indicates if blending is applied to the given sp_direct_bitmap_bg_ptr or not. ### Method static auto ### Parameters #### Path Parameters - **bg** (const [sp_direct_bitmap_bg_ptr](classbn_1_1sp__direct__bitmap__bg__ptr.html)&) - Description: The background pointer to check. ### Return Value - bool - True if blending is enabled, false otherwise. ``` -------------------------------- ### Constructors Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1palette__bitmap__bg__scale__loop__action.html Constructs a new palette_bitmap_bg_scale_loop_action. ```APIDOC ## bn::palette_bitmap_bg_scale_loop_action::palette_bitmap_bg_scale_loop_action ### Description Constructor. ### Parameters - **bg** ([palette_bitmap_bg_ptr](classbn_1_1palette__bitmap__bg__ptr.html)) - The palette_bitmap_bg_ptr to copy. - **duration_updates** (int) - How many times the action has to be updated before changing the direction of the scale delta. - **final_scale** ([fixed](namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9)) - When the scale of the given [palette_bitmap_bg_ptr](classbn_1_1palette__bitmap__bg__ptr.html) is equal to this parameter, it goes back to its initial state and vice versa. ## bn::palette_bitmap_bg_scale_loop_action::palette_bitmap_bg_scale_loop_action ### Description Constructor. ### Parameters - **bg** ([palette_bitmap_bg_ptr](classbn_1_1palette__bitmap__bg__ptr.html) &&) - The palette_bitmap_bg_ptr to move. - **duration_updates** (int) - How many times the action has to be updated before changing the direction of the scale delta. - **final_scale** ([fixed](namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9)) - When the scale of the given [palette_bitmap_bg_ptr](classbn_1_1palette__bitmap__bg__ptr.html) is equal to this parameter, it goes back to its initial state and vice versa. ``` -------------------------------- ### Constructors Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1palette__bitmap__bg__blending__top__toggle__action.html Constructs a palette_bitmap_bg_blending_top_toggle_action. ```APIDOC ## bn::palette_bitmap_bg_blending_top_toggle_action::palette_bitmap_bg_blending_top_toggle_action ### Description Constructor. ### Parameters - **bg** ([palette_bitmap_bg_ptr](classbn_1_1palette__bitmap__bg__ptr.html)) - The palette_bitmap_bg_ptr to copy. - **duration_updates** (int) - How many times the action has to be updated to toggle if the given [palette_bitmap_bg_ptr](classbn_1_1palette__bitmap__bg__ptr.html) is part of the blending top layer or not. ## bn::palette_bitmap_bg_blending_top_toggle_action::palette_bitmap_bg_blending_top_toggle_action ### Description Constructor. ### Parameters - **bg** ([palette_bitmap_bg_ptr](classbn_1_1palette__bitmap__bg__ptr.html) &&) - The palette_bitmap_bg_ptr to move. - **duration_updates** (int) - How many times the action has to be updated to toggle if the given [palette_bitmap_bg_ptr](classbn_1_1palette__bitmap__bg__ptr.html) is part of the blending top layer or not. ``` -------------------------------- ### get Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1regular__bg__visible__manager.html Indicates if the given regular_bg_ptr is committed to the GBA or not. ```APIDOC ## get ### Description Indicates if the given [regular_bg_ptr](classbn_1_1regular__bg__ptr.html) is committed to the GBA or not. ### Signature ```cpp static auto get(const [regular_bg_ptr](classbn_1_1regular__bg__ptr.html)& bg) -> bool ``` ``` -------------------------------- ### get Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1regular__bg__top__left__position__manager.html Returns the top-left position of the given regular_bg_ptr. ```APIDOC ## get ### Description Returns the top-left position of the given [regular_bg_ptr](classbn_1_1regular__bg__ptr.html). ### Signature `static auto bn::regular_bg_top_left_position_manager::get(const bn::regular_bg_ptr& bg) -> bn::fixed_point` ``` -------------------------------- ### Constructors Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1affine__bg__mosaic__toggle__action.html Constructs an affine background mosaic toggle action. ```APIDOC ## bn::affine_bg_mosaic_toggle_action::affine_bg_mosaic_toggle_action(const bn::affine_bg_ptr& bg, int duration_updates) ### Description Constructor. ### Parameters - **bg** (const bn::affine_bg_ptr&): affine_bg_ptr to copy. - **duration_updates** (int): How many times the action has to be updated to toggle if the mosaic effect must be applied or not. ``` ```APIDOC ## bn::affine_bg_mosaic_toggle_action::affine_bg_mosaic_toggle_action(bn::affine_bg_ptr&& bg, int duration_updates) ### Description Constructor. ### Parameters - **bg** (bn::affine_bg_ptr&&): affine_bg_ptr to move. - **duration_updates** (int): How many times the action has to be updated to toggle if the mosaic effect must be applied or not. ``` -------------------------------- ### get Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1regular__bg__blending__manager.html Indicates if blending is applied to the given regular_bg_ptr or not. ```APIDOC ## get ### Description Indicates if blending is applied to the given [regular_bg_ptr](classbn_1_1regular__bg__ptr.html) or not. ### Signature `static auto get(const [regular_bg_ptr](classbn_1_1regular__bg__ptr.html)& bg) -> bool` ``` -------------------------------- ### Constructor Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1palette__bitmap__bg__move__loop__action.html Initializes a palette_bitmap_bg_move_loop_action to move a background bitmap between specified X and Y coordinates over a given number of updates. ```APIDOC ## bn::palette_bitmap_bg_move_loop_action::palette_bitmap_bg_move_loop_action ### Description Constructor. ### Parameters - **bg** ([palette_bitmap_bg_ptr](classbn_1_1palette__bitmap__bg__ptr.html)) - The background bitmap pointer to copy. - **duration_updates** (int) - How many times the action has to be updated before changing the direction of the position delta. - **final_x** ([fixed](namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9)) - When the horizontal position of the given [palette_bitmap_bg_ptr](classbn_1_1palette__bitmap__bg__ptr.html) is equal to this parameter, it goes back to its initial state and vice versa. - **final_y** ([fixed](namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9)) - When the vertical position of the given [palette_bitmap_bg_ptr](classbn_1_1palette__bitmap__bg__ptr.html) is equal to this parameter, it goes back to its initial state and vice versa. ``` -------------------------------- ### Constructors Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1palette__bitmap__bg__blending__toggle__action.html Constructs a palette_bitmap_bg_blending_toggle_action. ```APIDOC ## bn::palette_bitmap_bg_blending_toggle_action::palette_bitmap_bg_blending_toggle_action ### Description Constructor. ### Parameters - **bg** (const [palette_bitmap_bg_ptr](classbn_1_1palette__bitmap__bg__ptr.html)&) - [palette_bitmap_bg_ptr](classbn_1_1palette__bitmap__bg__ptr.html) to copy. - **duration_updates** (int) - How many times the action has to be updated to toggle if blending must be applied or not. ## bn::palette_bitmap_bg_blending_toggle_action::palette_bitmap_bg_blending_toggle_action ### Description Constructor. ### Parameters - **bg** ([palette_bitmap_bg_ptr](classbn_1_1palette__bitmap__bg__ptr.html)&&) - [palette_bitmap_bg_ptr](classbn_1_1palette__bitmap__bg__ptr.html) to move. - **duration_updates** (int) - How many times the action has to be updated to toggle if blending must be applied or not. ``` -------------------------------- ### get Source: https://github.com/gvaliente/butano/blob/master/docs/classbn_1_1palette__bitmap__bg__visible__manager.html Indicates if the given palette_bitmap_bg_ptr is committed to the GBA or not. ```APIDOC ## get ### Description Indicates if the given `palette_bitmap_bg_ptr` is committed to the GBA or not. ### Signature ```cpp static auto get(const palette_bitmap_bg_ptr& bg) -> bool ``` ### Parameters * **bg** (`const palette_bitmap_bg_ptr&`) - The background pointer to check. ### Returns `true` if the background is committed to the GBA, `false` otherwise. ```