Code:
while(1)
{
blit(maplayer[0], screenbuffer, 0, 0, 0, 0 , 640 ,480);
Draw_Sprite(player.posx, player.posy, screenbuffer);
for(i = 0; i < enemy_mem+1; i++) //draw the other sprites
{
Draw_Sprite(enemy[i].posx, enemy[i].posy, screenbuffer);
}
blit(screenbuffer, screen, 0, 0, 0, 0 , 640 ,480);
}
This is basicly the part i am having issues with... now the game runs at a decent speed if i comment out that first blit, however that blit copys the background onto to screen buffer then the sprites are drawn ontop... but by drawing the background makes the program run at a speed of about 2 frames a second, whats the deal with that!? Is this a timer issue because i currently don't have one set up...
cheers matty