Say I have this:
#pragma comment ( lib, "DarkPhysics.lib" )
#pragma comment ( lib, "DarkAI.lib" )
#pragma comment ( lib, "DarkLights.lib" )
#pragma comment ( lib, "ShaderData.lib" )
void DarkGDK ( void ) {
//Settings
dbSyncOn();
dbPhyStart();
dbPhySetGravity(0,-200,0);
dbSyncRate(60);
dbBackdropOn();
dbPositionCamera(0,0,-10,30);
//Player
dbMakeObjectBox(1,10,30,10);
dbPositionObject(1,0,50,0);
dbColorObject(1, RGB(0,255,0));
//Other Objects
dbMakeObjectBox(2,200,1,200);
dbColorObject(2,RGB(126,235,21));
dbMakeObjectCube(3,80);
dbColorObject(3,RGB(255,0,0));
dbPositionObject(3,0,0,30);
dbMakeObjectSphere(4,20);
dbColorObject(4,RGB(255,0,0));
dbPositionObject(4,0,0,-50);
//Setting up physics
dbPhyMakeBoxCharacterController(1,0,50,0,5,15,5,1,5,15);
dbPhyMakeRigidBodyStaticMesh(2);
dbPhyMakeRigidBodyStaticMesh(3);
dbPhyMakeRigidBodyStaticMesh(4);
//Camera
dbRotateCamera(0,0,0,0);
//Loop
while( LoopGDK ( ) ) {
//Declare player position as x,y,z
float x = dbObjectPositionX(1);
float y = dbObjectPositionY(1);
float z = dbObjectPositionZ(1);
//Movement
if (dbKeyState(200) == 1) {
}
if (dbKeyState(208) == 1) {
}
if (dbKeyState(205) == 1) {
}
if (dbKeyState(203) == 1) {
}
//Position camera to player
dbPositionCamera(0,x,y,z-100);
dbShowObject(2);
//Display x,y,z
dbInk(RGB(250,0,160),RGB(250,0,160));
dbText(0,0,dbStr((int)x));
dbText(0,10,dbStr((int)y));
dbText(0,20,dbStr((int)z));
//Update Screen and Physics
dbPhyUpdate();
dbSync();
}
}
but I want this to be in a different window
//Movement
if (dbKeyState(200) == 1) {
}
if (dbKeyState(208) == 1) {
}
if (dbKeyState(205) == 1) {
}
if (dbKeyState(203) == 1) {
}
How do I call that window in that part of the main code??
Always program as if the person maintaining your program is a psychopath that knows where you live