Ok, I'm new to all of this, but I love it, It's pretty fun!! Anyway I was doing this small project and I wanted to load sound and the you win video. But with no luck. The only error I get is error C2661: 'dbPlayAnimation' : no overloaded function takes 2 arguments...
Here is my full source if you need it. Please note that I'm still new!
#include "DarkGDK.h"
void DarkGDK ( void )
{
dbSetWindowTitle("Aaron's First 2D Game (Kind of...)");
dbSyncOn();
dbSyncRate ( 100 );
dbDisableEscapekey ( );
dbRandomize ( dbTimer ( ) );
dbLoadSound("DWTPGame.wav", 1 );
dbLoadImage ("backdrop.bmp", 1 );
dbSprite ( 1, 0, 0, 1 );
dbSetImageColorKey ( 255, 0, 255 );
int i = 1, T = 2, S = 3, P = 4;
dbLoadImage("target.bmp", T);
dbSprite ( T, 250, 0, T );
i++;
dbLoadImage("shooter.bmp", S);
dbSprite ( S, 200, 460, S );
dbLoadImage("PROJ.bmp", P);
int Z = 0;
int R = 1;
int M = 200;
int AC = 50;
int BC = 4;
while ( LoopGDK () )
{
int DIF = 2;//The difficulty of the game, *Make sure this number is either 2, 5, 10, or 50!;
if(R == 1)
{
dbSprite(T,Z, 1,T);
Z=Z+DIF;
if(Z==650)
{
R = 0;
}
}
else if(R == 0)
{
dbSprite(T,Z,1,T);
Z=Z-DIF;
if(Z == 0)
{
R = 1;
}
}
if( dbRightKey() && !(M > 625))
{
dbSprite(S, M, 460, S);
M = M + 2;
}
if( dbLeftKey() && !(M <= 0))
{
dbSprite(S, M, 460, S);
M = M - 2;
}
if( dbSpaceKey())
{
if(AC == 50)
{
dbSprite(P, M, 425, P);
AC = 0;
}
}
if(AC < 50)
{
dbMoveSprite(P, 10);
AC++;
}
if(AC < 50)
{
if((dbSpriteY(P) >= 0 && dbSpriteY(P) <= 10))
{
if((dbSpriteX(P) <= (dbSpriteX(T) + 20) && (dbSpriteX(P) >= (dbSpriteX(T) - 20))))
{
dbPlayAnimation("youwin1.avi", 1);
break;
}
}
}
if ( dbEscapeKey ( ) )
break;
dbSync ( );
}
for ( int i = 1; i < 30; i++ )
dbDeleteSprite ( i );
dbDeleteImage ( 1 );
return;
}