Original Post
Wow, i've got lots of dumb questions now i've started on my game again...Ah well. Anyways, I couldn't find this in any of my books, so i thought i should ask here. I have 2 classes: 1 is my main GameEngine, and the other is my Sprite class. Neither has any relation to the other. Now my sprite class needs to use some variables that are defined in my GameEngine class. The problem lies in the fact I want to keep my game engine independant from the game. Ie, i want to be able to use this game engine on another game, w/o having to rewrite any part of it, so that means I can't just extern the gameEngine variable[delaced in my main .cpp file] within the Sprite class. So I was thinking I needed to use a pointer to my gameEngine...but how? I'm tottal at lose with this problem...I hope i made myself clear, but i'm not tottaly sure how to descript my situation. Cheers! Chris