void DarkGDK ( void )
{
dbSyncOn ( );
dbSyncRate ( 30 );
dbSetWindowLayout(0,0,0);
dbSetWindowPosition( 0,0 );
dbSetDisplayMode(768, 768, 32);
DarkVideoInitialize();
dbAutoCamOff();
dbBackdropOff();
dbColorBackdrop( dbRGB( 0, 0, 0 ) );
dbSetImageColorKey ( 0, 0, 0 ); <----------------------------not support?
int movieId = DarkVideoOpen( "s.dvf" );
int movieWidth = DarkVideoGetWidth( movieId );
int movieHeight = DarkVideoGetHeight( movieId );
DarkVideoSetVolume( movieId, 255 );
dbLoadImage ("startback.jpg", 100 );
dbSprite ( 100, 0, 0, 100 );
dbSetSpritePriority ( 100, 1 );
int memBlockId = 32;
int imageId = 32;
dbMakeMemblock( memBlockId, movieWidth * movieHeight * 4 + 12 );
dbWriteMemblockDword( memBlockId, 0, movieWidth );
dbWriteMemblockDword( memBlockId, 4, movieHeight );
dbWriteMemblockDword( memBlockId, 8, 32 );
dbMakeImageFromMemblock( imageId, memBlockId );
// dbMakeBitmapFromMemblock(imageId, memBlockId ); <---------------------------- error?
dbDeleteMemblock( memBlockId );
int ux[8] = {0,200,400,600,0,200,400,600};
int AP[8] = {10,50,100, 128, 150,180,200,230};
for ( int p = 1; p <= 8; p++ )
{
if(p > 4){
dbSprite(p, 330, ux[p-1], imageId);
dbSetSprite(p, 1, 1);
}else{
dbSprite(p, 00, ux[p-1], imageId);
dbSetSprite(p, 0, 1);
}
dbScaleSprite ( p, 50 );
dbSetSpriteAlpha(p, AP[p-1]);
dbSetSpritePriority ( p, p+10 );
}
dbSetObjectLight( 1, 0 );
dbPositionCamera( 0, 0, -700 );
dbRotateCamera( 0, 0, 0 );
float a = 0.0f;
DarkVideoPlay( movieId, imageId, true, dbGetImagePointer );
while ( LoopGDK ( ) )
{
dbCLS(RGB(0,0,0));
dbSync ( );
}
// stop and shutdown DarkVIDEO movie.
DarkVideoStop( movieId );
DarkVideoClose( movieId );
// shutdown DarkVIDEO.
DarkVideoShutdown();
// and now everything is ready to return back to Windows.
return;
}