Function is 200 lines long, with 8 or so levels of nesting. Also "goto breakout"
To address the objections below, the function reads from a file into a pixel buffer. It's not some tricky in-place update. That's a great candidate for a more functional style.
Here's more ick:
https://github.com/TTimo/doom3.gpl/blob/aaa855815ab484d5bd09...
Surely that could be factored better.
Down-voters go read Carmack's own article:
https://gamasutra.com/view/news/169296/Indepth_Functional_pr...
I think it's funny that people disagree here. This is exactly the stuff a modern linter would flag in an automated code review.
Sure enough, here's a linter. I think this is essentially the same codebase:
https://lgtm.com/projects/g/Edgarins29/Doom3/context:cpp
"Code quality: D" (on an A-F scale)
And by the way, I have the utmost respect for Carmack. I just wouldn't hold up this codebase as great.