Hi. I created a class named ObjectFactory which I will use to create objects. I also created a class Block which will create rectangles. (Yeah I know there is a default rect in darkgdk but I use my custom one for testing). So, block inherits ObjectFactory, however the image isn't displayed.
ObjectFactory.h and .cpp
Block.h and .cpp
and main:
#include "DarkGDK.h"
#include "ObjectFactory.h"
#include "Block.h"
void DarkGDK ( void )
{
ObjectFactory factory;
ObjectFactory *b = new Block("backdrop.bmp");
// turn on sync rate and set maximum rate to 60 fps
dbSyncOn();
dbSyncRate(60);
// our main loop
while ( LoopGDK ( ) )
{
// update the screen
dbSync ( );
}
delete b;
// return back to windows
return;
}
I only get a black screen..