The game itself is currently sorta two .cpp files; App.cxx, 3.4k lines and Game.cpp, 1.2k lines. There's a lot of ugly hacks and magic numbers in those lines, but it's safe to say that it wouldn't be possible to improve quality much by orienting around objects, adding soft coding, refactor using some nifty design patterns or go balloonies with architectural astronauting. Nope, when I need to maintain I'll figure out the magic numbers easily enough. And the underlying engine code is squeaky clean, which helps.
To give you an idea of the game code quality there's a lot of
const float a = lDrawAngle; DrawBarrelCompass((int)x, (int)y, a, (int)aw-8, lValue1, lValue2); InfoText(2, _T("Up/down compass"), a+PIF, ox, oy); const float lLiftThrottle = mGame.GetLauncher().GetPhysics().GetEngine(0).GetValue(); const float lCenteredValue = (mGame.GetComputerIndex() == 0)? lValue1*2-1 : -(lValue1*2-1); const int lLiftOffset = (int)((BARREL_COMPASS_HEIGHT-4)*lCenteredValue/2 + 9*lLiftThrottle); DrawTapIndicator(3, 22, lLiftOffset, a+PIF/2);
and even more
#ifdef LEPRA_TOUCH_LOOKANDFEEL #ifdef LEPRA_TOUCH ... [20 lines] #endif // Touch ... [100 lines] #endif // Touch LnF
But still. 5k ugly lines is perfect, as it's only going to be maintained, but never built upon or reused.
I'm in technical RC, by the way - YEY! :)