Makepalookup (DEF): Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
Fox (talk | contribs)
Created page with "'''makepalookup { [...] } Interface to creating palette lookups containing both color index remapping (only in effect for non-hightile textures) and fog. This is in contrast..."
 
Fox (talk | contribs)
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''makepalookup { [...] }
<span {{code}}>'''makepalookup''' { [...] }</span>


Interface to creating palette lookups containing both color index remapping (only in effect for non-hightile textures) and fog. This is in contrast to '''fogpal''', which always resets the remapping to the identity mapping ("pal 0").
Interface to creating palette lookups containing both color index remapping (only in effect for non-hightile textures) and fog. This is in contrast to '''fogpal''', which always resets the remapping to the identity mapping ("pal 0").
Line 5: Line 5:
== Tokens ==
== Tokens ==


'''pal''' <palnum>
<span {{code}}>'''pal''' <palnum>


The palette number, must be from 1 to 250.
The palette number, must be from 1 to 250.


{| cellpadding="0" cellspacing="0" border="0"
<span {{code}}>'''red''' <value></span> (or '''r''')<br />
| valign="top" |
<span {{code}}>'''green''' <value></span> (or '''g''')<br />
'''red''' <value><br />
<span {{code}}>'''blue''' <value></span> (or '''b''')
'''green''' <value><br />
'''blue''' <value>
| width="20px" |
| valign="top" |
(or '''r''')<br />
(or '''g''')<br />
(or '''b''')
|-
|}


Specifies a color component value, in the range of 0 to 63. Unspecified components are assumed to be 0 and any out of range values are clamped to the maximum or minimum as appropriate.
Specifies a color component value, in the range of 0 to 63. Unspecified components are assumed to be 0 and any out of range values are clamped to the maximum or minimum as appropriate.


'''remappal''' <palnum>
<span {{code}}>'''remappal''' <palnum></span>


The palette number to take the index remapping from, i.e. 21 for blue -> red.  When absent, defaults to 0.
The palette number to take the index remapping from, i.e. 21 for blue -> red.  When absent, defaults to 0.


'''remapself'''
<span {{code}}>'''remapself'''</span>


The same as '''remappal''' ''<palnum>'', where ''<palnum>'' is the number provided for the '''pal''' token.
The same as '''remappal''' ''<palnum>'', where ''<palnum>'' is the number provided for the '''pal''' token.

Latest revision as of 05:36, 23 February 2020

makepalookup { [...] }

Interface to creating palette lookups containing both color index remapping (only in effect for non-hightile textures) and fog. This is in contrast to fogpal, which always resets the remapping to the identity mapping ("pal 0").

Tokens

pal <palnum>

The palette number, must be from 1 to 250.

red <value> (or r)
green <value> (or g)
blue <value> (or b)

Specifies a color component value, in the range of 0 to 63. Unspecified components are assumed to be 0 and any out of range values are clamped to the maximum or minimum as appropriate.

remappal <palnum>

The palette number to take the index remapping from, i.e. 21 for blue -> red. When absent, defaults to 0.

remapself

The same as remappal <palnum>, where <palnum> is the number provided for the pal token.

Examples

This creates palookup 200 with a fog of (30,0,0) and a blue-to-yellow remapping (assuming it has not been changed before):

makepalookup { pal 200  red 30  remappal 23 }

This 'fogifies' palookup 21 with a red fog:

makepalookup { pal 21  red 30  remapself }

This overwrites palookup 21 with a red fog, but clears the blue-to-red remapping:

makepalookup { pal 21  red 30 }