Original Post
What is the best way to structure an application in C++? My structure looks something like this:
Application
-cInput Manager
-cMusic Manager
-cLevel
--cTexture Manager
--cRoom
---cTexture Manager
---cSquare
--cRandomizer
-cPlayer
--cRandomizer
-cCamera
-cCursor
--cTexture Manager
It is a very Diablo-ish RPG with a random level generator that creates rectangular rooms. My biggest problem is I need a reference to the Texture Manager as well as other things and I am not sure how to do it properly. It works in my game but I dont know if I am using a pointer (what I want) or copying the whole thing.
The main one is created like this:
.h
CTextureManager *m_pTxrMan;
.cpp
m_pTxrMan = new CTextureManager();
It is sent across as an example like this:
room[x]->blah(m_pTxrMan);
void blah(CTextureManager *TxrMan)
{
m_pTxrMan = TxrMan;
}
Is this correct?
Thanks...