libmsx
C library for MSX
Loading...
Searching...
No Matches
Sprite color table

Sprite color table interface. More...

+ Collaboration diagram for Sprite color table:

Data Structures

struct  sprite_color
 MSX2 Element of sprite color table (for sprite mode 2). More...
 

Functions

void vmem_set_sprite_color (vmemptr_t base, uint8_t plane, const struct sprite_color *sprite_color)
 MSX2 Set sprite color table element (tagged color for each scanlines) of a sprite.
 
void vmem_set_sprite_color_s (vmemptr_t base, uint8_t plane, const tagged_color_t tagged_color)
 MSX Set sprite color (tagged color) of a sprite.
 
void vmem_set_sprite_color_m (vmemptr_t base, uint8_t plane, uint8_t n, const tagged_color_t *tagged_colors)
 MSX Set sprite color (tagged color) of some sprites.
 

Detailed Description

Sprite color table interface.


Data Structure Documentation

◆ sprite_color

struct sprite_color

MSX2 Element of sprite color table (for sprite mode 2).

Definition at line 37 of file sprite_color.h.

Data Fields
tagged_color_t tagged_colors[16] EC | CC | IC | 0 | Color Code

Function Documentation

◆ vmem_set_sprite_color()

void vmem_set_sprite_color ( vmemptr_t  base,
uint8_t  plane,
const struct sprite_color sprite_color 
)

MSX2 Set sprite color table element (tagged color for each scanlines) of a sprite.

Parameters
baseBase address of the SPRITE ATTRIBUTE TABLE in VRAM.
planeThe plane number.
sprite_colorPointer to constructed sprite color table element, that to be copied into VRAM.
Note
For use with SPRITE MODE 2.

◆ vmem_set_sprite_color_s()

void vmem_set_sprite_color_s ( vmemptr_t  base,
uint8_t  plane,
const tagged_color_t  tagged_color 
)

MSX Set sprite color (tagged color) of a sprite.

Parameters
baseBase address of the SPRITE ATTRIBUTE TABLE in VRAM.
planeThe plane number.
tagged_colorA color code and sprite attribute tags, that is applied for sprite of the sprite plane number plane.
Note
For use with SPRITE MODE 1.

◆ vmem_set_sprite_color_m()

void vmem_set_sprite_color_m ( vmemptr_t  base,
uint8_t  plane,
uint8_t  n,
const tagged_color_t tagged_colors 
)

MSX Set sprite color (tagged color) of some sprites.

Parameters
baseBase address of the SPRITE ATTRIBUTE TABLE in VRAM.
planeThe plane number.
nNumber of planes
tagged_colorsArray of color code and sprite attribute tags, that is applied for each sprite of the sprite plane number from plane to plane + n -1, one by one.
Note
For use with SPRITE MODE 1.