Talk:Invulnerability colormap bug

A screenshot. That's a very good idea &mdash; it makes the article more self-contained. Ryan W 21:04, 23 Jun 2005 (UTC)

COLORMAP/PLAYPAL
COLORMAP controls the invulnerability powerup's colouring effect. COLORAMP is only applied to the player's view window. But it does not affect the sky presumably because it is also used for light diminishing. And having the sky be changed by sector lighting would look weird.

PLAYPAL would not be desirable because this affects everything. Viewing the automap, status bar and menus would be horrible. And it'd also be subject to being removed by gamma change (F11)

g6672D 16:24, 20 January 2007 (UTC)


 * But that's what the article says ... ? Fraggle 02:38, 21 January 2007 (UTC)

No details!
But it doesn't tell you why it's known to be a bug. It also doesn't state why it occurs.


 * Hmm. Lets look at linuxdoom 1.10 (GPL).  R_DrawPlanes in r_plane.c:401:


 * Here, dc_colormap is a variable that will be used by R_DrawColumn (which will draw a single vertical slice of any wall, sprite, or sky). On the other hand, regular flats when handled in R_DrawPlanes eventually pass control to R_MapPlane in r_plane.c:161:


 * fixedcolormap is set (see p_user.c:363, where it's first set in the player struct) to non-zero when invuln or lite amp is active, giving precedence to invuln. So there are two override rules for colormap at work here; one originating in p_user.c:363 sets the inverse colormap for invuln, or, if no invuln, the full brite colormap for lite amp.  This is applied to just about everything visible.  The second, in r_plane.c:401, sets the fullbrite colormap always, applied only to sky textures.  However, the second doesn't even look to see if the first is active; the sky codeblock doesn't examine fixedcolormap at all before setting fullbrite, unlike all other wall, sprite, and flat rendering.  Unless I've missed something (which is highly likely; the source is a mess and I'm not very familiar with it), there doesn't appear to be any particular indication that this was a mistake other than the one comment given.  I'm inclined to think it's not a bug, as it is very obvious and certainly would have shown up at some point during testing, and fixing it is very simple; the sky code in R_DrawPlanes simply needs to check fixedcolormap before setting fullbrite.  If it was a bug I think it certainly would have been fixed by 1.9.  71.58.109.233 22:47, 14 September 2007 (UTC)