Bubba, I have run into similar problems, but I actually mimic the quake2 engine in terms of sharing resources...I've got a 'GameExport' class which links together all of the main objects that ever need to be used, and I just extern to it in every single file that needs to reference to it
Code:
class GameExport
{
public:
FPS_t mFPS;
BSP *mpBSP;
Player *mpPlayer;
Frustum mFrustum;
GameExport();
void HandleCommands(); //Goes through saved commands and acts on them
//Need some way to store parameters to commands, probably with
//a simple templated class
void (*pGameCycle)(void);
void (*pRenderScene)(void);
int CheckKeyBoard();
void CheckMessages();
void AddMessage(int);
void RequestMapChange(char*);
void ChangeRenderFunc(int); //changes pRenderScene to the memory address given
void ChangeGameCycleFunc(int); //changes pGameCycle to the memory address given
void ParseEntities(std::vector<VWorldObject*>*);
void SetEntityTeaming();
void ShutDown();
void KillEntities();
void KillBSP();
int MapChange(char *newmap); //Do anything to prevent re-loading the current?
int StartUp(char *mapname);
std::vector<VWorldObject*> mvWorldObjects;
std::vector<int> mEngineCommands;
char *pCurrentMap;
char *pNewMap;
int IsStateTrue(int);
inline void SetState(int);
inline void DisableState(int);
GlobalVars mVars;
unsigned int mGameStates;
HDC hDC;
HWND hWnd;
trigtable mTrigTable; //This builds sine and cosine tables upon startup -*
};
that's another thing, i am bad with globals, I don't even use private in my classes. However, C++ is great if you use it properly, and technically yes there's some overhead, but it's a tool, and the cost is reasonable.
Poly, how's digipen treating you? I'm going into Engineering next year, I didn't even end up applying to digipen.
EDIT:
poly, do you want to see the presentation when I'm finished so you can see where I used your picture? It's a very dumbed down project so "normal" people can understand it