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 / Coin Flip help

Years of Service
User Offline
Joined: 31st Mar 2013
Posted: 31st Mar 2013 21:11
So anyone on. I'm not receiving any errors for this but can't seem to even get pass the "press any key to continue" screen

// include the Dark GDK header file (
#include "DarkGDK.h"

//Global Variables
int number = -1;
const int HEADS = 0;
const int TAILS = 1;
const int spriteFlip = 3;
const int coinFlipSprite= 3;
const int headsSprite = 1;
const int tailsSprite = 1;
const int coinX = 320;
const int coinY = 240;

//Function prototypes
void setUp();
void coinToss();

// main entry point for the application
void DarkGDK ( void )
dbSetWindowTitle("Coin Toss");

setUp(); // The setup function.
coinToss(); //The coinToss function

dbPrint("Welcome to the coin toss. Press any key to start the game!");

//Waits for the user to press any key.

coinToss(); //The coinToss function

// our main game loop
while ( LoopGDK ( ) )

// update the contents of the screen
dbSync ( );

// return back to Windows

void setUp()
// Load the images.
dbLoadImage("Heads.bmp", HEADS);
dbLoadImage("Tails.bmp", TAILS);

//Constant for the refresh rate.
const int REFRESH_RATE = 60;

//Seed the random number generator.
dbRandomize(dbTimer() );

//Disable auto refresh and set the refresh rate.

void coinToss()
number = dbRND(1);
Brendy boy
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 4th Apr 2013 14:06
set some brekpoints to see what is the last line that gets executed

Login to post a reply

Server time is: 2024-04-13 05:44:36
Your offset time is: 2024-04-13 05:44:36