Doom source code oddities

DOOM even lives up for it's name in the source code. On this page, pieces of stupid, useless and funny source code are gathered.

From D_ENGLISH.H Does someone care? // The following should NOT be changed unless it seems // just AWFULLY necessary


 * 1) define HUSTR_PLRGREEN "Green: "
 * 2) define HUSTR_PLRINDIGO "Indigo: "
 * 3) define HUSTR_PLRBROWN "Brown: "
 * 4) define HUSTR_PLRRED   "Red: "

From R_PLANE.C What's so important that it should only be executed at game startup? // // R_InitPlanes // Only at game startup. // void R_InitPlanes (void) { // Doh! }

From Z_ZONE.C //     Zone Memory Allocation, perhaps NeXT ObjectiveC inspired. //	Remark: this was the only stuff that, according //	 to John Carmack, might have been useful for //	 Quake.

From R_MAIN.C What the creators think about using the ASCII Character 0x08 (cursor to left), used in the loading bar. Remember this line? "R_Init: Init DOOM refresh daemon - [................................................]" //	Really complex printing shit...

From ST_STUFF.C Someone thinks the cheats in the source code are not obfuscated enough. // Massive bunches of cheat shit // to keep it from being easy to figure them out. // Yeah, right...

So that's what the cheat code for no-clipping means... // Smashing Pumpkins Into Samml Piles Of Putried Debris. unsigned char	cheat_noclip_seq[] = {   0xb2, 0x26, 0xea, 0x2a, 0xb2,	// idspispopd 0xea, 0x2a, 0xf6, 0x2a, 0x26, 0xff };

From F_WIPE.C Can anyone optimize my ass? // makes this wipe faster (in theory) // to have stuff in column-major format wipe_shittyColMajorXform((short*)wipe_scr_start, width/2, height); wipe_shittyColMajorXform((short*)wipe_scr_end, width/2, height);

From R_DEFS.H Does anyone know? // // Now what is a visplane, anyway? // typedef struct { ... } visplane_t;

From R_DRAW.C It's a good idea to document magic numbers before you forget what they mean // ?
 * 1) define MAXWIDTH			=1120;
 * 2) define MAXHEIGHT			=832;

Note: Source code snippets on this page are copyrighted.

Copyright (C) 1993-1996 by id Software, Inc.

This source is available for distribution and/or modification only under the terms of the DOOM Source Code License as published by id Software. All rights reserved.

The source is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License for more details.