I have researched my problem for awhile, and I apologize if there was a thread with the solution to my problem that I missed, but I can't find anything on it. I'm making a game that is set up like Phoenix Wright, with a 2D character talking at the player from behind a text screen that lies on the bottom of the screen. I'm just trying to format all of the sprites right now before I move on to the gameplay, but when I try to place an animated sprite behind the text box, it doesn't show up.
Here's my code:
#include "DarkGDK.h"
void DarkGDK ( void )
{
dbSyncOn ( );
dbSyncRate ( 60 );
dbDisableEscapeKey ( );
dbSetTextFont ("tf2secondary.ttf", 1);
dbSetTextSize (12);
dbDrawSpritesFirst();
//----------------------
//DEFINE & PLACE SPRITES
//----------------------
dbLoadImage ("Fence2Fort.jpg", 1, 1);
dbSprite (1, 0, 0, 1);
dbLoadImage ("TextBox.jpg", 2, 1);
dbSprite (2, 5, 360, 2);
dbLoadImage ("Arrow.jpg", 3, 1);
dbSprite (3, 605, 453, 3);
dbSetSpritePriority (3,4);
dbSetSpritePriority (2,3);
dbSetSpritePriority (1, 1);
//-------------------------
//DEFINED ANIMATED SPRITES
//-------------------------
for ( int i = 2; i < 30; i++ )
{
dbCreateAnimatedSprite ( i, "SDB.png", 2, 4, i );
dbSprite ( i, 0, 0, i );
dbSetSprite(i, 0, 1);
dbSetSpritePriority (i, 2);
}
//---------
//MAIN CODE
//---------
while ( LoopGDK ( ) )
{
for (int i=2; i<30; i++)
{
dbPlaySprite (i, 1, 8, 70);
}
dbText (8, 365, "TESTING TESTING TESTING TESTING testing");
if ( dbEscapeKey ( ) )
break;
dbSync ( );
}
//------------
//END SEQUENCE
//------------
for ( int i = 1; i < 30; i++ )
dbDeleteImage (1);
dbDeleteImage (2);
dbDeleteImage (3);
return;
}
I hope I did that right (I've never posted in these forums before) I also can't get the font to change either, but I haven't really researched it since I've been so focused on fixing the sprite issue. Any advice is welcome and greatly appreciated!
Thank you,
Thinking Cap