DarkGDK code does not run as is. Can be made to run with extra coding but does not work with DarkGDK commands right out of the box.
// Dark GDK - The Game Creators - www.thegamecreators.com
// the wizard has created a very simple project that uses Dark GDK
// it contains the basic code for a GDK application
// whenever using Dark GDK you must ensure you include the header file
#include "DarkGDK.h"
void startGame();
void endGame();
int choice;
// the main entry point for the application is this function
void DarkGDK ( void )
{
dbPrint("1. Start Game");
dbPrint("2. End Game");
dbPrint("choice: ");
choice = dbInput();
if(choice = 1)
{
startGame();
}
else if(choice = 2)
{
endGame();
}
// turn on sync rate and set maximum rate to 60 fps
dbSyncOn ( );
dbSyncRate ( 60 );
// our main loop
while ( LoopGDK ( ) )
{
// update the screen
dbSync ( );
}
// return back to windows
return;
}
The same code in normal c++ visual studio 2008 runs fine with no extra work.
#include <iostream>
using namespace std;
void startGame();
void endGame();
int choice;
int main()
{
cout << "1. Start Game" << endl;
cout << "2. End Game" << endl;
cout << "choice: " << choice << endl;
cin >>choice;
if(choice = 1)
{
startGame();
}
else if(choice = 2)
{
endGame();
}
}
void startGame()
{
cout << "Starting Game!" << endl;
}
void endGame()
{
cout << "Ending Game" << endl;
}
Quote: "DGDK is using C++ environment/compiler and therefore must conform to its standards.
DBP is its own compiler and therefore can be cast as any type TGC creators made it to be.
"
I understand both these statements what I don't get is why normal c++ same code works and DGDK does not.
This is the error I get when I run the GDK code
error C2440: '=' : cannot convert from 'char *' to 'int'
Extra work and coding needs to be done to make it work, extra things to learn, extra things to remember, extra time spent trying to figure it out and waiting for answers from the forum because DGDK was not documented properly to begin with.