Can anyone else confirm that the following crashes (exits back to Windows) :
// Dancer.cpp : Defines the entry point for the application.
//
#include "DarkSDK.h"
#define RND(x) ((float) dbRnd((x))/(float) (x))
#define dbRGB(a,b,c) dbRgb((a),(b),(c))
void DarkSDK(void)
{
register float cx,cy,cz,lx,ly,lz;
register int r;
dbSyncOn();
dbSyncRate(0);
dbLoadMusic("mediamisty.mp3",1);
dbLoopMusic(1);
dbSync();
dbPrint("Loading lots of data - and calculating 8Mb of it.");
dbPrint("Please Wait.");
dbSync();
dbLoadObject("mediacoolbob.x",1);
dbLoadImage("mediabump.bmp",1);
dbLoadImage("mediabump.tga",2);
// Create our camera arm
dbMakeObjectSphere(3,1);
dbPositionObject(3,0,50,0);
dbMakeMeshFromObject(1,3);
dbAddLimb(3,1,1);
dbOffsetLimb(3,1,1650.0,1500,0);
dbCloneObject(4,1);
dbYRotateObject(4,30.0);
dbPositionObject(4,400.0,0.0,400.0);
dbCloneObject(5,1);
dbYRotateObject(5,50.0);
dbPositionObject(5,200.0,0.0,-400.0);
dbColorBackdrop(dbRGB(80,80,80));
dbAutoCamOff();
cx = 0.0;
cy = 415.0;
cz = -684.0;
dbMakeObjectPlane(2,6000,6000);
dbXRotateObject(2,270.0);
dbFixObjectPivot(2);
dbPositionObject(2,0,-50,0);
dbTextureObject(2,1);
dbScaleObjectTexture(2,16,16);
dbSetBumpMappingOn(2,2);
dbSetObjectSpeed(1,25);
dbLoopObject(1);
dbLoadEffect("mediaMetallicFlakes.fx",1,1);
dbLoadEffect("mediaMetallicFlakes.fx",2,1);
dbLoadEffect("mediaMetallicFlakes.fx",3,1);
dbSetObjectEffect(1,1);
dbSetObjectEffect(4,2);
dbSetObjectEffect(5,3);
dbSetObjectSpeed(4,15+dbRnd(10));
dbLoopObject(4);
dbSetObjectSpeed(5,15+dbRnd(10));
dbLoopObject(5);
dbMakeObjectSphere(99,5,50,50);
dbSetObjectCull(99,0);
dbSetObjectLight(99,0);
dbPositionObject(99,10000,10000,10003.75);
dbPositionObject(0,10000,10000,10000);
dbRotateCamera(0,0,0,0);
dbScaleObjectTexture(99,4,1);
//dbSetAmbient(99,0);
dbSetPointLight(0,10000,10000,10000);
dbYRotateObject(99,45);
dbSetCameraFOV(0,90);
dbMakeCamera(1);
dbSetCameraToImage(1,99,512,512);
dbTextureObject(99,99);
dbSetEffectOn(99,"mediabubble.fx",0);
dbSetCurrentCamera(1);
while(LoopSDK())
{
if (dbEscapeKey())
{
return;
}
r=dbMakeVector4(1);
dbSetVector4(1,RND(100),RND(100),RND(100),RND(100));
dbSetEffectConstantVector(1,"k_d",1);
dbSetVector4(1,RND(100),RND(100),RND(100),RND(100));
dbSetEffectConstantVector(2,"k_d",1);
dbSetVector4(1,RND(100),RND(100),RND(100),RND(100));
dbSetEffectConstantVector(3,"k_d",1);
r=dbDeleteVector4(1);
lx=dbLimbPositionX(3,1);
ly=dbLimbPositionY(3,1);
lz=dbLimbPositionZ(3,1);
dbPositionCamera(lx,ly,lz);
dbPointCamera(0,50,0);
dbCenterText(dbScreenWidth()>>1,20,"FX SYSTEM WITHIN A FX SYSTEM");
dbSync();
}
}
The media is availiable here
http://homepages.nildram.co.uk/~nickk/html/darksdk.html