Well, I recently downloaded DarkGDK and when I began to code my program, I created a small sprite with a magenta (255,0,255) background.
Now, I want this background transparent, but, when I use the following function:
dbSetImageColorKey(255,0,255);
Nothing happens to the image.
This is my current code:
#include <DarkGDK.h>
void DarkGDK ( void )
{
dbSyncOn ( );
dbSyncRate ( 60 );
dbDisableEscapeKey ( );
dbLoadImage ( "background.png", 1 );
dbSprite (1, 1,1,1);
dbSetImageColorKey ( 255, 0, 255 );
while ( LoopGDK ( ) )
{
dbCreateAnimatedSprite (2, "monster1.png", 1,1,2);
dbSprite (2,55,1,2);
if ( dbEscapeKey ( ) )
break;
dbSync ( );
}
dbDeleteImage ( 1 );
return;
}
I'd be grateful if anyone helped me.