The source is on GitHub: https://github.com/id-Software/DOOM
One thing that's clear when reading game source code is that they hard code a lot more than I would writing system or application software. That's to be expected given the nature of the beast, but it's still one of the first obvious differences.