MHQuake is now a C++ program. I changed over today, and have made the necessary amendments to the codebase to play nicely with C++. There are no classes (aside from my menu framework pseudo class), just C++ language written in a procedural manner.
Why did I do this? The main reasons are:
- Support for C in a lot of Microsoft libraries is weak.
- I wanted to be able to use function overloading (I've already come across a few cases where I needed it and have had to resolve things using function pointers instead).
- I wanted to clean up the DirectSound mess.
- I wanted to switch over the keyboard input to DirectInput.
- I wanted to have the advantage of the stricter type checking.
- I wanted to be able to use modern libraries like GDI+ for image loading, rather than having to rely on 10 year old unmaintained libraries like libjpeg.
- I wanted the advantage of constructors and destructors rather than having to keep track of things in global variables.
- I wanted to get rid of all cases where I had mixed C and C++ code in the existing codebase.
0 comments:
Post a Comment