by mh » Sat May 01, 2010 10:34 pm
You start with main, then you learn about data types and flow control, then you go on to functions and pointers, and if you're learning C++ you will get some awesome mindbending stuff in there that will make you feel like you've had a few beers too many.
Seriously, nobody is going to tell you about C or C++ in the space of a forum post or two. Not because they don't want to, but because you're asking for too much.
Let me put it this way.
Imagine that you're a mechanic. Imagine that you know how to fix the engine in a car.
With some luck and common sense you might be able to also fix the engine in a motorcycle.
You will likely never be able to fix the engine in a Boeing 747.
Same basic principles but a completely different application of those principles.
Less than 1% of knowledge about a program is knowledge of the language it's written in. An experienced good programmer can learn a new language in a week. That's easy.
The hard part is knowledge of how all the little pieces are put together. Why decisions were made to do something one way instead of another. Where functions are called from, what the parameters mean in terms of the program, what the effect of calling things out of order is, and so on.
If it's code you've never seen before, and if it's large enough, it can take years to become familiar with it.
I've never seen the qFusion code before, and it's likely that very few people reading your questions have either.
So a tip.
Download the qFusion code yourself. Look at it, read it. Read the part of it that gets called when you use an item. Read the part of it that gets called when you change weapons. Run it in the debugger and set breakpoints all over the place, see how things work. Study some existing mods, learn what's different and how it was done. Try and put two and two together. Try to learn yourself, it's more fun!
If you can't understand that then try something else. Everybody starts small and everybody learns to walk before they try to run.