Palookup (DEF): Difference between revisions
| No edit summary | Hendricks266 (talk | contribs) No edit summary | ||
| (7 intermediate revisions by one other user not shown) | |||
| Line 1: | Line 1: | ||
| {{Under construction}} | |||
| Loads a [[pal|lookup palette]] from a raw image file. | <span {{code}}>'''palookup''' <palnum> { [...] }</span> | ||
| Loads a [[pal|lookup palette]] from a [[raw image file]]. | |||
| The image file MUST contain a 256 color table of its own. Each pixel will have their matching color in the table converted in the lookup table. | The image file MUST contain a 256 color table of its own. Each pixel will have their matching color in the table converted in the lookup table. | ||
| Line 11: | Line 13: | ||
| == Tokens == | == Tokens == | ||
| raw | <span {{code}}>'''raw''' { [...] }</span> | ||
| :: file | |||
| :: offset | DESCRIPTION | ||
| :: noshades | |||
| copy | :: <span {{code}}>'''file''' <filename></span> | ||
| undef | |||
| fogpal | :: DESCRIPTION | ||
| :: red | |||
| :: green | :: <span {{code}}>'''offset''' <value></span> | ||
| :: blue | |||
| makepalookup | :: DESCRIPTION | ||
| :: red | |||
| :: green | :: <span {{code}}>'''noshades'''</span> | ||
| :: blue | |||
| :: remappal | :: DESCRIPTION | ||
| :: remapself | |||
| floorpal | <span {{code}}>'''copy''' <palnum></span> | ||
| nofloorpal | |||
| DESCRIPTION | |||
| <span {{code}}>'''undef'''</span> | |||
| DESCRIPTION | |||
| <span {{code}}>'''fogpal''' { [...] }</span> | |||
| DESCRIPTION | |||
| :: <span {{code}}>'''red''' <red></span><br /> | |||
| :: <span {{code}}>'''green''' <green></span><br /> | |||
| :: <span {{code}}>'''blue''' <blue></span> | |||
| :: DESCRIPTION | |||
| <span {{code}}>'''makepalookup''' { [...] }</span> | |||
| DESCRIPTION | |||
| :: <span {{code}}>'''red''' <red></span><br /> | |||
| :: <span {{code}}>'''green''' <green></span><br /> | |||
| :: <span {{code}}>'''blue''' <blue></span> | |||
| :: DESCRIPTION | |||
| :: <span {{code}}>'''remappal''' <palnum></span> | |||
| :: DESCRIPTION | |||
| :: <span {{code}}>'''remapself'''</span> | |||
| :: DESCRIPTION | |||
| <span {{code}}>'''floorpal'''</span><br /> | |||
| <span {{code}}>'''nofloorpal'''</span> | |||
| DESCRIPTION | |||
| == Examples == | == Examples == | ||
|   palookup 0 { raw { file " | The following PNG image contains the shade table in Duke Nukem 3D v1.5: | ||
| [[File:Duke3d shade.png]] | |||
| The following PNG image contains the palette swaps in Duke Nukem 3D v1.5: | |||
| [[File:Duke3d pals.png]] | |||
| This example will load a shade table with 32 steps: | |||
|   palookup 0 { raw { file "shade.raw" } } | |||
| This example will load 3 lookup palettes in the same file: | |||
|  palookup 1 { raw { file "pals.raw" noshades } } | |||
|  palookup 2 { raw { file "pals.raw" offset 256 noshades } } | |||
|  palookup 3 { raw { file "pals.raw" offset 512 noshades } } | |||
| [[Category:DEF commands]] | [[Category:DEF commands]] | ||
Latest revision as of 14:10, 22 March 2021
|  | This page is under construction. Please help review and edit this page. | 
palookup <palnum> { [...] }
Loads a lookup palette from a raw image file.
The image file MUST contain a 256 color table of its own. Each pixel will have their matching color in the table converted in the lookup table.
A single image file may contain multiple lookup palettes, and offset can used to locate it.
Not to be confused with base palette. See also shadefactor and palette listing.
Tokens
raw { [...] }
DESCRIPTION
- file <filename>
 
- DESCRIPTION
 
- offset <value>
 
- DESCRIPTION
 
- noshades
 
- DESCRIPTION
 
copy <palnum>
DESCRIPTION
undef
DESCRIPTION
fogpal { [...] }
DESCRIPTION
- red <red>
- green <green>
- blue <blue>
 
- red <red>
- DESCRIPTION
 
makepalookup { [...] }
DESCRIPTION
- red <red>
- green <green>
- blue <blue>
 
- red <red>
- DESCRIPTION
 
- remappal <palnum>
 
- DESCRIPTION
 
- remapself
 
- DESCRIPTION
 
floorpal
nofloorpal
DESCRIPTION
Examples
The following PNG image contains the shade table in Duke Nukem 3D v1.5:
The following PNG image contains the palette swaps in Duke Nukem 3D v1.5:
This example will load a shade table with 32 steps:
palookup 0 { raw { file "shade.raw" } }
This example will load 3 lookup palettes in the same file:
palookup 1 { raw { file "pals.raw" noshades } }
palookup 2 { raw { file "pals.raw" offset 256 noshades } }
palookup 3 { raw { file "pals.raw" offset 512 noshades } }
 
	
