|
GBDK 2020 Docs
4.4.0
API Documentation for GBDK 2020
|
Go to the source code of this file.
Data Structures | |
| struct | metasprite_t |
Macros | |
| #define | metasprite_end -128 |
| #define | METASPR_ITEM(dy, dx, dt, a) {(dy),(dx),(dt)} |
| #define | METASPR_TERM {metasprite_end} |
Typedefs | |
| typedef struct metasprite_t | metasprite_t |
Functions | |
| void | hide_sprites_range (uint8_t from, uint8_t to) PRESERVES_REGS(iyh |
| uint8_t | move_metasprite_ex (const metasprite_t *metasprite, uint8_t base_tile, uint8_t base_prop, uint8_t base_sprite, int16_t x, int16_t y) |
| uint8_t | move_metasprite (const metasprite_t *metasprite, uint8_t base_tile, uint8_t base_sprite, int16_t x, int16_t y) |
| uint8_t | move_metasprite_flipx (const metasprite_t *metasprite, uint8_t base_tile, uint8_t base_prop, uint8_t base_sprite, int16_t x, int16_t y) |
| uint8_t | move_metasprite_flipy (const metasprite_t *metasprite, uint8_t base_tile, uint8_t base_prop, uint8_t base_sprite, int16_t x, int16_t y) |
| uint8_t | move_metasprite_flipxy (const metasprite_t *metasprite, uint8_t base_tile, uint8_t base_prop, uint8_t base_sprite, int16_t x, int16_t y) |
| void | hide_metasprite (const metasprite_t *metasprite, uint8_t base_sprite) |
Variables | |
| const void * | __current_metasprite |
| uint8_t | __current_base_tile |
| uint8_t | __render_shadow_OAM |
| static void | iyl |
A metasprite is a larger sprite made up from a collection of smaller individual hardware sprites. Different frames of the same metasprites can share tile data.
See the main metasprite docs under the game Boy platform for additional details.
A metasprite is a larger sprite made up from a collection of smaller individual hardware sprites. Different frames of the same metasprites can share tile data.
See the main metasprite docs under the game Boy platform for additional details.
| #define metasprite_end -128 |
| #define METASPR_ITEM | ( | dy, | |
| dx, | |||
| dt, | |||
| a | |||
| ) | {(dy),(dx),(dt)} |
| #define METASPR_TERM {metasprite_end} |
| typedef struct metasprite_t metasprite_t |
Metasprite sub-item structure
| dy | (int8_t) Y coordinate of the sprite relative to the metasprite origin (pivot) |
| dx | (int8_t) X coordinate of the sprite relative to the metasprite origin (pivot) |
| dtile | (uint8_t) Start tile relative to the metasprites own set of tiles |
Metasprites are built from multiple metasprite_t items (one for each sub-sprite) and a pool of tiles they reference. If a metasprite has multiple frames then each frame will be built from some number of metasprite_t items (which may vary based on how many sprites are required for that particular frame).
A metasprite frame is terminated with a {metasprite_end} entry.
Hides all hardware sprites in range from <= X < to
| from | start OAM index |
| to | finish OAM index |
|
inline |
Moves metasprite to the absolute position x and y
| metasprite | Pointer to the first struct of the metasprite (for the desired frame) |
| base_tile | Number of the first tile where the metasprite's tiles start |
| base_prop | Base sprite property flags (unused on this platform) |
| base_sprite | Number of the first hardware sprite to be used by the metasprite |
| x | Absolute x coordinate of the sprite |
| y | Absolute y coordinate of the sprite |
Moves metasprite to the absolute position x and y (with no flip on the X or Y axis). Hardware sprites are allocated starting from base_sprite, using tiles starting from base_tile.
Sets:
|
inline |
Obsolete. This function has been replaced by move_metasprite_ex()
|
inline |
Moves metasprite to the absolute position x and y, flipped by X (horizontally)
| metasprite | Pointer to the first struct of the metasprite (for the desired frame) |
| base_tile | Number of the first tile where the metasprite's tiles start |
| base_prop | Base sprite property flags (unused on this platform) |
| base_sprite | Number of the first hardware sprite to be used by the metasprite |
| x | Absolute x coordinate of the sprite |
| y | Absolute y coordinate of the sprite |
Same as move_metasprite(), but with the metasprite flipped by X (horizontally).
Sets:
Note: Overwrites OAM sprite properties (such as palette), see Metasprites and sprite properties.
|
inline |
Moves metasprite to the absolute position x and y, flipped by Y (vertically)
| metasprite | Pointer to the first struct of the metasprite (for the desired frame) |
| base_tile | Number of the first tile where the metasprite's tiles start |
| base_prop | Base sprite property flags (unused on this platform) |
| base_sprite | Number of the first hardware sprite to be used by the metasprite |
| x | Absolute x coordinate of the sprite |
| y | Absolute y coordinate of the sprite |
Same as move_metasprite(), but with the metasprite flipped by Y (vertically).
Sets:
Note: Overwrites OAM sprite properties (such as palette), see Metasprites and sprite properties.
|
inline |
Moves metasprite to the absolute position x and y, flipped by X and Y (horizontally and vertically)
| metasprite | Pointer to the first struct of the metasprite (for the desired frame) |
| base_tile | Number of the first tile where the metasprite's tiles start |
| base_prop | Base sprite property flags (unused on this platform) |
| base_sprite | Number of the first hardware sprite to be used by the metasprite |
| x | Absolute x coordinate of the sprite |
| y | Absolute y coordinate of the sprite |
Same as move_metasprite(), but with the metasprite flipped by X and Y (horizontally and vertically).
Sets:
Note: Overwrites OAM sprite properties (such as palette), see Metasprites and sprite properties.
|
inline |
Hides a metasprite from the screen
| metasprite | Pointer to first struct of the desired metasprite frame |
| base_sprite | Number of hardware sprite to start with |
Sets:
|
extern |
|
extern |
|
extern |
| void iyl |