For some strange reason, every time i try to load an image in the GDK, it never loads. I mean it load, but when i convert it to a sprite, it doesn't show up. Here is my code.
#include "DarkGDK.h"
#include <globStruct.h>
struct PADDLES
{
int image_num;
int Sprite_num;
int X,Y;
int score;
};
struct BALL
{
int Image_Num;
int Sprite_Num;
int X,Y;
int score;
};
PADDLES Player_P;
PADDLES Enemy_P;
BALL Ball_B;
int LoadBall();
int LoadPlayer();
int LoadEnemy();
int DrawBall();
int DrawPlayer();
int DrawEnemy();
void DarkGDK ( void )
{
dbSyncOn ( );
dbSyncRate ( 60 );
if(!LoadBall())
{
MessageBoxA(NULL,"The sprites could not be loaded","Error # 0x01",MB_OK);
return;
}
while ( LoopGDK ( ) )
{
if(!DrawBall())
{
MessageBoxA(NULL,"Ball could not be drawn","OK",MB_OK);
return;
}
dbSync ( );
}
return;
}
int LoadBall()
{
Ball_B.Image_Num = 1;
Ball_B.X = dbScreenWidth()/2;
Ball_B.Y = dbScreenHeight()/2;
dbLoadImage("Ball\Ball_pong.bmp",Ball_B.Image_Num);
return 1;
}
int DrawBall()
{
Ball_B.Sprite_Num = 1;
dbSprite(Ball_B.Sprite_Num,Ball_B.X, Ball_B.Y,Ball_B.Image_Num);
return 1;
}
thanks for any advice you can give me.
"Originally I was going to have a BS on it but you know how that would be. I can't walk around with the letters BS on me." More or less a qoute by Syndrome from Jack, Jack, attack