This is probably just due to me being a complete beginner with DarkGDK, so I apologize for wasting people's time with my stupidity. I have made this code:
#include "DarkGDK.h"
// Globals
int ObjID;
// Structure for levels
struct Level
{
int World_Mesh;
float Start_Location[3]; // XYZ coordinate where the player starts in the level
};
// Function to load world objects
int Load_3D_World (char Local_Filepath[])
{
// Generate an ID number
int Local_ID;
Local_ID = ObjID;
++ObjID;
// Load the Mesh
dbSetDir ("Data/3D/World");
dbSetDir (Local_Filepath);
dbLoadObject ("mesh.x", Local_ID);
return Local_ID;
}
// Main function
void DarkGDK (void)
{
// Initialization
dbSyncOn ();
dbSetDisplayMode (dbDesktopWidth (), dbDesktopHeight(), 32);
dbSetWindowOff ();
dbAutoCamOff ();
dbHideMouse ();
dbColorBackdrop (dbRGB(0, 0, 0));
// Load test level
struct Level Test_Level;
Test_Level.World_Mesh = Load_3D_World ("test");
Test_Level.Start_Location{} = {-28.00, 16.00, 1.00};
// Temporary camera placement
dbPositionCamera (Test_Level.Start_Location{0}, Test_Level.Start_Location{1}, Test_Level.Start_Location{2});
// Main Loop
while (LoopGDK ())
{
// Temporary camera movement
dbRotateCamera (dbCameraAngleX() + (dbMouseMoveY() * .25), dbCameraAngleY() + (dbMouseMoveX() * .25), dbCameraAngleZ());
if (dbMouseClick() == 1)
{
dbMoveCamera (.1);
}
// Update screen
dbSync ();
}
return;
}
And it generates this error message:
1>------ Build started: Project: Project, Configuration: Debug Win32 ------
1>Compiling...
1>Main.cpp
1>c:\users\owner\my stuff\games\projects\game\project\main.cpp(42) : error C2143: syntax error : missing ';' before '{'
1>c:\users\owner\my stuff\games\projects\game\project\main.cpp(42) : error C2143: syntax error : missing ';' before '='
1>c:\users\owner\my stuff\games\projects\game\project\main.cpp(42) : error C2143: syntax error : missing ';' before '{'
1>c:\users\owner\my stuff\games\projects\game\project\main.cpp(42) : error C2143: syntax error : missing ';' before '}'
1>c:\users\owner\my stuff\games\projects\game\project\main.cpp(45) : error C2143: syntax error : missing ')' before '{'
1>c:\users\owner\my stuff\games\projects\game\project\main.cpp(45) : error C2661: 'dbPositionCamera' : no overloaded function takes 1 arguments
1>c:\users\owner\my stuff\games\projects\game\project\main.cpp(45) : error C2143: syntax error : missing ';' before '{'
1>c:\users\owner\my stuff\games\projects\game\project\main.cpp(45) : error C2143: syntax error : missing ';' before '}'
1>c:\users\owner\my stuff\games\projects\game\project\main.cpp(45) : error C2143: syntax error : missing ';' before ','
1>c:\users\owner\my stuff\games\projects\game\project\main.cpp(45) : error C2143: syntax error : missing ';' before '{'
1>c:\users\owner\my stuff\games\projects\game\project\main.cpp(45) : error C2143: syntax error : missing ';' before '}'
1>c:\users\owner\my stuff\games\projects\game\project\main.cpp(45) : error C2143: syntax error : missing ';' before ','
1>c:\users\owner\my stuff\games\projects\game\project\main.cpp(45) : error C2059: syntax error : ')'
1>c:\users\owner\my stuff\games\projects\game\project\main.cpp(48) : error C2059: syntax error : 'while'
1>c:\users\owner\my stuff\games\projects\game\project\main.cpp(49) : error C2143: syntax error : missing ';' before '{'
1>c:\users\owner\my stuff\games\projects\game\project\main.cpp(49) : error C2447: '{' : missing function header (old-style formal list?)
1>c:\users\owner\my stuff\games\projects\game\project\main.cpp(61) : error C2059: syntax error : 'return'
1>c:\users\owner\my stuff\games\projects\game\project\main.cpp(62) : error C2059: syntax error : '}'
1>c:\users\owner\my stuff\games\projects\game\project\main.cpp(62) : error C2143: syntax error : missing ';' before '}'
1>c:\users\owner\my stuff\games\projects\game\project\main.cpp(62) : error C2059: syntax error : '}'
1>Build log was saved at "file://c:\Users\Owner\My Stuff\Games\Projects\Game\Project\Debug\BuildLog.htm"
1>Project - 20 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I've been staring at this code for several days and I haven't been able to figure it out. I think it has something to do with the PositionCamera command, but I really don't know.
Hail to the king baby
I love Evil Dead.