Hello.
As the topic says, I have compiled a Dark GDK program that runs with no issues through debug now, but when I open the .exe in the debug file, it just sits with a black screen. Here's the source:
//Moon Lander
//A simple program that displays a planet surface and ship, and allows the user to move the ship down.
//Note: If the program gives a black screen at first, try maximizing the window and it should work.
#include "DarkGDK.h"
void DarkGDK ( void )
{
//First, let's set the color key to Pink (255,0,255).
dbSetImageColorKey(255,0,255);
// Turn on the sync rate and set the maximum rate to 60 fps.
dbSyncOn ( );
dbSyncRate ( 60 );
//Let's set the window's title to reflect the name of our project.
dbSetWindowTitle("Landing Spaceship");
//We'll load the planet's surface as bitmap 1.
dbLoadImage("planet surface.bmp", 1);
//Now we'll load up the ship as bitmap 2.
dbLoadImage("spaceship.bmp", 2);
//This will display the planet's surface at (0,0). Because this is the background,
//transparency is not necessary.
dbPasteImage(1,0,0,0);
dbSync();
//Next, let's display the ship at coordinates (165,50).
dbPasteImage(2,165,50,1);
dbSync();
dbWaitKey();
//Now we'll move the ship down by 20 when the user hits a key. dbCLS() will clear
//our screen, so we must repaste the background as well.
dbCLS();
dbPasteImage(1,0,0,0);
dbPasteImage(2,165,70,1);
dbSync();
dbWaitKey();
//Move down 20 more when user hits key.
dbCLS();
dbPasteImage(1,0,0,0);
dbPasteImage(2,165,90,1);
dbSync();
dbWaitKey();
//20 more.
dbCLS();
dbPasteImage(1,0,0,0);
dbPasteImage(2,165,110,1);
dbSync();
dbWaitKey();
//20 more.
dbCLS();
dbPasteImage(1,0,0,0);
dbPasteImage(2,165,130,1);
dbSync();
dbWaitKey();
//Last 20.
dbCLS();
dbPasteImage(1,0,0,0);
dbPasteImage(2,165,150,1);
dbSync();
dbWaitKey();
dbWaitKey();
return;
}
Am I just missing something in the code, or is it just some weird issue with Windows 7?