Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / help with scope

Author
Message
marijn1
15
Years of Service
User Offline
Joined: 14th Sep 2009
Location:
Posted: 14th Sep 2009 17:31
#include "DarkGDK.h"
// the main entry point for the application is this function

int fCameraAngleX;
int fCameraAngleY;

void mouse(void);
//void scope(void);

void DarkGDK ( void )
{
dbAutoCamOff();
// turn on sync rate and set maximum rate to 60 fps
dbSyncOn ( );
dbSyncRate ( 60 );

dbLoadObject("Atomiser.x",10);
dbLoadObject("Bezerker.x",20);
dbLoadObject("crosshair.bmp",7761);

dbAutomaticCameraCollision(0,2,1);
dbMakeObjectCube(2,10);
dbPositionObject(2,50,10,100);
dbSetObjectCollisionToBoxes ( 2 );

dbPositionObject(20,100,0,100);
dbRotateObject(20,-90,180,0);
dbRotateObject(10,-90,0,0);
dbPositionObject(10,10,-15,20);
dbLockObjectOn(10);
dbSetObjectCollisionToPolygons ( 20 );
// our main loop
while ( LoopGDK ( ) )
{
mouse( );
//scope( );
dbMakeMatrix(4,100,100,10,10);
// update the screen
dbSync ( );
}
// return back to windows
return;
}

void mouse(void)
{
if (dbUpKey())
{
dbMoveCamera(2);
}
if (dbDownKey())
{
dbMoveCamera(-2);
}
if (dbLeftKey())
{
dbYRotateCamera ( 0 , dbCameraAngleY( 0 ) - 90 );
dbMoveCamera(2);
}
if (dbRightKey())
{
dbYRotateCamera ( 0 , dbCameraAngleY( 0 ) + 90 );
dbMoveCamera(2);
}

fCameraAngleX = dbWrapValue ( fCameraAngleX + dbMouseMoveY ( ) * 0.2f );
fCameraAngleY = dbWrapValue ( fCameraAngleY + dbMouseMoveX ( ) * 0.2f );
// rotate camera
dbXRotateCamera ( fCameraAngleX );
dbYRotateCamera ( fCameraAngleY );
}
//void scope(void);
//{
//if ( (dbMouseClick() == 2 || dbMouseClick() ==3) && gun_pickup==1)
//{
// dbSetCameraFOV ( 0, 25.0f) ;
// dbShowSprite(7761);
// dbHideobject(10);
// dbHideObject(110);
// zoom=1;
//}
//else
//{
// dbSetCameraFOV ( 0, 62.0f) ;
//dbHideSprite(7761);
// if (gun==2)
// {
// dbShowObject(10);
// }
//zoom=0;
// }
//}
//}

can someone please help me what i'm doing wrong?
Isocadia
15
Years of Service
User Offline
Joined: 24th Jul 2009
Location:
Posted: 14th Sep 2009 20:04
I can't help you with your code, but if you don't want a warning you better edit your post and put your code between
bracets.

Isocadia
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 14th Sep 2009 22:49 Edited at: 14th Sep 2009 22:49
do you mean the scope function?



this code works, if you define the mentioned variables

Login to post a reply

Server time is: 2024-11-20 15:37:05
Your offset time is: 2024-11-20 15:37:05