<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://3dfxdev.net/edgewiki/index.php?action=history&amp;feed=atom&amp;title=Joint_Texture</id>
		<title>Joint Texture - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://3dfxdev.net/edgewiki/index.php?action=history&amp;feed=atom&amp;title=Joint_Texture"/>
		<link rel="alternate" type="text/html" href="https://3dfxdev.net/edgewiki/index.php?title=Joint_Texture&amp;action=history"/>
		<updated>2026-06-06T16:27:15Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.27.0</generator>

	<entry>
		<id>https://3dfxdev.net/edgewiki/index.php?title=Joint_Texture&amp;diff=281&amp;oldid=prev</id>
		<title>Corbin: created Joint Texture</title>
		<link rel="alternate" type="text/html" href="https://3dfxdev.net/edgewiki/index.php?title=Joint_Texture&amp;diff=281&amp;oldid=prev"/>
				<updated>2015-06-08T22:40:14Z</updated>
		
		<summary type="html">&lt;p&gt;created Joint Texture&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h2 class=&amp;quot;page_title&amp;quot;&amp;gt;Joint Texture Standard (draft #7)&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;PRE class=&amp;quot;specs&amp;quot;&amp;gt;&lt;br /&gt;
Both PNG and JPEG image formats must be supported, but a port is free&lt;br /&gt;
to support more formats.&lt;br /&gt;
&lt;br /&gt;
In general, the patch_t, PNG and JPEG formats can be used anywhere.&lt;br /&gt;
Flat format (block of raw pixels) is only allowed in F_START.&lt;br /&gt;
&lt;br /&gt;
By default, all images are unscaled (one pixel covers one world unit).&lt;br /&gt;
Images have the same scaling regardless of the surface (wall or floor).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WAD Resources&lt;br /&gt;
-------------&lt;br /&gt;
&lt;br /&gt;
- PLAYPAL:  palette used for patch_t and raw formats (not PNG or JPEG).  &lt;br /&gt;
            There is one global palette, which comes from the last added&lt;br /&gt;
            PWAD containing a PLAYPAL lump (or the IWAD if none).&lt;br /&gt;
&lt;br /&gt;
- TEXTUREx: composes textures out of patches.  Patches are found as a&lt;br /&gt;
            Raw_Lump resource (see below).  Some scaling ability via&lt;br /&gt;
            previously unused, zero fields (see the ZDoom Wiki entry&lt;br /&gt;
            about TEXTUREx for more information).&lt;br /&gt;
&lt;br /&gt;
- PNAMES:   list of patch names for TEXTUREx.  The PNAMES lump should&lt;br /&gt;
            exist in the same wad as the TEXTUREx lump(s).  If the PNAMES&lt;br /&gt;
            lump is missing, the one in the IWAD can be used, but this&lt;br /&gt;
            is prone to error and should be deprecated.&lt;br /&gt;
&lt;br /&gt;
- Raw_Lump: used for graphics (title screen, menus, fonts, etc) and also&lt;br /&gt;
            TEXTUREx patches.  The lump can occur anywhere in the wad,&lt;br /&gt;
            including the P_START and S_START areas (hence sprites can&lt;br /&gt;
            be used for texture patches).&lt;br /&gt;
            &lt;br /&gt;
            A special format is allowed: 320x200 block of raw pixels&lt;br /&gt;
            (needed for Heretic and Hexen).&lt;br /&gt;
&lt;br /&gt;
- F_START: flat lumps.  Normally 64x64 raw pixels, but any power-of-two&lt;br /&gt;
           size between 32 and 2048 is allowed.  Raw pixels blocks must&lt;br /&gt;
           be square.  Flats larger than 64x64 should be scaled so that&lt;br /&gt;
           MAX(width,height) occupies 64 world units.&lt;br /&gt;
&lt;br /&gt;
           Heretic and Hexen have some odd sized flats (e.g. 64x128) which&lt;br /&gt;
           are used for scrolling.  For GL ports, simply truncating them&lt;br /&gt;
           to 64x64 is acceptable.&lt;br /&gt;
 &lt;br /&gt;
- S_START: sprite lumps.  Scaling can only be set by the thing definition&lt;br /&gt;
           (DeHackEd, DDF, DECORATE, DED, etc).  For PNG format, offsets&lt;br /&gt;
           are inside the PNG itself (using a special tool to modify), but&lt;br /&gt;
           have a reasonable default: centered horizontally and standing&lt;br /&gt;
           on the ground.&lt;br /&gt;
&lt;br /&gt;
- TX_START: another place to put textures.  No scaling is possible.&lt;br /&gt;
&lt;br /&gt;
- H_START: high resolution versions for existing textures and flats.&lt;br /&gt;
           Scaled to match the texture of the same name (in the TEXTUREx or&lt;br /&gt;
           F_START area).  Requires an existing texture, if none, then the&lt;br /&gt;
           hi-res version must be ignored.  Therefore _new_ hi-res images&lt;br /&gt;
           require a lo-res version to be added to the PWAD.&lt;br /&gt;
&lt;br /&gt;
- NTEXTURE: new text definition for textures, flats and graphics.&lt;br /&gt;
&lt;br /&gt;
- NSPRITES: new text definition for sprite images.  Scaling and offset&lt;br /&gt;
            values can be specified for each sprite image.  Uses the same&lt;br /&gt;
            syntax as NTEXTURE (can share the same parser code).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Namespaces&lt;br /&gt;
----------&lt;br /&gt;
&lt;br /&gt;
These are the containers used by the game engine to hold images:&lt;br /&gt;
&lt;br /&gt;
+ TEXTURES: all textures from the TEXTUREx resource, plus any patches from&lt;br /&gt;
            PNAMES which don't already exist in the list.  Hi-res textures&lt;br /&gt;
            (from the H_START area) simply replace an existing texture object&lt;br /&gt;
            here (i.e. no separate H_START namespace).&lt;br /&gt;
&lt;br /&gt;
+ FLATS:    all the flats from the F_START resource.  Hi-res flats (from&lt;br /&gt;
            H_START area) simply replace an existing flat object here.&lt;br /&gt;
&lt;br /&gt;
+ NEW_TEX:  all the images from the TX_START area, plus all the images&lt;br /&gt;
            defined in NTEXTURE (which take priority).&lt;br /&gt;
&lt;br /&gt;
+ SPRITES:  all the sprite images from the S_START area, plus the ones&lt;br /&gt;
            defined in NSPRITES (which take priority).&lt;br /&gt;
&lt;br /&gt;
+ GRAPHICS: this container works a bit differently.  It should start out&lt;br /&gt;
            as empty.  When a graphic (title screen, menu image, etc) is&lt;br /&gt;
            needed, but doesn't already exist in GRAPHICS, then find the&lt;br /&gt;
            Raw_Lump (see above) of the same name, and add the new image.&lt;br /&gt;
&lt;br /&gt;
            Hi-res graphics in H_START can also be used, and (like flats&lt;br /&gt;
            and textures) are scaled to match the original (the one found&lt;br /&gt;
            in the Raw_Lump resource).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Lookup Order&lt;br /&gt;
------------&lt;br /&gt;
&lt;br /&gt;
Wall Textures: NEW_TEX -&amp;amp;gt; TEXTURES -&amp;amp;gt; FLATS.&lt;br /&gt;
&lt;br /&gt;
Flats: NEW_TEX -&amp;amp;gt; FLATS -&amp;amp;gt; TEXTURES.&lt;br /&gt;
&lt;br /&gt;
Sprites: SPRITES.&lt;br /&gt;
&lt;br /&gt;
Graphics: NEW_TEX -&amp;amp;gt; GRAPHICS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Format of NTEXTURE / NSPRITES&lt;br /&gt;
=============================&lt;br /&gt;
&lt;br /&gt;
The syntax is token-based.  Tokens are delimited by whitespace&lt;br /&gt;
(apart from symbols like ';' which don't need whitespace).&lt;br /&gt;
Words are matched case-insensitively (e.g. Scale == SCALE).&lt;br /&gt;
&lt;br /&gt;
The lump contains a series of definitions, each one has the&lt;br /&gt;
following general format:&lt;br /&gt;
 &lt;br /&gt;
Texture TEXNAME&lt;br /&gt;
{&lt;br /&gt;
    Source type args ... ;&lt;br /&gt;
&lt;br /&gt;
    keyword_A arg1 arg2 ... ;&lt;br /&gt;
    keyword_B arg1 arg2 ... ;&lt;br /&gt;
    ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
In NSPRITES the the word 'Sprite' is used instead of 'Texture'.&lt;br /&gt;
Other definition types may be added in the future, any types&lt;br /&gt;
that are not recognised must be ignored (perhaps with a warning&lt;br /&gt;
message).&lt;br /&gt;
&lt;br /&gt;
Each keyword can have multiple arguments (including none), but&lt;br /&gt;
keywords always end with a semicolon (';').  Arguments which&lt;br /&gt;
contain whitespace or a ';' can be quoted with double quotes&lt;br /&gt;
(&amp;quot;...&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
The first keyword must be &amp;quot;Source&amp;quot;, and defines where the image&lt;br /&gt;
data comes from (e.g. from a lump).  When the source type is not&lt;br /&gt;
recognised, the whole definition must be ignored (perhaps with a&lt;br /&gt;
warning message).&lt;br /&gt;
&lt;br /&gt;
Unknown keywords must be ignored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Source Types&lt;br /&gt;
------------&lt;br /&gt;
&lt;br /&gt;
lump NAME     -  A WAD lump.  Same logic as the Raw_Lump resource&lt;br /&gt;
                 described above, in particular: the lump is found&lt;br /&gt;
                 anywhere in the WAD, and the format can be patch_t,&lt;br /&gt;
                 PNG, JPEG or 320x200 raw block.&lt;br /&gt;
&lt;br /&gt;
file NAME     -  An external file.  patch_t or raw blocks are not&lt;br /&gt;
                 supported.  The filename should be relative and must&lt;br /&gt;
                 not have &amp;quot;..&amp;quot; or drive letter (&amp;quot;C:&amp;quot;) at the start.&lt;br /&gt;
                 Both '/' and '\' directory separators are allowed.&lt;br /&gt;
&lt;br /&gt;
                 The search directories are implementation specific.&lt;br /&gt;
                 A port may even find the image inside a package.&lt;br /&gt;
&lt;br /&gt;
compose W H   -  Composes the image from scratch.  The arguments set&lt;br /&gt;
                 the width and height.  The base (on top of which all&lt;br /&gt;
                 patches are drawn) is a completely transparent image.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Keywords&lt;br /&gt;
--------&lt;br /&gt;
&lt;br /&gt;
patch NAME DX DY  -  A patch for the 'compose' source type.  Not allowed&lt;br /&gt;
                     in other types.  The NAME is first looked up in the&lt;br /&gt;
                     NEW_TEX namespace, and then as a Raw_Lump resource&lt;br /&gt;
                     (if not found).&lt;br /&gt;
&lt;br /&gt;
                     The DX and DY arguments are the offset into the new&lt;br /&gt;
                     image.  The patch will be clipped to the texture size.&lt;br /&gt;
                     Transparent parts of a patch_t or PNG will leave the&lt;br /&gt;
                     pixels underneath unchanged.&lt;br /&gt;
&lt;br /&gt;
worldsize W H     -  Gives the size of the image in world units.&lt;br /&gt;
                     Floating point is allowed.&lt;br /&gt;
&lt;br /&gt;
scale SCALE ASPECT&lt;br /&gt;
                  -  An alternative to worldsize, giving the scale and&lt;br /&gt;
                     aspect of the image directly.  Larger values make&lt;br /&gt;
                     the image bigger.  The ASPECT argument is optional.&lt;br /&gt;
&lt;br /&gt;
                     These equations show the mapping to worldsize:&lt;br /&gt;
&lt;br /&gt;
                     world_w = image_w * scale * aspect&lt;br /&gt;
                     world_h = image_h * scale&lt;br /&gt;
&lt;br /&gt;
texeloffsets FLAG -  The flag is either 1 to enable or 0 to disable.&lt;br /&gt;
                     When enabled, it means that offsets from sidedefs&lt;br /&gt;
                     are in _pixels_ instead of world units.&lt;br /&gt;
                     Also affects scrolling walls and floors.&lt;br /&gt;
&lt;br /&gt;
                     The default is 0 (disabled).&lt;br /&gt;
&lt;br /&gt;
offset DX DY      -  For sprites, gives the offset values (in PIXELS).&lt;br /&gt;
                     With weapon sprites, it is the number of pixels&lt;br /&gt;
                     to move from the base position: center the image&lt;br /&gt;
                     horizontally on-screen and the bottom of the image&lt;br /&gt;
                     touches the bottom of the view window.&lt;br /&gt;
&lt;br /&gt;
                     Floating point is allowed.&lt;br /&gt;
&lt;br /&gt;
palettemap SRC1 SRC2 DEST1 DEST2&lt;br /&gt;
                  -  palette-based translation.  Pixels in the range&lt;br /&gt;
                     (SRC1 -&amp;amp;gt; SRC2) should be mapped to be in the range&lt;br /&gt;
                     (DEST1 -&amp;amp;gt; DEST2).  Require SRC1 &amp;amp;lt;= SRC2, although&lt;br /&gt;
                     the destination range can be backwards.&lt;br /&gt;
&lt;br /&gt;
                     This keyword can be used multiple times.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;br /&gt;
 &amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Corbin</name></author>	</entry>

	</feed>