TRANSLATION_Standard color in ZDoom 2.0.47 source HELP !
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.
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.
-
- 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 !
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.
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.
-
-
- Posts: 4062
- Joined: Thu Jul 17, 2003 12:19 am
- Location: British Columbia, Canada
What you are looking for is Randy's example pwad:
http://www.zdoom.org/files/examples/translation.zip
http://www.zdoom.org/files/examples/translation.zip
-
- Posts: 541
- Joined: Tue Jul 15, 2003 5:16 pm
- Location: Charlesbourg, Québec, Canada
-
- Site Admin
- Posts: 7731
- Joined: Wed Jul 09, 2003 10:30 pm
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:
Increase the +4 to the number you want, then make sure to initialize them later on in the same function.
Code: Select all
translationtables[0] = new BYTE[256*
(NUMCOLORMAPS*16 // Shaded
+MAXPLAYERS*2 // Players + PlayersExtra
+4 // Standard
+MAX_ACS_TRANSLATIONS // LevelScripted
+BODYQUESIZE // PlayerCorpses
)];
-
- Posts: 654
- Joined: Tue Jul 15, 2003 5:15 pm
- Location: misplaced
Does anyone hate me yet?
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?
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?
Re: Does anyone hate me yet?
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 formatEvil 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?
-
- Posts: 654
- Joined: Tue Jul 15, 2003 5:15 pm
- Location: misplaced
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.
-
- 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?
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.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
-
- Posts: 10002
- Joined: Fri Jul 18, 2003 6:18 pm
- Location: Idaho Falls, ID
-
- Posts: 654
- Joined: Tue Jul 15, 2003 5:15 pm
- Location: misplaced
-
- Posts: 541
- Joined: Tue Jul 15, 2003 5:16 pm
- Location: Charlesbourg, Québec, Canada
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.
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....
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?
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?
-
- Site Admin
- Posts: 7731
- Joined: Wed Jul 09, 2003 10:30 pm
Eh? So what do you see?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....
Unless you changed all the code relating to it, it's still number 3 and replaces your white range.X-DOOM wrote:And for the translation #4 (hexen icy color.) Did he keep to be #4 or go just after my new colors?