I get no compile errors for this code yet when I run the program I get nothing but a black screen. Can anyone spot something I might have missed? Thanks all.
#include "DarkGDK.h"
#include <string.h>
void DarkGDK ( void )
{
// Animation Functionality
int AnimNumber=1;
// set the current directory
// DBProDir.s=dbGetRegistryValue(#HKEY_LOCAL_MACHINE,"Software\Dark Basic\Dark Basic Pro\","INSTALL-PATH");
dbSetDir("D:\\Program Files\\The Game Creators\\Dark Basic Professional Online\\Help\\examples\\animation");
// // DVD Animation
// Title=1 : Chapter=1
// load dvd animation 1
// If total dvd chapters(Title,Chapter)>0
// set dvd chapter AnimNumber,Title,Chapter
// play animation AnimNumber,0,0,640,480
// sleep 5000
// delete animation AnimNumber
// EndIf
// Full Screen Animation
dbLoadAnimation("mpg\\dbintro.mpg",AnimNumber);
dbPlayAnimation(AnimNumber,0,0,640,480);
dbSleep(2000);
dbDeleteAnimation(AnimNumber);
// Looping Animation
dbLoadAnimation("mpg\\dbintro.mpg",AnimNumber);
dbLoopAnimation(AnimNumber);
dbSleep(2000);
dbDeleteAnimation(AnimNumber);
// Controlled Animation
dbLoadAnimation("mpg\\dbintro.mpg",AnimNumber);
dbPlayAnimation(AnimNumber,160,120);
dbSleep(2000);
dbStopAnimation(AnimNumber);
dbPlayAnimation(AnimNumber,0,0,640,480);
dbSleep(2000);
dbPlaceAnimation(AnimNumber,320,240,640,480);
dbSleep(2000);
dbPauseAnimation(AnimNumber);
dbSleep(1000);
dbResumeAnimation(AnimNumber);
dbSleep(2000);
// New Animation Commands
int TwiceSpeed=200;
int HalfVolume=50;
dbSetAnimationSpeed(AnimNumber,TwiceSpeed);
dbSetAnimationVolume(AnimNumber,HalfVolume);
// Animation Through Bitmap
int BitmapNumber=1;
dbPlayAnimationToImage(AnimNumber,BitmapNumber,0,0,640,240);
dbSleep(2000);
dbLoopAnimationToBitmap(AnimNumber,BitmapNumber,0,240,640,480);
dbSleep(2000);
while ( LoopGDK ( ) )
{
// Animation Expression Data
while (dbScanCode()==0) {
dbCLS();
dbPrint("ANIMATION DATA");
dbPrint("");
dbPrint("exist:"+dbAnimationExist(AnimNumber));
dbPrint("width:"+dbAnimationWidth(AnimNumber));
dbPrint("height:"+dbAnimationHeight(AnimNumber));
dbPrint("looped:"+dbAnimationLooping(AnimNumber));
dbPrint("playing:"+dbAnimationPlaying(AnimNumber));
dbPrint("paused:"+dbAnimationPaused(AnimNumber));
dbPrint("x:"+dbAnimationPositionX(AnimNumber));
dbPrint("y:"+dbAnimationPositionY(AnimNumber));
dbPrint("speed:"+dbAnimationSpeed(AnimNumber));
dbPrint("volume:"+dbAnimationVolume(AnimNumber));
dbPrint("");
dbPrint("Press Any Key");
dbSync();
}
}
// return back to windows
return;
}