try this for a simple "mouse look":
int MX = 0;
int MY = 0;
MX=dbMouseMoveY();
MY=dbMouseMoveX();
dbRotateCamera(dbCameraAngleX()+MX*0.4, dbCameraAngleY()+MY*0.4, dbCameraAngleZ());
instead of :
float cameraAngleX = 0.0f;
float cameraAngleY = 0.0f;
cameraAngleX = dbWrapValue(cameraAngleX + dbMouseMoveY() * 0.4f);
cameraAngleY = dbWrapValue(cameraAngleY + dbMouseMoveX() * 0.4f);
dbXRotateCamera(cameraAngleX);
dbYRotateCamera(cameraAngleY);
or you could try this for a whole "fps style" with cushioning:
(the below isnt my code, i think i got it originally from a shader demo that was written by green gandalf)
float ncr, ncf, ncx, ncy;
int cr, cf, cx, cy;
if(dbRightKey() || dbKeyState(32)) cr = -5;
if(dbLeftKey() || dbKeyState(30)) cr = 5;
if(dbUpKey() || dbKeyState(17)) cf = 5;
if(dbDownKey() || dbKeyState(31)) cf = -5;
ncr = dbCurveValue(cr, ncr, 5);
ncf = dbCurveValue(cf, ncf, 5);
cx += dbMouseMoveY()*0.2;
cy += dbMouseMoveX()*0.2;
if(cx > 80) cx = 80;
if(cx < -80) cx = -80;
ncx = dbCurveAngle(cx, ncx, 2);
ncy = dbCurveAngle(cy, ncy, 2);
dbMoveCamera(ncf);
dbRotateCamera(0, dbWrapValue(ncy - 90), 0);
dbMoveCamera(ncr);
dbRotateCamera(0, dbWrapValue(ncy + 90), 0);
dbRotateCamera(ncx, ncy, 0);
cr = 0; cf = 0;
EDIT : sorry left off 2 variables on the bottom of the cut/paste.
If it ain't broke.... DONT FIX IT !!!