2. The code base is trying to be moved into C++ and as much object oriented practices as feasible. This is because C is somewhat difficult to maintain, and the sheer amount of data floating around in the engine would make anybody cry if they tried to take it all in at once. OOP allows individuals and freelancers to work on only the bits that they want to work with, and not fight with the codebase trying to find which thread function they need in order to work with a particular data structure. The indent style is a mixture of K&R 1TBS and Allman, but most new code prefers to use Allman style.
No. You are correct that we are drifting towards C++ and a C++ code style, but the reason you state is wrong. Simply wrong.
The reason we are drifting that way is only because that is what our members know, not because of any reasons that you cite. Object Orientated Programming is not enabled by a language (though it can be made easier by language features). The best example of a heavily used, modified, and adapted object orientated code base is the Linux kernel. It has a strict object oriented design that is implemented entirely with macros and the GNU C compiler.
It may surprise many, but FSO is and always has been Object Orientated, even though it is implemented primarily using plain C language constructs. It even uses inheritance, but you don't really see that directly either because most of the work that is done on FSO is from the inside. So, to use a tired phrase, you can't see the forest because of the trees, or more aptly, you can't see the objects for the C
. I note that I missed this design when I first started with this code base myself, it was only something that dawned on me later. Anyway my point is, FSO managed just fine without using most C++ features for most of its life, so don't feel obligated to use C++.
The rule is, use the style that is there already. The existing styles (as Karajorma noted) are all over the place, I personally also like the Allman style but it is not the style that is used by most of the code.
Also. FSO is single threaded. This has nothing to do with the language. And it certainly has nothing to do with design paradigm. But it is a design choice from 1995 that was perfectly valid for a game until about 5 years ago and is still used to great effect today; a single threaded design does have the advantages you note however.
General rule right now is "If you didn't change any actual code functionality, then don't change the indent style" for all patches. Reason being, this allows the SCP to quickly evaluate your .diff's and .patch's without needed to go through all the "indent fluff." I learned that the hard way.
This rule will probably never change. Just like
The Cardinal Rule.
Thanks for that. Stopped using the "debug" config now, well after having to in increase the value of MAX_PATH_LEN (why was it 128???) due to my folder structure.
Because core of this engine was written >15 years by a company and it has a tendency to do odd things when you change constants. Primarily the result of more that one dummy reusing the constant because happened to be the same as what they wanted. Or they magic numbered the constant in in at least one place.
I would suggest rethinking your folder structure unless you want to go down that rabbit hole as your first "project"...