|
PVcollib
1.5.0
A devkit for ColecoVision
|
coleco generic sprites support. More...
#include <coleco/coltypes.h>Go to the source code of this file.
Data Structures | |
| struct | sprite_t |
sprite entry :
y,x : coordinates (y,x) with y 0..191 and x 0..255
pattern : pattern number of sprite
colour : colour between 0..15
More... | |
Macros | |
| #define | spr_getx(id) (sprites[id].x) |
| get the x sprite coordinate More... | |
| #define | spr_gety(id) (sprites[id].y) |
| get the y sprite coordinate More... | |
| #define | spr_set(id, xp, yp, col, pat) |
| sets an sprite entry to the supplied values More... | |
| #define | spr_setxy(id, xp, yp) |
| sets an sprite coordinate to the supplied values More... | |
| #define | spr_sety(id, yp) { sprites[id].y=yp; } |
| set the y sprite coordinate More... | |
Functions | |
| void | spr_clear (void) |
| Remove all sprite from screen and init their positions. | |
| void | spr_clear30r (void) |
| Remove all sprite from screen and init their positions in F18a 30 rows mode. | |
| u8 | spr_getentry (void) |
| get a sprite id in sprite list More... | |
| u8 | spr_getentry30r (void) |
| get a sprite id in sprite list More... | |
| void | spr_mode16x16 (void) |
| put sprite in 16x16 pix mode Put all 32 sprites on screen in 16x16 pixels depth. | |
| void | spr_mode8x8 (void) |
| put sprite in 8x8 pix mode Put all 32 sprites on screen in 8x8 pixels depth. | |
| void | spr_update (void) |
| put sprite on screen Put all 32 sprites on screen. Must be call in NMI routine. | |
| void | spr_updatefast (void) |
| put sprite on screen without checking order Put all 32 sprites on screen. Must be call in NMI routine. | |
Variables | |
| volatile u8 | spr_enable |
0 or 1 if sprites can be displayed or not | |
| volatile sprite_t | sprites [MAXSPRITE] |
32 sprites entries | |
coleco generic sprites support.
This unit provides methods to display / remove sprites on screen.
| spr_getx | ( | id | ) | (sprites[id].x) |
get the x sprite coordinate
| id | the sprite number to be get [0 - 31] |
| spr_gety | ( | id | ) | (sprites[id].y) |
get the y sprite coordinate
| id | the sprite number to be get [0 - 31] |
| spr_set | ( | id, | |
| xp, | |||
| yp, | |||
| col, | |||
| pat | |||
| ) |
sets an sprite entry to the supplied values
| id | the sprite number to be get [0 - 31] |
| xp | the x location of the sprite in pixels |
| yp | the y location of the sprite in pixels |
| col | the sprite color (0 to 15) |
| pat | the pattern number of sprite (must be a multiple of 4) |
| spr_setxy | ( | id, | |
| xp, | |||
| yp | |||
| ) |
sets an sprite coordinate to the supplied values
| id | the sprite number to be get [0 - 31] |
| xp | the x location of the sprite in pixels |
| yp | the y location of the sprite in pixels |
| spr_sety | ( | id, | |
| yp | |||
| ) | { sprites[id].y=yp; } |
set the y sprite coordinate
| id | the sprite number to be get [0 - 31] |
| yp | the y location of the sprite in pixels |
| spr_getentry | ( | void | ) |
get a sprite id in sprite list
| spr_getentry30r | ( | void | ) |
get a sprite id in sprite list
1.8.13