Re: SKPIC32-based 256-color Video Experimental Game
Posted: Mon Jul 30, 2012 7:24 pm
takao21203 WROTE:
- CODE: SELECT_ALL_CODE
void vga_draw_sprite(unsigned char x, unsigned char y, unsigned char spriteWidth, unsigned char spriteHeight, const unsigned char* sprite, unsigned char* inputBuffer)
{
unsigned char i, j;
x_temp0=(x+(y*256));
for(i = 0; i < spriteHeight; i++)
{
x2_temp=i*spriteWidth;
for(j = 0; j < spriteWidth; j++)
{
inputBuffer[x_temp++] = sprite[x2_temp++];
}
x2_temp+=256;
}
}
Eventually you know about this already. When I wrote assembler games for MS-DOS,
optimization was kind of essential, since the VGA RAM access was very time consuming already.
Is it the modified code? I'm welcoming any optimizations.