There shouldn't be one class that does everything and is needed by everyone. I myself have a core class that has a stack of polymorphic game state classes and calls virtual methods run and render on the class that is on top of the stack. Game states have pointers to core so they can call for their own removal and they keep their own resources, textures, whatnot with themselves.
Simple, I'm trying to receive my arguments, "char *argv[]), and convert that char to something that I can then forward to another class. To you, that would probably take about 5 seconds and extremely easy and basic but do understand that I am NEW to this. I'm trying my best to learn all of this, but I have very little experience with these items to go off of. I still have no clue how to actually store variables with objects and have it retain its info. >_< This day in my eyes, has been a successful failure. Successful in the fact that I know the right ways of doing things, a failure in the way that nothing has been accomplished and I am more lost in C++ now than I ever was.
What do you want them to convert to? argv is something that came from C.
Can you provide example of what you want to do? "store variables with objects and have it retain its info" doesn't say much.
Well first, I have a question about the static stuff. You say to keep from using static functions/variables, correct?
Well a few months back I was following this tutorial:
http://www.gamefromscratch.com/page/Game-From-Scratch-CPP-Edition-Part-2.aspxAnd I always used static since then because it was what I was taught to use in the tutorial.... Is what he did wrong? I'm basically making my engine off of what I learned from his, so while its a bit different, it generally has similar things. So I'm trying to do it without the static stuff, and am running into troubles because I've never done it this way. ^^;;
I basically have a main class called Genesis, that runs the backbone of the program. It handles command line arguments, sets global flags for other things to access, and has a main loop with a switch statement based off of the engine core state, that then, based on the state, goes to other functions that open different classes.
for instance if the state is EngineCoreState ShowingSplash; then it goes through the loop, catches in the correct part of the switch statement, then goes to a method called "ShowSplash" that then turns the SplashScreen class into a object "SplashScreen splashScreen" and runs it "splashScreen.ShowSplash(sf::RenderWindow& renderWindow);
Is that correct? I just worry that things that need to access global variables such as WindowManager wont be able to. Window manager has to check to see if the Fullscreen flag is set. Fullscreen is a bool in Genesis. So if it makes a object out of Genesis, it wont get the updated value, it will get the default, which is false.
See what I mean? I don't know how I would properly set that.
As for argv..... I imagine I could just change the Initialize function to accept int argc and char *argv[]
After all, I already have a function in Genesis that handles the arguments and iterates through the list of them setting the proper variables. ^^
Also, do... I really have to make a object of Genesis while in Genesis.cpp? That seems kinda... odd. xD Or do I only have to make a object in the "main" and then run something like genesis.Initialize(); ?