Forum Archive

Go Back   3D Realms Forums > 3D Realms Topics > Duke Nukem > Duke Nukem 3D Modifications
Blogs FAQ Community Calendar

Notices

 
 
Thread Tools
Old 01-14-2007, 05:12 PM   #1
Kennedy
Guest
Implementing alternate pallets
Is there a better way to implement alternate palletes then to just use different textures? Like if the pixel color is defined as Blue:

(((R=G)&&(R<192)&&(B=255))||((R=0)&&(G=0)&&(B>64)) )

Then switch around the values for that pixel:

Red:
Temp=R; R=B; B=Temp;

Green:
Temp=G; G=B; B=Temp;

Gray:
R=B; G=B;

Magenta: // Purple
R=B;

Cyan:
G=B;

Yellow:
Temp=G ; R=B; G=B; B=Temp; // G and R must be equal

Where
R = Value of Red
G = Value of Green
B = Value of Blue
From 0 to 255.

Temp is just a placeholder variable to swap numbers.

This is just pseudo code and I'm not sure how it will actualy work, but it will most probably require changing the source for EDuke32 or JFDuke.


Others colors like Orange may be harder to implement.
Last edited by Kennedy; 01-14-2007 at 05:13 PM. Reason: added carriage return
 
 

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 12:30 PM.

Page generated in 0.08482194 seconds (100.00% PHP - 0% MySQL) with 17 queries

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

Website is ©1987-2014 Apogee Software, Ltd.
Ideas and messages posted here become property of Apogee Software Ltd.