Ive tried all the samples and they all work but here i have converted a dbpro example i have into darkgdk vis 2005 source and my objects arent visable.
It basically uses a blob technique which should chow a square technique of the program title and another mmovable by the mouse and finally a 3rd that is an animated via a smoke avi image is this all compatible with GDK because it dont seem to work below is the not working code.
#include "DarkGDK.h";
void blob_effect_setup(void);
void blob_effect_update(void);
void blob_effect_show(void);
void blob_effect_hide(void);
int const blob_first = 50000;
int const blob_max = 3;
float const blob_max_size = 120.0f;
float const blob_min_size = 120.0f;
float const blob_xtarget = 0.0f;
float const blob_ytarget = 0.0f;
//float const blob_acceleration = 0.04f;
float blob_xpos[blob_max];
float blob_ypos[blob_max];
float blob_xspeed[blob_max];
float blob_yspeed[blob_max];
BOOLEAN blob_active = 0;
DWORD const SthPole =9194155;
DWORD const SthAmerica=16646144;
DWORD const NthAmerica=16683783;
DWORD const Europe=851475;
DWORD const Africa=16776217;
DWORD const Asia=44519;
DWORD const Australia=5460628;
void DarkGDK ( void )
{
dbSyncOn ( );
dbSetDisplayMode (800,600,32);
dbBackdropOn();
dbColorBackdrop (dbRGB(0,0,0));
dbAutoCamOff();
dbSyncRate(60);
DWORD MousePoint;
char continent[11];
int mousehold;
dbSetCurrentBitmap (0);
dbLoadSound("Sounds/fire.wav",1);
dbPlaySound(1);
dbLoopSound(1);
blob_effect_setup();
blob_effect_show();
while (dbEscapeKey()==0){
if (dbMouseClick()){
mousehold=dbMouseY();
if (mousehold>=120 && mousehold <220){
//freememory():dbSetDisplayMode (640,480,32);
//playoptionsetup():dbSync():selectcountry()
//dbSetDisplayMode (800,600,32);
}
//if mousehold>=220 and mousehold <320 then gosub options
//if mousehold>=320 and mousehold <420 then gosub history
//if mousehold>=420 and mousehold <520 then freememory():end
}
blob_effect_update();
dbSync();
}
}
void blob_effect_setup(void){
dbLoadImage ("graphics/whiteblob.png",blob_first+1,1);
dbLoadImage ("graphics/squareblob.png",blob_first+2,1);
dbLoadAnimation ("Animations/smoke.avi",1);
dbSetAnimationSpeed (1,25);
dbPlayAnimationToImage (1,blob_first+3,0,0,dbAnimationWidth(1),dbAnimationHeight(1));
dbLoopAnimation (1);
dbLoadImage ("graphics/subtractive2.jpg",blob_first+4,1);
int blobtexture;
int blobcolor;
for (int j = 1;j<blob_max;j++){
blobcolor=1;
blobtexture=blob_first+blobcolor;
switch ( j ){
case 1:
dbMakeObjectPlain ((blob_first+j),1000,150);
dbTextureObject ((blob_first+j),blob_first+2);
dbMakeObjectPlain ((blob_first+j)+100,1000,150);
dbTextureObject ((blob_first+j)+100,blob_first+2);
break;
case 2:
dbMakeObjectPlain ((blob_first+j),1000,150);
dbTextureObject ((blob_first+j),blob_first+2);
dbMakeObjectPlain ((blob_first+j)+100,1000,150);
dbTextureObject ((blob_first+j)+100,blob_first+3);
break;
default:
dbMakeObjectPlain (blob_first+3,1000,750);
dbTextureObject (blob_first+3,blob_first+3);
dbSetObjectTransparency (blob_first+3,1);
dbGhostObjectOn (blob_first+3);
dbSetObjectAmbient (blob_first+3,0);
dbHideObject (blob_first+3);
dbMakeObjectPlain(blob_first+3+100,1000,750);
dbTextureObject (blob_first+3+100,blob_first+3);
dbSetObjectTransparency (blob_first+3+100,1);
dbGhostObjectOn (blob_first+3+100);
dbSetObjectAmbient (blob_first+3+100,0);
dbHideObject(blob_first+3+100);
break;
}
dbDisableObjectZWrite(blob_first+j);
dbGhostObjectOn(blob_first+j,2);
dbSetObjectLight(blob_first+j,0);
dbHideObject(blob_first+j);
dbDisableObjectZWrite((blob_first+j)+100);
dbGhostObjectOn ((blob_first+j)+100,2);
dbSetObjectLight ((blob_first+j)+100,0);
dbHideObject ((blob_first+j)+100);
}
dbMakeObjectPlain (blob_first,102.4f,76.8f);
dbTextureObject (blob_first,blob_first+4);
dbDisableObjectZWrite(blob_first);
dbGhostObjectOn (blob_first,1);
dbPositionObject (blob_first,0.0f,0.0f,-575.1f);
dbSetObjectLight (blob_first,0);
dbHideObject (blob_first);
}
void blob_effect_update(void){
int j,mousehold;
if (blob_active == 1) {
j=1;blob_xpos[j] = 0;blob_ypos[j] = 340;
dbPositionObject (blob_first+j,blob_xpos[j],blob_ypos[j],0.0f);
dbPositionObject ((blob_first+j)+100,blob_xpos[j],blob_ypos[j],0.0f);
j=2;mousehold=dbMouseY();
dbHideObject(blob_first+j);
blob_xpos[j] = 0.0f;
dbHideObject ((blob_first+j)+100);
if (mousehold>=120 && mousehold <220){
blob_ypos[j] = 340-170;dbShowObject (blob_first+j);dbShowObject ((blob_first+j)+100);}
if (mousehold>=220 && mousehold <320) {
blob_ypos[j] = 340-320;dbShowObject (blob_first+j);dbShowObject ((blob_first+j)+100);}
if (mousehold>=320 && mousehold <420) {
blob_ypos[j] = 340-460;dbShowObject (blob_first+j);dbShowObject ((blob_first+j)+100);}
if (mousehold>=420 && mousehold <520) {
blob_ypos[j] = 340-570;dbShowObject (blob_first+j);dbShowObject ((blob_first+j)+100);}
dbPositionObject (blob_first+j,blob_xpos[j],blob_ypos[j],-1);
dbPositionObject ((blob_first+j)+100,blob_xpos[j],blob_ypos[j],-1);
j=3;blob_xpos[j] = 0.0f;blob_ypos[j] = 100.0f;
dbPositionObject (blob_first+j,blob_xpos[j],blob_ypos[j],0.0f);
dbPositionObject ((blob_first+j)+100,blob_xpos[j],blob_ypos[j],0.0f);
}
}
void blob_effect_show(void){
for (int j=1;j<blob_max;j++){
blob_xpos[j] = dbRND(1000.0f)-400.0f;
blob_ypos[j] = dbRND(700.0f)-200.0f;
blob_xspeed[j] = 0.0f;
blob_yspeed[j] = 0.0f;
dbPositionObject (blob_first+j,blob_xpos[j],blob_ypos[j],0.0);
dbPositionObject ((blob_first+j)+100,blob_xpos[j],blob_ypos[j],0.0);
dbShowObject (blob_first+j);
dbShowObject ((blob_first+j)+100);
}
dbShowObject (blob_first);
blob_active = 1;
dbPositionCamera (0.0f,0.0f,-639.0f);
dbPointCamera (0.0f,0.0f,0.0f);
}
void blob_effect_hide(void){
for (int j = 3;j<blob_max;j++) {
dbHideObject (blob_first+j);
dbHideObject ((blob_first+j)+100);
}
dbHideObject (blob_first);
blob_active = 0;
}
fubar