home *** CD-ROM | disk | FTP | other *** search
/ WADS of WADS / WadsOfWads.1994.zip / TEXT / WIFSPEC.TXT < prev    next >
Text File  |  1994-04-14  |  30KB  |  734 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.           DOOM User WAD Authors Working Group                       T. Neff
  10.           In-Progress Specification: WIF-001                tneff@panix.com
  11.  
  12.  
  13.                                   *** PRELIMINARY ***
  14.  
  15.              WIF: A Standard for Text-Based Interchange of DOOM WAD Files
  16.  
  17.  
  18.  
  19.           STATUS OF THIS MEMO
  20.  
  21.           This document defines a proposed format (WIF) for the interchange
  22.           of playing level (WAD) files as used with the IBM PC game
  23.           DOOM.[1]  It extends and revises an ad hoc format (DWD) used by
  24.           the developers of DOOM, adding features of use and interest to
  25.           the community of user WAD authors worldwide.  This memo is
  26.           intended as a "working version" of the specification, to be
  27.           amended and added to by the user community after discussion.  It
  28.           does not define an Internet standard.  Distribution of this
  29.           document is unlimited.
  30.  
  31.  
  32.           1. INTRODUCTION
  33.  
  34.           Since DOOM's release in 1993, it has become a popular game among
  35.           users of the Internet and BBS's worldwide.  DOOM's developers, id
  36.           Software, provided a "hot patch" capability (via the -file
  37.           switch) that lets players load supplementary object, map, graph-
  38.           ic, and/or sound information.  These binary patch files are
  39.           called PWADs (or just "WADs"), and their format has been unoffi-
  40.           cially documented in a separate publication.[2]  Based on these
  41.           specifications, more than half a dozen DOOM patch builder pro-
  42.           grams ("WAD editors") have been written by users and distributed
  43.           electronically, along with dozens (soon hundreds) of user-written
  44.           WAD files created with them.  More users are learning to write
  45.           WADs (and even WAD editors) every week, and the new challenges
  46.           thus created are attracting a lot of excitement.
  47.  
  48.           As useful as WAD files are, though, they have certain drawbacks
  49.           for both the developer and the user.  For one thing, they are
  50.           binary files, with a complex inner structure.  When distributed
  51.           over the Net, they suffer from the perennial problem of binary
  52.           corruption in FTP and BBS archives, and they must be "uuencoded"
  53.           if they are to appear in Netnews postings.  Many new users have
  54.           trouble handling these files.  Moreover, PWADs (as defined by id)
  55.           have standardized provision for internal documentation or "binary
  56.           comments," making identification harder when they are exchanged
  57.           without accompanying text files.  Finally, the present binary
  58.           format does not lend itself to the creation or exchange of "pre-
  59.           fab" structural components (stairs, towers, teleport chambers,
  60.  
  61.  
  62.                                                WIF-001 (PRELIMINARY) page 1
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.           etc) that would make life easier and more fun for casual or
  71.           cooperative WAD builders.
  72.  
  73.           As a result, every WAD programmer who wishes to address these
  74.           things must do so from scratch, in proprietary, non-extensible
  75.           ways.  Several mutually incompatible "comments" object formats
  76.           already exist, for example.  Meanwhile, the FTP upload archives
  77.           are replete with plaintive graffitti:
  78.  
  79.              ... Apr  1  15:00  CHALLENG.WAD_is_corrupt_please_fix!
  80.              ... Mar 29  06:43  What_is_DEADIMP.WAD?
  81.  
  82.           It turns out that Id Software already has a text WAD interchange
  83.           format, created as a bridge between their NeXTStep development
  84.           environment and the Intel 386 binary target.  The "DWD" format
  85.           simply specifies Lines and Things, and lets the final PC-based
  86.           WAD builder determine Sectors and Nodes. (All WAD terminology in
  87.           this document is taken from the "Unofficial Specs."  Appendix B
  88.           shows excerpts from a sample DWD file.)  DWD files can safely be
  89.           transmitted over ASCII-based networks, posted in Netnews articles
  90.           and BBS messages, and interpreted to a limited extent by human
  91.           browsers.
  92.  
  93.           But DWD lacks some features that a creative user exchange commu-
  94.           nity needs.  There is no provision for comments, which users need
  95.           for recording authorship or identifying features of interest.  No
  96.           known DWD record format exists for encoding bitmap or sound data,
  97.           although these are includeable in binary PWADs and have been
  98.           distributed successfully.  Worst of all, there is no "sectors"
  99.           section as such: instead, the full description (Floor/Ceiling
  100.           heights and textures, Type, etc) of each Sector is redundantly
  101.           recorded, again and again, with every adjoining Sidedef!  This
  102.           does have the effect of making DWD entries order-independent and
  103.           mergeable without renumbering (or at least it would if Tag
  104.           numbers did not exist), but for DOS developers who are easily
  105.           capable of renumbering when required, this is not worth the
  106.           tradeoff.
  107.  
  108.           WIF, then, builds on the existing DWD format by adding section
  109.           types for the features developers need, while modifying the Line
  110.           and Sector description method to eliminate the redundancy,
  111.           yielding more compact and unambiguous patch files.
  112.  
  113.           NOTE: Because some DWD source exists in public hands (such as the
  114.           sample E1M1 file included with "DOOMBSP.ZIP"[3]), it is half-
  115.           heartedly suggested that WIF-compliant programmers accept "clas-
  116.           sic DWD" file format as a readable extension to the standard.
  117.  
  118.           1.1. Notation
  119.  
  120.           In this document, line syntaxes often read like this:
  121.  
  122.  
  123.                                                WIF-001 (PRELIMINARY) page 2
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.              sectors : <number>
  132.  
  133.           The way to interpret this is that everything NOT in angle brack-
  134.           ets (<>) should be written exactly as is, and everything WITHIN
  135.           angle brackets (and the brackets themselves) should be replaced
  136.           by the appropriate parameter.  So
  137.  
  138.              sectors : 201
  139.  
  140.           would conform to the above syntax, with <number> equal to 201. 
  141.           Sometimes, a substitution parameter will appear in braces:
  142.  
  143.              level : <episode> <level> [name]
  144.  
  145.           This means that while <episode> and <level> are REQUIRED parame-
  146.           ters, <name> is OPTIONAL and can be omitted if desired.
  147.  
  148.           1.2. Required and Optional Features
  149.  
  150.           Some statements in this document are simple declaratives or use
  151.           the word "must," for example:
  152.  
  153.              <Level> is a number in the range 1-9.
  154.              The "#WIF" tag must be the first line in the file.
  155.  
  156.           These statements should be considered a REQUIRED part of the WIF
  157.           spec, i.e., any WAD editor that does not behave that way is
  158.           considered non-conforming.
  159.  
  160.           Other statements use the word "should" or "it is recommended":
  161.  
  162.              WAD editors should emit blanks instead of tabs.
  163.  
  164.           This means that it would REALLY HELP if conforming applications
  165.           obeyed the suggestion, although it's understood that one or two
  166.           might be unable to do so; they are then considered "minimally
  167.           conforming" but could use improvement.
  168.  
  169.           And others just say "may" or (slightly stronger) "it is suggest-
  170.           ed":
  171.  
  172.              WAD editors may use #comments to document level features.
  173.  
  174.           This means that an application can obey or ignore that statement
  175.           without affecting WIF conformance, although it seems like some-
  176.           thing that at least some applications would want to do.
  177.  
  178.           If any statement does not conform to this structure and its
  179.           importance is not clear, please submit a comment.
  180.  
  181.  
  182.           2. THE WIF FORMAT
  183.  
  184.                                                WIF-001 (PRELIMINARY) page 3
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.           2.1. Alphabet
  193.  
  194.           WIF files may be encoded in any locally supported character set
  195.           (ASCII, EBCDIC, etc) but must at minimum support the ISO 646
  196.           graphic character set:
  197.  
  198.              ! " % ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ?
  199.              A B C D E F G H I J K L M N O P Q R S T U V W X Y Z _
  200.              a b c d e f g h i j k l m n o p q r s t u v w x y z
  201.  
  202.           including the blank " ".  This is the character set used in the
  203.           syntactically significant portion of WIF.  Any additional symbols
  204.           are permissible in comments, whitespace etc, but are not guaran-
  205.           teed to survive translation to another WIF platform.  It is
  206.           suggested that WAD authors try to stick to general character sets
  207.           like ISO-8859-1 and avoid nonportable symbols like the IBM PC
  208.           "line draw" characters.
  209.  
  210.           "Tab" characters and blanks are treated the same and may be
  211.           freely interchanged as whitespace.  Because not all editors and
  212.           platforms support tabs, WAD editors should use only blanks in WIF
  213.           files they write.
  214.  
  215.           2.2. Lines
  216.  
  217.           WIF files consist of one or more lines of text, separated by any
  218.           valid local delimiting method (NL, CRLF, fixed length records,
  219.           etc).  Each line must be at most 80 characters in length, not
  220.           counting the line delimiter.  Because of the  conflict in ASCII
  221.           delimiting styles between UNIX and DOS, it is recommended that
  222.           WAD editors accept either style on input, while outputting the
  223.           delimiter appropriate to the local environment.
  224.  
  225.           2.2.1.  Comments
  226.  
  227.           All lines beginning with the pound symbol ("#") are comments. 
  228.           They may be ignored, preserved, or treated as special additional
  229.           data by specific WAD editors.  Example:
  230.  
  231.              #This is a Deathmatch level built by Paul Plasma.
  232.  
  233.           One special comment line begins each WIF file:
  234.  
  235.              #WIF Version 1
  236.  
  237.           must be the *first line* of the WIF file.  The symbols "#WIF"
  238.           must be the first four bytes of the file, for filesystems sup-
  239.           porting byte structure.  The remainder of the line should appear
  240.           as written above, although WAD editors may be liberal in their
  241.           interpretation of whitespace and case matching.  The version
  242.           number ("1") specifies this version of the WIF specification.  In
  243.  
  244.  
  245.                                                WIF-001 (PRELIMINARY) page 4
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.           future modifications of the spec, the number should be expected
  254.           to change (increase).
  255.  
  256.           Comments may also follow the # symbol in-line after keyword and
  257.           parameters:
  258.  
  259.              (3584,-3904) to (3536,-3904) : 1 : 0 : 0  # back of the room
  260.  
  261.           WAD editors may use either form (or both) of WIF comment conven-
  262.           tion to document sectors, lines and sides during editing.  In
  263.           general, these comments should NOT be expressed in the resulting
  264.           binary WAD file; see the "Info" keyword below for in-binary
  265.           documentation.
  266.  
  267.           2.2.2.  Blank lines
  268.  
  269.           All blank lines are ignored syntactically, and may be preserved
  270.           or ignored by WAD editors.  Editors may choose to add blank lines
  271.           before WIF sections (see below) or elsewhere as appropriate.  No
  272.           blank lines are permitted before the initial #WIF comment line
  273.           (see above).
  274.  
  275.           2.2.3.  Line continuation
  276.  
  277.           Although most WIF line formats should not require it, lines may
  278.           be "continued" by ending them with the backslash ("\") symbol. 
  279.           Everything from the backslash through the first *nonblank*
  280.           character of the following line is assumed to be replaced by a
  281.           blank.  Example:
  282.  
  283.              Info : This is the test level we are working on for our \
  284.                     Modem Deathmatch club.  If you have any suggestions \
  285.                     for new traps, contact the secretary, Paul Plasma.
  286.  
  287.           2.2. Keywords
  288.  
  289.           Many WIF control lines begin with a Keyword, usually followed by
  290.           a colon (":") and one or more parameters.  Keywords always
  291.           consist of alphabetic characters (A thru Z), with case ignored. 
  292.           (It is suggested that WAD editors emit lower case keywords, in
  293.           keeping with DWD conventions.)  Each keyword should begin in the
  294.           first column on its line, and be followed (after optional inter-
  295.           vening whitespace) by the colon.  The colon is followed by any
  296.           parameters.  Examples:
  297.  
  298.              lines:475
  299.  
  300.              info : A deathmatch E2M1 wad by Paul Plasma, pplasma@imp.com
  301.  
  302.           2.3. Parameters
  303.  
  304.  
  305.  
  306.                                                WIF-001 (PRELIMINARY) page 5
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.           Many WIF lines contain parameters (values) that define lines,
  315.           sectors etc. These parameters come in two varieties: numeric and
  316.           string.
  317.  
  318.           2.3.1. Numbers
  319.  
  320.           All WIF numeric parameters are INTEGERS in the range -32768 to
  321.           +32767.  They are expressed as one to five digits, optionally
  322.           preceded by the "-" sign.  There are no floating point or frac-
  323.           tional numbers in WIF.
  324.  
  325.           2.3.2. Strings
  326.  
  327.           String values in WIF consist of one or more characters from the
  328.           ISO 646 graphic set (see above).  Most WIF strings should not
  329.           need embedded blanks, but a few (like the option [name] on the
  330.           Level keyword - see below) might do so.  Quote marks should NEVER
  331.           be needed in a WIF file for reasons of syntax. If a string is
  332.           allowed to contain blanks, it must be the last parameter on the
  333.           line.  Texture names (see below) do not contain blanks.
  334.  
  335.           2.4. Levels
  336.  
  337.           After the #WIF comment line, a WIF file consists of one or more
  338.           Levels, each composed of several Sections (see below).  Each
  339.           Level begins with a directive as follows:
  340.  
  341.              level : <episode> <level> [name]
  342.  
  343.           where <episode> is a number in the range 1-3 (as of DOOM 1.2,
  344.           although the commercial version due in Fall 1994 may add more
  345.           episodes) and <level> is a number in the range 1-9.  [Name] is an
  346.           optional string that gives a new "level name," although at
  347.           present there is no known way to override the names given by DOOM
  348.           at level completion.  Example:
  349.  
  350.              level : 3   5   Nightmare Alley
  351.  
  352.           2.4.1. Anonymous levels / patch components
  353.  
  354.           If the level directive is OMITTED, then a WIF file is assumed to
  355.           apply to *no level in particular* or to *any level* as the WAD
  356.           editor sees fit.  At most one complete level per WIF file can be
  357.           encoded this way.
  358.  
  359.           The more common use of "anonymous" WIF levels would be for *patch
  360.           components*, i.e., self-contained architectural elements or map
  361.           sections which are stored in a level-independent form and loaded
  362.           "on top of" actively edited levels by a WAD editor supporting
  363.           this feature.  For example, a "sniper nest" or "grand ballroom
  364.           staircase" or "cacodemon flying wedge" could be built using a WAD
  365.           editor and then explicitly saved as a patch component, for
  366.  
  367.                                                WIF-001 (PRELIMINARY) page 6
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.           library storage,  posting to the Internet, etc.   Useful or
  376.           interesting rooms or constructions could be exchanged in this way
  377.           without having to provide the entire Level.
  378.  
  379.           Any number of such Patches can be concatenated into a WIF file,
  380.           unlike complete "anonymous" levels.  It does not appear necessary
  381.           to provide explicit keyword support for patches at this time, but
  382.           comments are welcome.
  383.  
  384.  
  385.           2.5. Sections
  386.  
  387.           After the Level directive (if any), each Level is composed of the
  388.           following Sections, in order:
  389.  
  390.              [Info]
  391.              Sectors
  392.              Lines
  393.              Things
  394.  
  395.           *In a complete level, all sections except Info are mandatory*. 
  396.           In a patch component, any section may be omitted, except that
  397.           Sectors must be present if Lines are.
  398.  
  399.           Each Section begins with a keyword directive from the above list. 
  400.           Each directive consists of the keyword and (except for Info) a
  401.           count of how many of that type of thing the Level contains.  (See
  402.           below.)
  403.  
  404.           It is strongly suggested that WAD editors write "dummy sections"
  405.           (with just the keyword directive, and a count of 0) rather than
  406.           omit sections on output.
  407.  
  408.           2.5.1.  The Info Section
  409.  
  410.           The Info section optionally allows the WAD author to supply some
  411.           documentation to be stored in the binary WAD file itself, using
  412.           one of the non-Id-standard "INFO" directory entry formats already
  413.           in existence, or some new one to be agreed on by WAD editor
  414.           authors. 
  415.  
  416.           The section consists just of the Info directive, followed by one
  417.           or more lines (with continuations) of explanatory text:
  418.  
  419.              info : [text]
  420.  
  421.           It is suggested that no more than 1-2K of Info text should be
  422.           stored per level, to keep WAD sizes down.
  423.  
  424.           NOTE: WAD editors which do not support the binary INFO entry must
  425.           skip this section without an error when writing a WAD file.  They
  426.  
  427.  
  428.                                                WIF-001 (PRELIMINARY) page 7
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.           should retain the section in the WIF file itself, even if they do
  437.           not write it to the binary.
  438.  
  439.           2.5.2. The Sectors section
  440.  
  441.           This section lists all the sectors in the level, breaking out the
  442.           per-side sector information from DWD into a separate list. It
  443.           begins with a directive:
  444.  
  445.              sectors : <number>
  446.  
  447.           where <number> is the number of sector definition entries (not
  448.           counting continuations) following.
  449.  
  450.           Following this directive are one or more sector definition
  451.           entries of the form
  452.  
  453.              <floorH> : <floorT> <ceilH> : <ceilT> <litelev> <type> <tag>
  454.  
  455.           where <floorH> and <ceilH> (numeric) and <floorT> and <ceilT>
  456.           (string) are the floor and ceiling heights and texture names,
  457.           respectively; <litelev> is the numeric light level; <type>
  458.           (numeric) is the sector type; and <tag> (numeric) is the Linedef
  459.           (Trigger) tag, or 0 if none.  For definitions of these terms, see
  460.           the Unofficial DOOM Specs.
  461.  
  462.           Example:
  463.  
  464.              100 : FLOOR4_8 172 : CEIL3_5 240 9 16
  465.  
  466.           (NOTE: WAD editors must treat texture names in a case insensitive
  467.           manner on input, since there is some case variation even in Id's
  468.           own registered levels; they should use uppercase only for texture
  469.           names on output.)
  470.  
  471.           The list of sector definitions establishes an ORDERING which will
  472.           allow subsequent Side definitions to refer back to these sectors
  473.           *by number* (0 thru N), so it is important that WAD editors do
  474.           not rearrange, insert or delete sectors in this list without
  475.           changing the associated Sidedefs.  The "sector number" itself
  476.           does not appear in the definition line, but WAD editors may wish
  477.           to show it in a preceding or inline comment, to make human
  478.           scanning of the WIF file easier, e.g.,
  479.  
  480.              # Sector 34 - elevator to tower
  481.              100 : FLOOR4_8 172 : CEIL3_5 240 9 16
  482.  
  483.  
  484.           2.5.3. The Lines section
  485.  
  486.           This section defines all the Lines (including Sides) in a level. 
  487.           It begins with a directive:
  488.  
  489.                                                WIF-001 (PRELIMINARY) page 8
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.              lines : <count>
  498.  
  499.           where <count> is the number of line definitions (not counting
  500.           Side definitions) that follow.
  501.  
  502.           This directive is followed by <count> number of definitions, each
  503.           consisting of a Linedef followed by one or two Sidedefs.
  504.  
  505.           A Linedef consists of a line as follows:
  506.  
  507.              (<x0>,<y0>) to (<x1>,<y1>) : <flags> : <type> : <tag>
  508.  
  509.           where <x0>, <y0>, <x1>, <y1> are the numeric X and Y coordinates,
  510.           respectively, of the line's start and end points; <flags> is the
  511.           numeric flags value; <type> is the numeric line type; and <tag>
  512.           is the Sector/Trigger Tag or 0 if none.  (See the Unofficial
  513.           Specs for an explanation of these fields.)
  514.  
  515.           Each Sidedef consists of a line as follows:
  516.  
  517.              <xoff> ( <yoff> : <topT> / <botT> / <midT> ) <sector>
  518.  
  519.           where <xoff> and <yoff> are the numeric X and Y offsets, respec-
  520.           tively, of the textures applied to this side; <topT>, <botT>, and
  521.           <midT> are the (string) names of the textures to apply to top,
  522.           bottom, and middle (or "normal") surfaces of this side; and
  523.           <sector> is a numeric index (0-based) into the preceding Sector
  524.           section (see 2.5.2 above) for the Sector adjoining this side. 
  525.           (NOTE: This is an extension of the DWD format.)
  526.  
  527.           At least one Sidedef must be associated with each Linedef.  If
  528.           only one Sidedef is present, it is always assumed to be the
  529.           "right" side.
  530.  
  531.           For convenience of reading and compatibility with existing DWD
  532.           files, it is suggested that WAD editors include the optional
  533.           whitespace before Sidedef lines, thus indenting them from their
  534.           associated Linedefs.
  535.  
  536.           Example:
  537.  
  538.              (1344,-3104) to (1344,-3200) : 29 : 0 : 0
  539.                  8 (0 : STARTAN3 / STARTAN3 / - ) 16
  540.                  0 (0 : - / - / - ) 21
  541.  
  542.           2.5.4. The Things section
  543.  
  544.           This section lists all of the objects (players, monsters, bonus-
  545.           es, teleport exits etc) on the level.  It consists of a directive
  546.  
  547.              things:<count>
  548.  
  549.  
  550.                                                WIF-001 (PRELIMINARY) page 9
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.           where <count> is the number of Thingdefs following.  Then comes
  559.           <count> many Thingdefs, each of which has the format
  560.  
  561.              (<x>, <y>, <angle>) :<type>, <when>
  562.  
  563.           where <x> and <y> are the numeric coordinates of the thing's
  564.           location, <angle> is the direction it faces (0 to 359), <type> is
  565.           the number (1-????) of the type of Thing at that location, and
  566.           <when> is a numeric bitmask of which degrees of difficulty the
  567.           object appears in, plus other bits for "deaf" etc.                
  568.                                 
  569.           Example:
  570.  
  571.              (1056,-3616, 90) :1, 7 # player 1 start
  572.  
  573.  
  574.           3. FUTURE DIRECTIONS
  575.  
  576.           There are several enhancements to this specification that could
  577.           be considered, depending on the needs and views of WAD editor
  578.           developers.  Some of them are outlined in the following section.
  579.  
  580.           3.1.  Tag descriptions
  581.  
  582.           One popular Windows-based editor has already introduced the
  583.           concept of "Platform," whereby text descriptions are attached to
  584.           individual Sector/Linedef "Tag" numbers (see 2.5.2 and 2.5.3
  585.           above).  Unfortunately it rapidly becomes obvious that users
  586.           confuse these Tags or "triggers" with the Sectors that use them,
  587.           perhaps especially because "Platform" sounds like a raised
  588.           section of floor.  Since WIF allows extensive commenting of all
  589.           lines, sides and sectors, it may be unnecessary to specifically
  590.           attach comments to *triggers* as such, but if WAD programmers
  591.           think it is worth it, a "Tags section" could be added.  The only
  592.           problem is that there would really be nothing worth saying in it
  593.           except a list of comments!  Another solution would be to settle
  594.           on a comment format associated with the Linedef.  More discussion
  595.           is needed on this.
  596.  
  597.           3.2. Mnemonics for Things/Flags/Types
  598.  
  599.           The DWD format used raw numbers for such things as Linedef flags;
  600.           most WAD editors then decode these and express them as human
  601.           readable abbreviations or mnemonics.  Would it make WIF files
  602.           more readable if character mnemonics were used in place of some
  603.           or all of the numbers?  Or would it make parsing an unacceptable
  604.           burden and interfere with multinational WAD editing?
  605.  
  606.           3.3. Entries for Graphics/Sound
  607.  
  608.           It is possible, of course, to supply other entries in a PWAD file
  609.           besides map data: texture bitmap graphics and audio samples can
  610.  
  611.                                               WIF-001 (PRELIMINARY) page 10
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.           appear too.  Is it worth coming up with an ASCII representation
  620.           of these things for inclusion in a WIF?  Perhaps at minimum, a
  621.           UUENCODEd copy of such binary data could appear, because other-
  622.           wise, WADs that do contain both map data and sound/texture data
  623.           would be impossible to render in WIF without losing data.  The
  624.           syntax for such entries would not be too difficult to lay out,
  625.           but we will skip it in this version.
  626.  
  627.  
  628.           APPENDIX A.  EXAMPLE WIF FILE
  629.  
  630.           #WIF Version 1
  631.  
  632.           info : A sample WAD to demonstrate the WIF format.
  633.  
  634.           # Feel free to add to this! - Paul.
  635.  
  636.           sectors:41
  637.             0 : FLOOR4_8 72 : CEIL3_5 255 1 0 # sector 0 - entry room
  638.             0 : FLOOR4_5 100 : CEIL3_5 240 1 0 # sector 1
  639.                  . . .
  640.             0 : FLOOR4_8 72 : CEIL3_5 255 1 0 # sector 275 - long hall
  641.             0 : FLOOR4_8 72 : CEIL3_5 255 1 0 # sector 276
  642.             104 : FLOOR4_8 184 : FLOOR6_2 128 9 2 # sector 277 - exit
  643.  
  644.           lines:475
  645.           (1088,-3680) to (1024,-3680) : 1 : 0 : 0
  646.               0 (0 : - / - / DOOR3 ) 0
  647.           (1024,-3680) to (1024,-3648) : 1 : 0 : 0
  648.               0 (0 : - / - / LITE3 ) 0
  649.           (1088,-3648) to (1088,-3680) : 1 : 0 : 0
  650.               0 (0 : - / - / LITE3 ) 0
  651.                  . . .
  652.           (3536,-3840) to (3584,-3840) : 1 : 0 : 0
  653.               0 (0 : - / - / BROWNGRN ) 186
  654.           (3584,-3904) to (3536,-3904) : 1 : 0 : 0
  655.               0 (0 : - / - / BROWNGRN ) 186
  656.           (3536,-3904) to (3520,-3904) : 1 : 0 : 0
  657.               0 (4 : - / - / SUPPORT2 ) 187
  658.  
  659.           things:138
  660.           (1056,-3616, 90) :1, 7
  661.           (1008,-3600, 90) :2, 7
  662.           (1104,-3600, 90) :3, 7
  663.           (960,-3600, 90) :4, 7
  664.           (288,-3104, 90) :48, 7
  665.           (288,-3360, 90) :48, 7
  666.           (528,-3312, 90) :2028, 7 # floor lamp
  667.                 . . .
  668.           (3376,-3024, 0) :2015, 7 # some armor bonuses
  669.           (3568,-2992, 0) :2015, 7
  670.           (3616,-3088, 0) :2015, 7
  671.  
  672.                                               WIF-001 (PRELIMINARY) page 11
  673.  
  674.  
  675.  
  676.  
  677.  
  678.  
  679.  
  680.           (3664,-3168, 0) :2015, 7
  681.           (3648,-3840, 0) :2015, 7
  682.  
  683.  
  684.           APPENDIX B.  EXAMPLE DWD FILE
  685.  
  686.           WorldServer version 4
  687.  
  688.           lines:475
  689.           (1088,-3680) to (1024,-3680) : 1 : 0 : 0
  690.               0 (0 : - / - / DOOR3 )
  691.               0 : FLOOR4_8 72 : CEIL3_5 255 1 0
  692.           (1024,-3680) to (1024,-3648) : 1 : 0 : 0
  693.               0 (0 : - / - / LITE3 )
  694.               0 : FLOOR4_8 72 : CEIL3_5 255 1 0
  695.           (1088,-3648) to (1088,-3680) : 1 : 0 : 0
  696.               0 (0 : - / - / LITE3 )
  697.               0 : FLOOR4_8 72 : CEIL3_5 255 1 0
  698.                 . . .
  699.           (3536,-3840) to (3584,-3840) : 1 : 0 : 0
  700.               0 (0 : - / - / BROWNGRN )
  701.               104 : FLOOR4_8 184 : FLOOR6_2 128 9 2
  702.           (3584,-3904) to (3536,-3904) : 1 : 0 : 0
  703.               0 (0 : - / - / BROWNGRN )
  704.               104 : FLOOR4_8 184 : FLOOR6_2 128 9 2
  705.           (3536,-3904) to (3520,-3904) : 1 : 0 : 0
  706.               0 (4 : - / - / SUPPORT2 )
  707.               104 : FLOOR4_8 184 : FLOOR6_2 128 9 2
  708.  
  709.           things:138
  710.           (1056,-3616, 90) :1, 7
  711.           (1008,-3600, 90) :2, 7
  712.           (1104,-3600, 90) :3, 7
  713.           (960,-3600, 90) :4, 7
  714.           (288,-3104, 90) :48, 7
  715.           (528,-3312, 90) :2028, 7
  716.                 . . .
  717.           (3568,-2992, 0) :2015, 7
  718.           (3664,-3168, 0) :2015, 7
  719.           (3648,-3840, 0) :2015, 7
  720.  
  721.  
  722.           NOTES.
  723.  
  724.           [1] DOOM is a registered trademark of Id Software.
  725.  
  726.           [2] "The Unofficial DOOM Specifications" Release 1.3, by Matt
  727.           Fell (matt.burnett@acebbs.com).  Available (as DMSPEC13.ZIP) by
  728.           FTP from ocf.unt.edu and wustl.wuarchive.edu.
  729.  
  730.           [3] DOOMBSP.ZIP, dated 6 April 94, available by FTP from
  731.           ocf.unt.edu and wustl.wuarchive.edu.
  732.  
  733.                                               WIF-001 (PRELIMINARY) page 12
  734.