Sprite & DMA #1158
-
Hi Bodmer, first thank you for an excellent library, it's great job! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
16 bit Sprites can be treated as an image and sent to the screen using DMA. You need to get the pointer to the sprite image, this can be done at creation. See example here . |
Beta Was this translation helpful? Give feedback.
-
This is a modified sketch that decreases the size of the sprite to an 8th of the screen, so each of the 2 sprites would be 19.2 Kbytes for a 240x320 screen. This should run on your processor. Note that increasing the number of "panes" slows down the rendering because the sketch draws the full screen graphics to each small sprite every time, but this gets clipped by the library functions to the sprite area. You can now change the # define DMA_PANES to a number of your choice, ideally a power of 2 (2, 4 or 8). Bigger numbers = slower rendering but smaller RAM size sprites.
|
Beta Was this translation helpful? Give feedback.
16 bit Sprites can be treated as an image and sent to the screen using DMA. You need to get the pointer to the sprite image, this can be done at creation. See example here .