TRANSLATION_Standard color in ZDoom 2.0.47 source HELP !

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
User avatar
X-DOOM
Posts: 541
Joined: Tue Jul 15, 2003 5:16 pm
Location: Charlesbourg, Québec, Canada

TRANSLATION_Standard color in ZDoom 2.0.47 source HELP !

Post by X-DOOM »

how can i add/use the old style of Player color in the source code od ZDoom 2.0.47, like the old Doom dehacked patch?

Because in ZDoom, the color are not in Brown, Red and in Gray.
when using

PROP_Translation (TRANSLATION_Standard,0) // Wear black color
PROP_Translation (TRANSLATION_Standard,1) // Wear yellow color
PROP_Translation (TRANSLATION_Standard,2) // Wear red color

if i want to add more "PROP_Translation" other than in a map script.
like PROP_Translation (TRANSLATION_Standard,4) will wear blue color...

i know "PROP_Translation (TRANSLATION_Standard,3) // FreezeDeath" is reserved for the FreezeDeath icy color.
User avatar
Kappes Buur
 
 
Posts: 4062
Joined: Thu Jul 17, 2003 12:19 am
Location: British Columbia, Canada

Post by Kappes Buur »

What you are looking for is Randy's example pwad:

http://www.zdoom.org/files/examples/translation.zip
Guest

Post by Guest »

yes i know about the translation wad exemple.

I ask about in the source code, how to add them.
I dont want to use on all map files with script.
There something a way to add them easily.
User avatar
X-DOOM
Posts: 541
Joined: Tue Jul 15, 2003 5:16 pm
Location: Charlesbourg, Québec, Canada

Post by X-DOOM »

The Guest post was mine. Sorry i forgot to log on.
User avatar
randi
Site Admin
Posts: 7731
Joined: Wed Jul 09, 2003 10:30 pm

Post by randi »

I'm not sure what you're asking about here, but if all you want to know how to do is increase the number of translations in the standard slot, open r_draw.cpp and find the R_InitTranslationTables() function. Right at the top of that is this statement:

Code: Select all

	translationtables[0] = new BYTE[256*
		(NUMCOLORMAPS*16			// Shaded
		 +MAXPLAYERS*2				// Players + PlayersExtra
		 +4							// Standard
		 +MAX_ACS_TRANSLATIONS		// LevelScripted
		 +BODYQUESIZE				// PlayerCorpses
		 )];
Increase the +4 to the number you want, then make sure to initialize them later on in the same function.
User avatar
bimshwel
Posts: 654
Joined: Tue Jul 15, 2003 5:15 pm
Location: misplaced

Does anyone hate me yet?

Post by bimshwel »

Ah, fascinating. I have no idea what the means, but I'm sure it's fascinating.
Ehhh, is it all possible to have translation affects apply to non-sprite images, such as, let's say the level transition screen or the floating disembodied head? I assume the answer is and shall always be 'no,' so I didn't start a new topic for it. So is the answer no?
Rygel

Re: Does anyone hate me yet?

Post by Rygel »

Evil Mittens wrote:Ah, fascinating. I have no idea what the means, but I'm sure it's fascinating.
Ehhh, is it all possible to have translation affects apply to non-sprite images, such as, let's say the level transition screen or the floating disembodied head? I assume the answer is and shall always be 'no,' so I didn't start a new topic for it. So is the answer no?
The answer is 'no'. IMHO it really doesn't make much sense to apply translation to intermission screens and similar stuff. The only other useful thing would be on textures but that's not the easiest thing to implement with the restrictions of Doom's file format
User avatar
bimshwel
Posts: 654
Joined: Tue Jul 15, 2003 5:15 pm
Location: misplaced

Post by bimshwel »

I made some player type character, and I was amused more to have it's skin to be the part that changed color with the "player options" menu, rather than anything else. And I thought it would make an amount of sense for any other gratuitous depictions of said player-type-character to match. So that's what it was. But I see the 'no,' so I'll believe it.
User avatar
Hirogen2
Posts: 2033
Joined: Sat Jul 19, 2003 6:15 am
Graphics Processor: Intel with Vulkan/Metal Support
Location: Central Germany

Re: Does anyone hate me yet?

Post by Hirogen2 »

Rygel wrote:The answer is 'no'. IMHO it really doesn't make much sense to apply translation to intermission screens and similar stuff. The only other useful thing would be on textures but that's not the easiest thing to implement with the restrictions of Doom's file format
The only intermission(?) point where it is useful (that is, can be shown) is after you kill the Icon of Sin, where Our Hero is shown too. But if it is meaningful to colorize Our Hero is another question.
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

