So I have a background sprite and a sprite that should appear in front of it. Here is my code:
void gameTitle( void )
{
dbSprite(1,0,0,1);
dbSizeSprite(1,640,480);
dbSprite(20,243,420,16);
dbPlaySprite ( 20, 1, 2, 300 );
if(dbReturnKey())
{
dbPlaySound(1);
GameMode = GameSelect;
dbDeleteSprite(1);
dbDeleteSprite(20);
}
}
My problem is that for some obscure reason even though i define the animated sprite(ID 20) after the background sprite(ID 1) the animated sprite is drawn underneath the other one so you can't see it. I tried switching the order and that didn't work either. I know that it draws the animated sprite cause I ran it while i had commented out the first sprite and it showed up. Please help.