I checked and ran the file on my laptop and it runs fine ( in non-dual screen mode), I don't get any flashing. The program has a resolution of 1336, 768. (widescreen). I have change my c++ code top use subs now instead of labels so I'll post a new exe with this aswell
When using the program don't what ever you do press enter cause im still debugging it and if you press enter it ends up in a really bad loop of continually loading objects into the memory. (tried this for 10 mins and it loaded over 700mb (and still counting :L)). To exit just press ESC.
Heres the first 150 lines of my code:
#include "DarkGDK.h"
#include "SC_Collision.h"
#include <string>
int queID = 0;
int returnbmp = 0;
int storeinvent = 0;
int weaponsinvent = 0;
int currInvent = 0;
int score = 0;
int lives = 5;
int injump = 0;
int hjump = 0;
int x = 50;
int y = 10;
int z = 50;
int a = 60;
int d = 400;
int h = 10;
int s = 25;
int pause=0;
int xtodo=800;
int ztodo=400;
void mainmenu ( void );
void helpmenu ( void );
void LoadCampaign ( void );
void checkcollision ( void );
void chooseQ ( void );
void chooseQstore ( void );
void control ( void );
void Map002 ( void );
void DarkGDK ( void )
{
dbSetDir ( "C:\\Users\\Owen\\Documents\\Visual Studio 2008\\Projects\\Dark GDK - Game1\\Dark GDK - Game1\\Debug\\\\");
// turn on sync rate and set maximum rate to 60 fps
dbSyncOn ( );
dbSyncRate ( 60 );
SC_Start( );
dbMakeMemblock ( 1, 1 );
dbDeleteMemblock (1);
dbMaximizeWindow();
dbSetWindowOff();
dbSetDisplayMode (1366, 768, 32);
dbCLS ();
dbSetTextFont ("Chiller");
dbSetTextSize (30);
dbSetImageColorKey (255,255,255);
dbCLS (dbRGB ( 0, 0, 0));
dbInk (dbRGB(255,255,255), dbRGB(0,0,0));
dbLoadImage ( "Title.bmp", 254);
dbSprite (254, 300, 50, 254);
dbShowSprite (254);
dbLoadImage ( "MenuB1.bmp", 7);
dbLoadImage ( "MenuB2.bmp", 8);
dbLoadImage ( "MenuB3.bmp", 9);
dbLoadImage ( "MenuB4.bmp", 6);
dbSprite (7, 35, 600, 7);
dbSprite (8, 372, 600, 8);
dbSprite (9, 699, 600, 9);
dbSprite (6, 1036, 600, 6);
dbSetSpriteAlpha (7, 255);
dbSetSpriteAlpha (8, 20);
dbSetSpriteAlpha (9, 20);
dbSetSpriteAlpha (6, 20);
mainmenu();
}
void mainmenu()
{
dbSync ( );
dbSync();
dbShowSprite (254);
dbShowSprite (7);
dbShowSprite (8);
dbShowSprite (9);
dbShowSprite (6);
while ( LoopGDK ( ) )
{
dbSync ( );
//dbSync();
dbCLS (dbRGB ( 0, 0, 0));
if (dbReturnKey() == 1)
{
if (dbSpriteAlpha(7) == 255)
{
dbHideSprite(7);
dbHideSprite(8);
dbHideSprite(9);
dbHideSprite(6);
LoadCampaign();
}
if (dbSpriteAlpha(8) == 255)
{
}
if (dbSpriteAlpha(6) == 255)
{
}
if (dbSpriteAlpha(9) == 255)
{
helpmenu();
}
}
if (dbRightKey() == 1)
{
if (dbSpriteAlpha(9) == 255)
{
dbSetSpriteAlpha(7, 20);
dbSetSpriteAlpha(8, 20);
dbSetSpriteAlpha(9, 20);
dbSetSpriteAlpha(6, 255);
}
if (dbSpriteAlpha(8) == 255)
{
dbSetSpriteAlpha(7, 20);
dbSetSpriteAlpha(8, 20);
dbSetSpriteAlpha(9, 255);
dbSetSpriteAlpha(6, 20);
}
if (dbSpriteAlpha(7) == 255)
{
dbSetSpriteAlpha(7, 20);
dbSetSpriteAlpha(8, 255);
dbSetSpriteAlpha(9, 20);
dbSetSpriteAlpha(6, 20);
}
dbWait(150);
}
if (dbLeftKey() == 1)
{
if (dbSpriteAlpha(8) == 255)
{
dbSetSpriteAlpha(7, 255);
dbSetSpriteAlpha(8, 20);
dbSetSpriteAlpha(9, 20);
dbSetSpriteAlpha(6, 20);
}
if (dbSpriteAlpha(9) == 255)
{
dbSetSpriteAlpha(7, 20);
dbSetSpriteAlpha(8, 255);
dbSetSpriteAlpha(9, 20);
dbSetSpriteAlpha(6, 20);
}
if (dbSpriteAlpha(6) == 255)
{
dbSetSpriteAlpha(7, 20);
dbSetSpriteAlpha(8, 20);
dbSetSpriteAlpha(9, 255);
dbSetSpriteAlpha(6, 20);
}
dbWait(150);
}
dbText(100, 700, "Game for Unit 4 Owen Michael Pemberton 2010 (C++ Version)");
dbText(602,5,"------Main Menu------");
}
}