affine_bg_tiles_item class
#include <bn_affine_bg_tiles_item.h>
Contains the required information to generate affine background tiles.
Contents
The assets conversion tools generate an object of this type in the build folder for each *.bmp file with affine_bg type.
The tiles are not copied but referenced, so they should outlive the affine_
Public static functions
- static auto valid_tiles_count(int tiles_count) -> bool constexpr
- Indicates if the specified tiles count are valid or not.
Constructors, destructors, conversion operators
- affine_bg_tiles_item(const span<const tile>& tiles_ref) explicit constexpr
- Constructor.
-
affine_bg_tiles_item(const span<const tile>& tiles_ref,
compression_
type compression) constexpr - Constructor.
Public functions
-
auto compression() const -> compression_
type constexpr - Returns the compression type.
-
auto uncompress(span<tile> uncompressed_tiles_ref) const -> affine_
bg_ tiles_ item - Uncompresses the stored data in the tiles referenced by uncompressed_tiles_ref.
- auto tiles_ref() const -> const span<const tile>& constexpr
- Returns the reference to one or more background tiles.
-
auto find_tiles() const -> optional<affine_
bg_ tiles_ ptr> - Searches for an affine_
bg_ tiles_ ptr which reference the background tiles. -
auto create_tiles() const -> affine_
bg_ tiles_ ptr - Searches for an affine_
bg_ tiles_ ptr which reference the background tiles. If they are not found, it creates an affine_ bg_ tiles_ ptr which reference them. -
auto create_new_tiles() const -> affine_
bg_ tiles_ ptr - Creates a new affine_
bg_ tiles_ ptr which reference the background tiles. -
auto create_tiles_optional() const -> optional<affine_
bg_ tiles_ ptr> - Searches for an affine_
bg_ tiles_ ptr which reference the background tiles. If they are not found, it creates an affine_ bg_ tiles_ ptr which reference them. -
auto create_new_tiles_optional() const -> optional<affine_
bg_ tiles_ ptr> - Creates a new affine_
bg_ tiles_ ptr which reference the background tiles.
Friends
-
auto operator==(const affine_
bg_ tiles_ item& a, const affine_ bg_ tiles_ item& b) -> friend bool constexpr - Equal operator.
-
auto operator!=(const affine_
bg_ tiles_ item& a, const affine_ bg_ tiles_ item& b) -> friend bool constexpr - Not equal operator.
Function documentation
bn:: affine_bg_tiles_item:: affine_bg_tiles_item(const span<const tile>& tiles_ref) explicit constexpr
Constructor.
| Parameters | |
|---|---|
| tiles_ref | Reference to one or more background tiles. |
The tiles are not copied but referenced, so they should outlive the affine_
bn:: affine_bg_tiles_item:: affine_bg_tiles_item(const span<const tile>& tiles_ref,
compression_ type compression) constexpr
Constructor.
| Parameters | |
|---|---|
| tiles_ref | Reference to one or more background tiles. |
| compression | Compression type. |
The tiles are not copied but referenced, so they should outlive the affine_
affine_ bg_ tiles_ item bn:: affine_bg_tiles_item:: uncompress(span<tile> uncompressed_tiles_ref) const
Uncompresses the stored data in the tiles referenced by uncompressed_tiles_ref.
| Parameters | |
|---|---|
| uncompressed_tiles_ref | Destination of the uncompressed tiles. |
| Returns | An affine_ |
If the source and destination tiles overlap, the behavior is undefined.
const span<const tile>& bn:: affine_bg_tiles_item:: tiles_ref() const constexpr
Returns the reference to one or more background tiles.
The tiles are not copied but referenced, so they should outlive the affine_
optional<affine_ bg_ tiles_ ptr> bn:: affine_bg_tiles_item:: find_tiles() const
Searches for an affine_
| Returns | affine_ |
|---|
affine_ bg_ tiles_ ptr bn:: affine_bg_tiles_item:: create_tiles() const
Searches for an affine_
| Returns | affine_ |
|---|
The tiles are not copied but referenced, so they should outlive the affine_
affine_ bg_ tiles_ ptr bn:: affine_bg_tiles_item:: create_new_tiles() const
Creates a new affine_
| Returns | affine_ |
|---|
The background tiles system does not support multiple affine_
The tiles are not copied but referenced, so they should outlive the affine_
optional<affine_ bg_ tiles_ ptr> bn:: affine_bg_tiles_item:: create_tiles_optional() const
Searches for an affine_
| Returns | affine_ |
|---|
The tiles are not copied but referenced, so they should outlive the affine_
optional<affine_ bg_ tiles_ ptr> bn:: affine_bg_tiles_item:: create_new_tiles_optional() const
Creates a new affine_
| Returns | affine_ |
|---|
The background tiles system does not support multiple affine_
The tiles are not copied but referenced, so they should outlive the affine_
friend bool operator==(const affine_ bg_ tiles_ item& a,
const affine_ bg_ tiles_ item& b) constexpr
Equal operator.
| Parameters | |
|---|---|
| a | First affine_ |
| b | Second affine_ |
| Returns | true if the first affine_false. |
friend bool operator!=(const affine_ bg_ tiles_ item& a,
const affine_ bg_ tiles_ item& b) constexpr
Not equal operator.
| Parameters | |
|---|---|
| a | First affine_ |
| b | Second affine_ |
| Returns | true if the first affine_false. |