[gameprogrammer] making a global instance

I have a problem with my project, I want to have all images, scene nodes
and sounds stored in caches, to avoid repeated resources consuming
memory. I need to make those caches available to all game components,
like the gui, character entities, etc. Something like a global variable.
But of course I want to avoid declaring that instance as a global
variable or passing the cache as parameter to all constructors. Can
somebody give me an idea? Im using C++.

-- 
Roger D. Vargas
Linux User: 180787
ICQ: 117641572
jabber.ehtsc.co.cu: roger
"Object-oriented programming is an exceptionally bad idea which could
only have originated in California." 
- E.W. Dijkstra



---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html


Other related posts: