While not surprised to see this forum is dead, I don't like to see a living being suffering. I think you have to use zread too.
Not my code, it was generated when the community still was rich:
#include "windows.h"
#include "DarkSDK.h"
void DarkSDK ( void )
{
dbCreateBitmap (1,dbScreenWidth(), dbScreenHeight());
dbPrint ( "Testing Draw To Back : Testing Draw To Back : Testing Draw To Back");
dbPrint ( "Testing Draw To Back : Testing Draw To Back : Testing Draw To Back");
dbPrint ( "Testing Draw To Back : Testing Draw To Back : Testing Draw To Back");
dbPrint ( "Testing Draw To Back : Testing Draw To Back : Testing Draw To Back");
dbPrint ( "Testing Draw To Back : Testing Draw To Back : Testing Draw To Back");
dbPrint ( "Testing Draw To Back : Testing Draw To Back : Testing Draw To Back");
dbPrint ( "Testing Draw To Back : Testing Draw To Back : Testing Draw To Back");
dbPrint ( "Testing Draw To Back : Testing Draw To Back : Testing Draw To Back");
dbPrint ( "Testing Draw To Back : Testing Draw To Back : Testing Draw To Back");
dbPrint ( "Testing Draw To Back : Testing Draw To Back : Testing Draw To Back");
dbPrint ( "Testing Draw To Back : Testing Draw To Back : Testing Draw To Back");
dbPrint ( "Testing Draw To Back : Testing Draw To Back : Testing Draw To Back");
dbPrint ( "Testing Draw To Back : Testing Draw To Back : Testing Draw To Back");
dbPrint ( "Testing Draw To Back : Testing Draw To Back : Testing Draw To Back");
dbPrint ( "Testing Draw To Back : Testing Draw To Back : Testing Draw To Back");
dbPrint ( "Testing Draw To Back : Testing Draw To Back : Testing Draw To Back");
dbPrint ( "Testing Draw To Back : Testing Draw To Back : Testing Draw To Back");
dbPrint ( "Testing Draw To Back : Testing Draw To Back : Testing Draw To Back");
dbPrint ( "Testing Draw To Back : Testing Draw To Back : Testing Draw To Back");
dbPrint ( "Testing Draw To Back : Testing Draw To Back : Testing Draw To Back");
dbPrint ( "Testing Draw To Back : Testing Draw To Back : Testing Draw To Back");
dbPrint ( "Testing Draw To Back : Testing Draw To Back : Testing Draw To Back");
dbPrint ( "Testing Draw To Back : Testing Draw To Back : Testing Draw To Back");
dbPrint ( "Testing Draw To Back : Testing Draw To Back : Testing Draw To Back");
dbPrint ( "Testing Draw To Back : Testing Draw To Back : Testing Draw To Back");
dbPrint ( "Testing Draw To Back : Testing Draw To Back : Testing Draw To Back");
dbPrint ( "Testing Draw To Back : Testing Draw To Back : Testing Draw To Back");
dbPrint ( "Testing Draw To Back : Testing Draw To Back : Testing Draw To Back");
dbPrint ( "Testing Draw To Back : Testing Draw To Back : Testing Draw To Back");
dbGetImage (1,0,0,dbScreenWidth(), dbScreenHeight());
dbCLS();
dbPrint ( "Object : Object : Object : Object : Object : Object : Object");
dbPrint ( "Object : Object : Object : Object : Object : Object : Object");
dbPrint ( "Object : Object : Object : Object : Object : Object : Object");
dbPrint ( "Object : Object : Object : Object : Object : Object : Object");
dbPrint ( "Object : Object : Object : Object : Object : Object : Object");
dbPrint ( "Object : Object : Object : Object : Object : Object : Object");
dbPrint ( "Object : Object : Object : Object : Object : Object : Object");
dbPrint ( "Object : Object : Object : Object : Object : Object : Object");
dbPrint ( "Object : Object : Object : Object : Object : Object : Object");
dbPrint ( "Object : Object : Object : Object : Object : Object : Object");
dbPrint ( "Object : Object : Object : Object : Object : Object : Object");
dbPrint ( "Object : Object : Object : Object : Object : Object : Object");
dbPrint ( "Object : Object : Object : Object : Object : Object : Object");
dbPrint ( "Object : Object : Object : Object : Object : Object : Object");
dbPrint ( "Object : Object : Object : Object : Object : Object : Object");
dbPrint ( "Object : Object : Object : Object : Object : Object : Object");
dbPrint ( "Object : Object : Object : Object : Object : Object : Object");
dbPrint ( "Object : Object : Object : Object : Object : Object : Object");
dbPrint ( "Object : Object : Object : Object : Object : Object : Object");
dbPrint ( "Object : Object : Object : Object : Object : Object : Object");
dbPrint ( "Object : Object : Object : Object : Object : Object : Object");
dbPrint ( "Object : Object : Object : Object : Object : Object : Object");
dbPrint ( "Object : Object : Object : Object : Object : Object : Object");
dbGetImage ( 2,0,0,dbScreenWidth()/2,dbScreenHeight()/2);
dbCLS();
dbPrint ( "Testing Draw To Front : Testing Draw To Front : Testing Draw To Front : Testing Draw To Front");
dbPrint ( "Testing Draw To Front : Testing Draw To Front : Testing Draw To Front : Testing Draw To Front");
dbPrint ( "Testing Draw To Front : Testing Draw To Front : Testing Draw To Front : Testing Draw To Front");
dbPrint ( "Testing Draw To Front : Testing Draw To Front : Testing Draw To Front : Testing Draw To Front");
dbPrint ( "Testing Draw To Front : Testing Draw To Front : Testing Draw To Front : Testing Draw To Front");
dbPrint ( "Testing Draw To Front : Testing Draw To Front : Testing Draw To Front : Testing Draw To Front");
dbPrint ( "Testing Draw To Front : Testing Draw To Front : Testing Draw To Front : Testing Draw To Front");
dbPrint ( "Testing Draw To Front : Testing Draw To Front : Testing Draw To Front : Testing Draw To Front");
dbPrint ( "Testing Draw To Front : Testing Draw To Front : Testing Draw To Front : Testing Draw To Front");
dbPrint ( "Testing Draw To Front : Testing Draw To Front : Testing Draw To Front : Testing Draw To Front");
dbPrint ( "Testing Draw To Front : Testing Draw To Front : Testing Draw To Front : Testing Draw To Front");
dbPrint ( "Testing Draw To Front : Testing Draw To Front : Testing Draw To Front : Testing Draw To Front");
dbGetImage ( 3,0,0,dbScreenWidth()/2,dbScreenHeight()/5);
dbCLS();
dbDeleteBitmap (1);
dbSetCurrentBitmap (0);
//Here is actual code
dbSyncOn();
dbSyncRate (60);
dbAutoCamOff();
dbColorBackdrop (0);
dbPositionCamera(0,0,-7.7);
//make plain to use for drawing to the back
dbMakeObjectPlane(1,12,8);
dbTextureObject(1, 1);
dbSetObjectTransparency (1,1);
//make object for middle drawing
dbMakeObjectSphere(2,5);
dbTextureObject(2, 2);
dbPositionObject(2,0,0,5);
//draw in front
dbMakeObjectPlane( 3,500,500);
dbPositionObject(3, 0, -50, 1000);
dbTextureObject (3, 3);
dbDisableObjectZRead (3);
dbSetObjectTransparency (3, 1);
int direction = 1;
do
{
if (direction == 1)
{
//dbPositionObject( 2,0,0,dbObjectPositionZ(2) + .05);
dbPositionObject( 1,0,0,dbObjectPositionZ(1) + .05);
//if (dbObjectPositionZ(2) >= 7)
if (dbObjectPositionZ(1) >= 7)
{
direction = 0;
}
}
if (direction == 0)
{
//dbPositionObject( 2,0,0,dbObjectPositionZ(2) - .05);
dbPositionObject( 1,0,0,dbObjectPositionZ(1) - .05);
//if (dbObjectPositionZ(2) <= -2)
if (dbObjectPositionZ(1) <= -2)
{
direction = 1;
}
}
if (dbSpaceKey()== 0)
{
dbDisableObjectZRead(1);
}
else
{
dbEnableObjectZRead (1);
}
if (dbReturnKey() == 0)
{
dbDisableObjectZRead(3);
}
else
{
dbEnableObjectZRead (3);
}
dbSetCursor(5,5);
dbPrint ( dbStr(dbObjectPositionZ(2)));
dbSetCursor (5,20);
if (dbObjectPositionZ(1) >= 2.5)
{
dbPrint ( "Sphere is behind plain");
}
if (dbObjectPositionZ(1) <= 1 )
{
dbPrint ( "Sphere is in front of plain");
}
dbPrint(dbStr(dbScreenFPS()));
dbSync();
}while (dbEscapeKey()==0);
}
I do not recommend you those negative numbers, and I think commands work fine "in their way".