cpctelera
cpctelera copied to clipboard
Sprite Scalling
I find interesting having a function to draw sprites in a scalled way.
For example, adding a new parameter to cpct_drawsprite:
cpct_drawSprite (void* sprite, void* memory, u8 width, u8 height, i8 scale)
So:
cpct_drawSprite (G_enemySprite, pvideo, 16, 16, 2)
Would draw a 32x32 sprite, doubling pixels.
Or:
cpct_drawSprite (G_enemySprite, pvideo, 16, 16, -2)
Would draw a 8x8 sprite, skipping pixels (for example) on the sprite.
This is just a simple implementation idea. Maybe it could be usefull to be able to use different scales for height and width.