Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Doom_user

Palette remapping of player's uniform color in multiplayer?

Recommended Posts

In multiplayer, what are the exact numerical palette ranges that the engine remaps from/to, to change the color of the player's uniform?

Share this post


Link to post


The green row can be translated to any of the other rows, or halves of rows, if the port allows it. I guess indigo is the fourth, brown is the third, and red? second or fourteenth.

Share this post


Link to post

Yeah, Red uses the dull reds. From r_draw.c:

void R_InitTranslationTables (void)
{
    int		i;
	
    translationtables = Z_Malloc (256*3+255, PU_STATIC, 0);
    translationtables = (byte *)(( (int)translationtables + 255 )& ~255);
    
    // translate just the 16 green colors
    for (i=0 ; i<256 ; i++)
    {
	if (i >= 0x70 && i<= 0x7f)
	{
	    // map green ramp to gray, brown, red
	    translationtables[i] = 0x60 + (i&0xf);
	    translationtables [i+256] = 0x40 + (i&0xf);
	    translationtables [i+512] = 0x20 + (i&0xf);
	}
	else
	{
	    // Keep all other colors as is.
	    translationtables[i] = translationtables[i+256] 
		= translationtables[i+512] = i;
	}
    }
}
Green, starting with color 112 (0x70) is translated to 96+ (from 0x60, grays), 64+ (from 0x40, browns), and 32+ (from 0x20, reds).

Share this post


Link to post
printz said:

doompalbk5.png


Just for info, that pic is not entirely accurate for at least 2 entries. Entry 0 and 247 are R7G7B7 in that image when, of course, they should be 000. The palette for the image does have a value of 000 in it and it also has the infamous non-existent cyan in it too. ;)

Share this post


Link to post

Is it now fixed?

Oh yeah, I got that palette off XWE, how could it fail? :P

Lastly, I uploaded a bitmap, but it got saved as png. Don't expand this subject, though, it's uninteresting.

Share this post


Link to post
printz said:

Lastly, I uploaded a bitmap, but it got saved as png.

Considering a png is a losslessly compressed bitmap, I don't see the problem.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×