class
#include <bn_sprite_position_hbe_ptr.h>
sprite_position_hbe_ptr std::shared_ptr like smart pointer that retains shared ownership of a H-Blank effect which changes the position of a sprite in each screen horizontal line.
Base classes
- class hbe_ptr
- std::shared_ptr like smart pointer that retains shared ownership of a H-Blank effect.
Public static functions
-
static auto create_horizontal(sprite_
ptr sprite, const span<const fixed>& deltas_ref) -> sprite_ position_ hbe_ ptr - Creates a sprite_
position_ hbe_ ptr which changes the horizontal position of a sprite in each screen horizontal line. -
static auto create_vertical(sprite_
ptr sprite, const span<const fixed>& deltas_ref) -> sprite_ position_ hbe_ ptr - Creates a sprite_
position_ hbe_ ptr which changes the vertical position of a sprite in each screen horizontal line. -
static auto create_horizontal_optional(sprite_
ptr sprite, const span<const fixed>& deltas_ref) -> optional<sprite_ position_ hbe_ ptr> - Creates a sprite_
position_ hbe_ ptr which changes the horizontal position of a sprite in each screen horizontal line. -
static auto create_vertical_optional(sprite_
ptr sprite, const span<const fixed>& deltas_ref) -> optional<sprite_ position_ hbe_ ptr> - Creates a sprite_
position_ hbe_ ptr which changes the vertical position of a sprite in each screen horizontal line.
Public functions
-
auto sprite() const -> const sprite_
ptr& - Returns the sprite modified by this H-Blank effect.
- auto deltas_ref() const -> span<const fixed>
- Returns the referenced array of 160 deltas to add to the horizontal or vertical position of the managed sprite in each screen horizontal line.
- void set_deltas_ref(const span<const fixed>& deltas_ref)
- Sets the reference to an array of 160 deltas to add to the horizontal or vertical position of the managed sprite in each screen horizontal line.
- void reload_deltas_ref()
- Rereads the content of the referenced deltas to add to the horizontal or vertical position of the managed sprite in each screen horizontal line.
-
void swap(sprite_
position_ hbe_ ptr& other) - Exchanges the contents of this sprite_
position_ hbe_ ptr with those of the other one.
Friends
-
void swap(sprite_
position_ hbe_ ptr& a, sprite_ position_ hbe_ ptr& b) - Exchanges the contents of a sprite_
position_ hbe_ ptr with those of another one.
Function documentation
static sprite_ position_ hbe_ ptr bn:: sprite_position_hbe_ptr:: create_horizontal(sprite_ ptr sprite,
const span<const fixed>& deltas_ref)
Creates a sprite_
Parameters | |
---|---|
sprite | Sprite to be modified. |
deltas_ref | Reference to an array of 160 deltas to add to the horizontal position of the given sprite in each screen horizontal line. |
Returns | The requested sprite_ |
The deltas are not copied but referenced, so they should outlive the sprite_
static sprite_ position_ hbe_ ptr bn:: sprite_position_hbe_ptr:: create_vertical(sprite_ ptr sprite,
const span<const fixed>& deltas_ref)
Creates a sprite_
Parameters | |
---|---|
sprite | Sprite to be modified. |
deltas_ref | Reference to an array of 160 deltas to add to the vertical position of the given sprite in each screen horizontal line. |
Returns | The requested sprite_ |
The deltas are not copied but referenced, so they should outlive the sprite_
static optional<sprite_ position_ hbe_ ptr> bn:: sprite_position_hbe_ptr:: create_horizontal_optional(sprite_ ptr sprite,
const span<const fixed>& deltas_ref)
Creates a sprite_
Parameters | |
---|---|
sprite | Sprite to be modified. |
deltas_ref | Reference to an array of 160 deltas to add to the horizontal position of the given sprite in each screen horizontal line. |
Returns | The requested sprite_ |
The deltas are not copied but referenced, so they should outlive the sprite_
static optional<sprite_ position_ hbe_ ptr> bn:: sprite_position_hbe_ptr:: create_vertical_optional(sprite_ ptr sprite,
const span<const fixed>& deltas_ref)
Creates a sprite_
Parameters | |
---|---|
sprite | Sprite to be modified. |
deltas_ref | Reference to an array of 160 deltas to add to the vertical position of the given sprite in each screen horizontal line. |
Returns | The requested sprite_ |
The deltas are not copied but referenced, so they should outlive the sprite_
span<const fixed> bn:: sprite_position_hbe_ptr:: deltas_ref() const
Returns the referenced array of 160 deltas to add to the horizontal or vertical position of the managed sprite in each screen horizontal line.
The deltas are not copied but referenced, so they should outlive the sprite_
void bn:: sprite_position_hbe_ptr:: set_deltas_ref(const span<const fixed>& deltas_ref)
Sets the reference to an array of 160 deltas to add to the horizontal or vertical position of the managed sprite in each screen horizontal line.
The deltas are not copied but referenced, so they should outlive the sprite_
void bn:: sprite_position_hbe_ptr:: reload_deltas_ref()
Rereads the content of the referenced deltas to add to the horizontal or vertical position of the managed sprite in each screen horizontal line.
The deltas are not copied but referenced, so they should outlive the sprite_
void bn:: sprite_position_hbe_ptr:: swap(sprite_ position_ hbe_ ptr& other)
Exchanges the contents of this sprite_
Parameters | |
---|---|
other | sprite_ |
void swap(sprite_ position_ hbe_ ptr& a,
sprite_ position_ hbe_ ptr& b)
Exchanges the contents of a sprite_
Parameters | |
---|---|
a | First sprite_ |
b | Second sprite_ |