My stuff isn't loading. I think I have all the directories right, but I'm not sure.
This is what it looks like:
+VGCD
--Solution
--Intellisense Database
-+VCGD
---Main.cpp
---Project
---Debug
-+Media
--+media
----crosshair.png
----skybox2.x
----1
----2
----3
----4
----5
----6
This is Main.cpp:
// Dark GDK - The Game Creators - www.thegamecreators.com
// the wizard has created a very simple 3D project that uses Dark GDK
// it can be used as a starting point in making your own 3D games
// whenever using Dark GDK you must ensure you include the header file
//yay for frankenstein code!
#include "DarkGDK.h"
#define rollLeftKey 16;
#define rollRightKey 18;
float CameraAngleX;
float CameraAngleY;
void updateLocalPlayer(void)
{
dbPositionMouse(dbScreenWidth()/2, dbScreenHeight()/2);
dbPasteImage ( 12 , ( dbScreenWidth( ) / 2 ) - 16 , ( dbScreenHeight( ) / 2 ) - 16 , 1 );
float cx = dbCameraPositionX ( 0 );
float cy = dbCameraPositionY ( 0 ) -40;
float cz = dbCameraPositionZ ( 0 );
float OldCamAngleY = dbCameraAngleY ( 0 );
float OldCamAngleX = dbCameraAngleX ( 0 );
CameraAngleY = dbWrapValue ( ( dbCameraAngleY ( 0 ) + dbMouseMoveX ( ) * 0.4f ) );
CameraAngleX = dbWrapValue ( ( dbCameraAngleX ( 0 ) + dbMouseMoveY ( ) * 0.4f ) );
if ( CameraAngleX > 80 && CameraAngleX <180 ) CameraAngleX = 80;
if ( CameraAngleX < 270 && CameraAngleX > 180 ) CameraAngleX = 270;
dbYRotateCamera ( 0 , dbCurveAngle ( CameraAngleY , OldCamAngleY , 6 ) );
dbXRotateCamera ( 0 , dbCurveAngle ( CameraAngleX , OldCamAngleX , 6 ) );
dbPositionCamera ( 0 , dbCameraPositionX ( 0 ) , 40 , dbCameraPositionZ ( 0 ) );
}
void DarkGDK ( void )
{
dbSyncOn ( );
dbSyncRate ( 60 ); // maxFPS = 60
dbSetDir("media\\");
dbLoadImage ("media\\crosshair.png" , 12 , 1 );
dbLoadObject ( "media\\skybox2.x", 200 ); // load the skybox model
dbSetObjectLight ( 200, 0 ); // turn lighting off
dbSetObjectTexture ( 200, 3, 1 ); // set texture properties
dbPositionObject ( 200, 0, 0, 0 ); // position the skybox
dbScaleObject ( 200, 30000, 30000, 30000 ); // and finally scale
dbHideMouse();
float rollspeed=0.4f;
while ( LoopGDK ( ) )
{
dbSync();
if (dbKeyState(16)==1)
dbRollCameraLeft(rollspeed);
if (dbKeyState(18)==1)
dbRollCameraRight(rollspeed);
updateLocalPlayer();
}
dbShowMouse();
return;
}
Don't make fun of me, its a work in progress. I'm new to Dark GDK and multi-file things. I'm used to DOS apps.
I don't need an oven to make my cookies.