Have you looked at GDK.NET? Although I have it I really haven't looked at it yet. However, if images and sprites are truly OO in it then you're almost assured of working in a strictly OO environment.
XNA provides "game components" from which you can derive your own component. These game components have their update and draw functions built in and the components themselves have an active/inactive type of switch. The primary control runs through a list of each of the game components and calls the update and draw functions of the components that are active. This would be very easy to build into your own coding in C++.
One of the GDK games I started to work on is designed something like this:
#include "DarkGDK.h"
#include "DarkCap.h"
#include "Image.h"
#include "Sprite.h"
#include "Mouse.h"
#include "CapLayout.h"
// the main entry point for the application is this function
void DarkGDK ( void )
{
int Decoy;
DarkCap theGame;
theGame.Run();
return;
}
I could have designed this a little bit more compactly and had theGame declared as a global except that there are things you can't do in Dark GDK until the system has been initialized.
Not to get too complete here but the DarkCap header file looks like this.
///////////////////////////////////////////////////////////
// class file for a DarkGDK game
// predicated on the concept that making the game an object
// will allow everything to be initialized for Dark GDK
///////////////////////////////////////////////////////////
#ifndef _DARKGCAP_H_LAC
#define _DARKCAP_H_LAC
#include "dbUtility.h"
#include "Image.h"
#include "Bitmap.h"
#include "Sprite.h"
#include "ScanCodes.h"
/////////////////////////////
// screen is define as a
// number zero bitmap, mostly
// for copying purposes
/////////////////////////////
#define Screen 0
#define bgWidth 800
#define bgHeight 600
#define pixelDepth 32
enum stage {intro=1, menu, options, loadlevel, game, interlude, design, end};
class DarkCap
{
private:
enum stage currentStage;
// methods (private)
void Intro(void);
void Menu (void);
void Play (void);
void LoadLevel (void);
void Interlude(void);
void Options (void);
void Design (void);
void InitDesign();
public:
DarkCap()
{
dbSetWindowSize (bgWidth, bgHeight);
// dbSetDisplayMode(bgWidth, bgHeight, pixelDepth);
dbSetDisplayModeAntialias(bgWidth, bgHeight, pixelDepth, 0, 1, 0);
dbSetWindowOn();
dbSyncOff ( );
dbSyncRate ( 160 );
dbDisableEscapeKey ( );
dbRandomize ( dbTimer ( ) );
currentStage = design;
}
void Run ();
};
#endif
So you can see how the constructor takes care of setting up the system. This could be used, in part, as a parent class for your own games to derive from. If I hadn't been in a hurry I'd have created a constructor that took parameters also.
Lilith, Night Butterfly
I'm not a programmer but I play one in the office