libmsx
C library for MSX
|
Sprite attribute table interface. More...
Data Structures | |
struct | sprite |
Element of sprite attribute table. More... | |
Typedefs | |
typedef uint8_t | tagged_color_t |
Color code with tags of sprite attribute table. | |
Enumerations | |
enum | sprite_tag { SPRITE_TAG_IC = (1<<5) , SPRITE_TAG_CC = (1<<6) , SPRITE_TAG_EC = (1<<7) } |
Enumerations for tags of sprite attribute table. More... | |
Functions | |
void | sprite_set_x (struct sprite *s, int x) |
MSX Set x coordinates to a struct sprite . | |
void | sprite_set_y (struct sprite *s, int y) |
MSX Set y coordinates to a struct sprite . | |
void | sprite_set_xy (struct sprite *s, int x, int y) |
MSX Set x and y coordinates to a struct sprite . | |
void | sprite_set_pat (struct sprite *s, uint8_t pat) |
MSX Set sprite pattern number to a struct sprite . | |
void | sprite_set_color (struct sprite *s, tagged_color_t tagged_color) |
MSX Set tags and color code to a struct sprite . | |
void | vmem_set_sprite (vmemptr_t base, uint8_t plane, const struct sprite *s) |
MSX Set sprite attribute table element. | |
void | vmem_init_sprites (vmemptr_t base) |
MSX Initialize the sprite attribute table. | |
Sprite attribute table interface.
struct sprite |
Data Fields | ||
---|---|---|
uint8_t | y | y coordinates |
uint8_t | x | x coordinates |
uint8_t | pat | sprite pattern number |
tagged_color_t | tagged_color |
EC | CC | IC | 0 | Color Code |
typedef uint8_t tagged_color_t |
enum sprite_tag |
void sprite_set_x | ( | struct sprite * | s, |
int | x | ||
) |
MSX
Set x coordinates to a struct sprite
.
s | pointer to a struct sprite . |
x | x value. |
void sprite_set_y | ( | struct sprite * | s, |
int | y | ||
) |
MSX
Set y coordinates to a struct sprite
.
s | pointer to a struct sprite . |
y | y value. |
void sprite_set_xy | ( | struct sprite * | s, |
int | x, | ||
int | y | ||
) |
MSX
Set x and y coordinates to a struct sprite
.
s | pointer to a struct sprite . |
x | x value. |
y | y value. |
void sprite_set_pat | ( | struct sprite * | s, |
uint8_t | pat | ||
) |
MSX
Set sprite pattern number to a struct sprite
.
s | pointer to a struct sprite . |
pat | sprite pattern number. |
void sprite_set_color | ( | struct sprite * | s, |
tagged_color_t | tagged_color | ||
) |
MSX
Set tags and color code to a struct sprite
.
s | pointer to a struct sprite . |
tagged_color | tags and color code. |
void vmem_init_sprites | ( | vmemptr_t | base | ) |
MSX
Initialize the sprite attribute table.
Same as the following code:
base | Base address of the SPRITE ATTRIBUTE TABLE in VRAM. |