I never expected this to happen; I originally moved to C++ so that I could overload functions, use some Direct3D code to get some video caps that OpenGL didn't expose (baaaad baaaad OpenGL!) and clean up the DirectSound code. I never intended writing a class, let alone go any further...
The cvar/cmd/alias implementation now has me using multiple inheritance with templates!
I guess that using a language is the same as consuming any other finite resource; over enough time the usage will expand out to the full capacity.
Anyway, cvars are now complete (a little bundle of joy was waiting in net_dgrm, which held things up quite a bit), commands are almost there, and aliases are complete. I've extended aliases by allowing them to be written to the config.cfg, and might extend them further by allowing them to be cleared from the command line.
The old cvar infrastructure has been completely removed, but I'm not certain about the command infrastructure; I'm thinking that a lot of it just doesn't make sense in an OOP context, but at the same time, the opportunity to encapsulate a lot of the stuff in it seems too good to miss, anything that protects code from unexpected misuse is a good thing.
If this seems like a lot of work for probably much the same end-result as was there before, well, you got me there, it is. Nonetheless, it is also a much-needed opportunity to clean up lots of the source code, and it's enjoyable to do.
Friday, December 5, 2008
Lost in OOP
Posted by
mhquake
at
12:07 AM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment