-
Notifications
You must be signed in to change notification settings - Fork 5
Sprite Engine
Kannagi edited this page Aug 30, 2024
·
6 revisions
Manage sprites and their animation automatically
-
uint16 oam
OAM address -
uint16 n
Number of sprites (multiple of two and 16 maximum) -
uint8 ndma
DMA transfer per frame (0, 1 or 2)
call SNDK_SpriteEngine: 0,8,2
For animation, it reads a list like this:
SNDK_LIST:
LIST_SPR1:
// label data anim
.data.l HERO_SPR:,HERO_ANIM:
.data.w 0x6000, 0x80,0x200, 0x0F
//---------VRAM size decalage , channel
LIST_SPR2:
.data.l HERO_SPR:,HERO_ANIM:
.data.w 0x6040, 0x80,0x200, 0x0F
//------------------------
HERO_ANIM:
.data.w (11*2),0x00 ,0x00,0x00,0x80,0x80,0x80,0x100,0x100,0x100,0x80,0x80,0x80
.data.w (11*2),0x800 ,0x800,0x800,0x880,0x880,0x880,0x900,0x900,0x900,0x880,0x880,0x880
.data.w (11*2),0x1000 ,0x1000,0x1000,0x1080,0x1080,0x1080,0x1100,0x1100,0x1100,0x1080,0x1080,0x1080
SNDK v0.3