Exemple #1
0
void DarkGDK ( void )
{
	dbSyncOn   ( );
	dbSyncRate ( 60 );
	dbDisableEscapeKey();
	SetCurrentDirectory("GameContents");
	dbSetWindowTitle("Gaming Level");

	int xCord = 0;
	int yCord = 0;
	int direction = 2; //up = 1, down = 2, left = 3, right = 4;
	int finished = 0; //Used to state whether the game has ended
	
	house.setWorld("stage1",xCord,yCord);	
	dbColorBackdrop(dbRGB(0,0,0));
	house.finishedPntr = &finished;

	while ( LoopGDK ( ) && !finished)
	{
		movePersonOrWorld(xCord, yCord, direction);
		//dbCenterText(510,80,dbStr(dbMouseX()));
		//dbCenterText(550,80,dbStr(dbMouseY()));
		// update the screen
		dbSync ( );
	}

	return;
}
Exemple #2
0
void DarkGDK()

{

	//Window title
	dbSetWindowTitle("Color The Box!");

	//Introduction
	dbPrint();
	dbPrint("Please enter a color to view the box.");
	dbPrint();

	//Variables
	int Red, Green, Blue;
	DWORD black = dbRGB(0, 0, 0);

	//Statement/set color
	Red = atoi( dbInput() );
	Green = atoi( dbInput() );
	Blue = atoi( dbInput() );
	DWORD usercolor = dbRGB(Red, Green, Blue);

	//Declare color
	dbInk(usercolor, black);

	//Draw the box
	dbBox(150, 100, 450, 500);

	//Wait for user to press a key
	dbWaitKey();

}
void DarkGDK()

{
	//Set variables
	int centerX = dbScreenWidth() / 2;	
	int centerY = dbScreenHeight() / 2;	
	int leftX = centerX - HALF;			
	int topY = centerY - HALF;			
	int rightX = centerX + HALF;		
	int lowerY = centerY + HALF;		
	
	//Set the window's title
	dbSetWindowTitle("Octagon Pattern");

	//Set colors
	DWORD black = dbRGB(0, 0, 0);
	DWORD red = dbRGB(255, 0, 0);

	//Draw the Octagons using the variables
	dbInk(red, black);
	drawOctagon(leftX, topY);		
	drawOctagon(leftX, lowerY);		
	drawOctagon(rightX, topY);		
	drawOctagon(rightX, lowerY);	

	//Wait for the user to press a key
	dbWaitKey();
}
void start()

{

	//Set window title
	dbSetWindowTitle("Peg/Square Game");

	//Set randomizer
	int seed = dbTimer();
	dbRandomize(seed);

}
Exemple #5
0
void DarkGDK ( void )
{
	dbSetWindowPosition ( dbScreenWidth()/3 , dbScreenHeight()/6); 
	dbSyncOn   ( );
	dbSyncRate ( 60 );
	dbSetWindowSize (800, 600);	
	dbSetWindowTitle ( "Labyrinth V 1.0");

	dbDisableEscapeKey ( );
	dbRandomize ( dbTimer ( ) );
	dbCLS();
	//Play();
	Menu();
	//Mazemain(2);
	return;
}
Exemple #6
0
void DarkGDK()

{

	//Set variables
	int X;
	int Y;

	//Window title
	dbSetWindowTitle("Treasure Map");

	//Set key color
	dbSetImageColorKey(0, 255, 0);

	//Load image
	dbLoadImage("treasure map.bmp", 1);

	//Display image
	dbPasteImage(1, 0, 0);

	//Enter X coordinate
	dbPrint("Please enter the X coordinate for treasure!");
	X = atoi( dbInput() );

	//Enter Y coordinate
	dbPrint("Please enter the Y coordinate for treasure!");
	Y = atoi( dbInput() );

	DWORD red = dbRGB(255, 0, 0);
	DWORD black = dbRGB(0, 0, 0);

	dbInk(red, black);

	//Draw the X
	dbLine(X-10, Y-10, X+10, Y+10);
	dbLine(X-10, Y+10, X+10, Y-10);


	//Wait for user to press a key
	dbWaitKey();

}
Exemple #7
0
void DarkGDK()

{

	//Set window title
	dbSetWindowTitle("Good-Bye Chef");

	//Load image
	dbLoadBitmap("chef2.jpg", 1);

	//Display image
	dbCopyBitmap(1, 0);
 
	//Wait for user to press a key
	dbWaitKey();

	//Blur image every 1 second
	dbBlurBitmap(0, 3);
	dbWait(WAIT);

	dbBlurBitmap(0, 6);
	dbWait(WAIT);

	dbBlurBitmap(0, 9);

	//Fade image every 1 second
	dbFadeBitmap(0, 75);
	dbWait(WAIT);

	dbFadeBitmap(0, 50);
	dbWait(WAIT);

	dbFadeBitmap(0, 25);
	dbWait(WAIT);

	dbFadeBitmap(0, 0);

	//Wait for user to press a key
	dbWaitKey();

}
void DarkGDK()
{
	//Declare variables
	int centerX;
	int centerY;

	//Set the window's title
	dbSetWindowTitle("Octagon Pattern");

	//Ask user for X coordinate
	dbPrint("Please enter the X coordinate of the Octagon");
	centerX = atoi( dbInput() );

	//Ask user for Y coordinate
	dbPrint("Please enter the Y coordinate of the Octagon");
	centerY = atoi( dbInput() );

	//Draw an Octagon using the user's coordinates
	drawOctagon(centerX, centerY);

	//Wait for the user to press a key
	dbWaitKey();
}