Sprites! 👻
- smokku
We have working sprites! 👻 boo…
Sprites handling is modelled on how Amiga does sprites.
There is a set of 8
descriptors, each describing:
- where the sprite is located on screen
(x,y)
,
- how wide (
2-4
bytes) and tall (1-256
lines) it is,
- up to
3
colors (from palette of 256
),
- and where is the start of the sprite bitmap memory.
Sprite can be rendered in HiRes or MultiColor mode, with optional horizontal pixel doubling.
You can set how many of these descriptors you want to render and toggle each sprite
active in its descriptor.
There is also an option to point to another sprite descriptor, which will be loaded
after finishing current sprite. This gives you a built-in sprite multiplexer,
without having to code anything in CPU - at the cost of slightly more complex initial setup.