It might be useful to be able to recolorize the portrait in the status bar in case you want to render a helmet or something on him and its color on the full player image is chosen via a translation.

Maybe that's why they didn't render the doomguy's face with his helmet on . . .
User avatar
bimshwel
Posts: 654
Joined: Tue Jul 15, 2003 5:15 pm
Location: misplaced

Post by bimshwel »

Come on, surely it's not unfathomable to make the game display "story"progressing images that show a nonsprite player with that hudmessage thing I've heard so much about. Don't make me post an image. Please don't.
User avatar
X-DOOM
Posts: 541
Joined: Tue Jul 15, 2003 5:16 pm
Location: Charlesbourg, Québec, Canada

Post by X-DOOM »

I've changed the number 4 to a 9 (i think 4 is to the 3 color translation and the icy one, so i add mine own with these 4 toggeter.)

When i do this on the white color appear to work, not the others after.

Code: Select all

translationtables[0] = new BYTE[256*
	(NUMCOLORMAPS*16			// Shaded
	 +MAXPLAYERS*2				// Players + PlayersExtra
	 +9							// Standard //ZXDoom --> the number was +4
	 +MAX_ACS_TRANSLATIONS		// LevelScripted
	 +BODYQUESIZE				// PlayerCorpses
	 )];




translationtables[TRANSLATION_LevelScripted] =
	translationtables[TRANSLATION_Standard] + 9*256;	//ZXDoom --> was 4






// Create the standard translation tables
for (i = 0; i < 8; ++i)		// ZXDoom	//was 3
{
	memcpy (translationtables[TRANSLATION_Standard] + i*256, translationtables[0], 256);
}
if (gameinfo.gametype == GAME_Doom)
{
	for (i = 0x70; i < 0x80; i++)
	{ // map green ramp to gray, brown, red
		translationtables[TRANSLATION_Standard][i      ] = 0x60 + (i&0xf); // gray / indigo
		translationtables[TRANSLATION_Standard][i+256  ] = 0x40 + (i&0xf); // brown
		translationtables[TRANSLATION_Standard][i+512  ] = 0x20 + (i&0xf); // red
		translationtables[TRANSLATION_Standard][i+1024 ] = 0x50 + (i&0xf); // white			//ZXDoom
		translationtables[TRANSLATION_Standard][i+2048 ] = 0x98 + (i&0xf); // dark green		//ZXDoom
		translationtables[TRANSLATION_Standard][i+4096 ] = 0xA0 + (i&0xf); // yellow			//ZXDoom
		translationtables[TRANSLATION_Standard][i+8192 ] = 0xC0 + (i&0xf); // blue			//ZXDoom
		translationtables[TRANSLATION_Standard][i+16384] = 0xD0 + (i&0xf); // orange			//ZXDoom
	}
}

So if i change the value after the integer "i" ([i+256]....) i can saw those colors, but not their color, the white is not white, the dark green is not dark green....

Code: Select all

translationtables[TRANSLATION_Standard][i      ] = 0x60 + (i&0xf); // gray / indigo
		translationtables[TRANSLATION_Standard][i+256 ] = 0x40 + (i&0xf); // brown
		translationtables[TRANSLATION_Standard][i+512 ] = 0x20 + (i&0xf); // red
		translationtables[TRANSLATION_Standard][i+768 ] = 0x50 + (i&0xf); // white			//ZXDoom
		translationtables[TRANSLATION_Standard][i+1024] = 0x98 + (i&0xf); // dark green		//ZXDoom
		translationtables[TRANSLATION_Standard][i+1280] = 0xA0 + (i&0xf); // yellow			//ZXDoom
		translationtables[TRANSLATION_Standard][i+1536] = 0xC0 + (i&0xf); // blue			//ZXDoom
		translationtables[TRANSLATION_Standard][i+1792] = 0xD0 + (i&0xf); // orange

there is something i have not understand well?
i've taken the colors value from TRANSLATION.wad file


And for the translation #4 (hexen icy color.) Did he keep to be #4 or go just after my new colors?
User avatar
randi
Site Admin
Posts: 7731
Joined: Wed Jul 09, 2003 10:30 pm

Post by randi »

X-DOOM wrote:So if i change the value after the integer "i" ([i+256]....) i can saw those colors, but not their color, the white is not white, the dark green is not dark green....
Eh? So what do you see?
X-DOOM wrote:And for the translation #4 (hexen icy color.) Did he keep to be #4 or go just after my new colors?
Unless you changed all the code relating to it, it's still number 3 and replaces your white range.

Return to “Editing (Archive)”