#include "DarkGDK.h"
#include "GlobalLibrary.h"
void DarkGDK ()
{
dbLoadImage("wall.bmp",1);
dbSprite(1,100,100,1);
while(LoopGDK())
{
dbSync();
}
for (int i = 0; i < 9; i++)
{
dbDeleteImage(i);
dbDeleteSprite(i);
}
return;
}
code for latest game just a test for a picture when I opened game it was black no wall
old game
ill split the function because its in two seperate files
function
void PongSetup(void)
{
dbCenterText(505,384,"Press Space To Commence Play");
if(dbSpaceKey() == 1)
{
dbCLS();
dbSprite(3,0,0,2);
dbSprite(4,0,0,3);
dbSprite(5,1024,0,3);
dbSprite(6,0,768,2);
dbSprite(1,180,384,5);
dbSprite(2,844,384,5);
dbSprite(7,512,360,4);
dbCenterText(102,30,"Player 1 Score:" + nScore1);
dbCenterText(922,30,"Player 2 Score:" + nScore2);
}
}
main loop more after just not required
#include "Pong.h"
#include "Player1.h"
#include "Player2.h"
#include "Game.h"
enum eMode
{
eGameSetup,
eGamePressToPlay,
eGamePlay,
eGameWin,
eGameRestart,
};
eMode g_eGameMode = eGameSetup;
void DarkGDK(void)
{
dbLoadImage("BackDrop.bmp",1);
dbLoadImage("TopWall.bmp",2);
dbLoadImage("SideWall.bmp",3);
dbLoadImage("Ball.bmp",4);
dbLoadImage("Bat.bmp",5);
dbDisableEscapeKey();
while(LoopGDK())
{
if (dbEscapeKey() == 1)
{
break;
}
PongSetup();
dbSync();
}
for (int i = 0; i < 9; i++)
{
dbDeleteImage(i);
dbDeleteSprite(i);
}
return;
}