home *** CD-ROM | disk | FTP | other *** search
- NewWad 1.3
-
- (originally pcx2wad 0.98 by Daniel Gilliland);
- Modified by Christopher Wise
-
- NewWad is a program to add textures in pcx, bmp or lbm formats to the WAD2
- files that are used by qbsp. NewWad performs averaging to anit-alias the
- smaller sized textures.
-
-
- Usage:
- The command line syntax is:
- newwad <scriptfile> <wadfile>
-
- <scriptfile> is the full name of the script that newwad reads.
- <wadfile> is the full name of the wad file to which the textures are to be
- added. If you specify a wad file name that already exists the textures will
- be added to the file. Your script file should contain only the new entries if
- you are adding to the file.
-
- WARNING: MAKE SURE TO BACK UP YOUR WAD FILES AS THIS PROGRAM HAS NOT BEEN
- EXTENSIVELY TESTED AND COMES WITH NO GUARANTEE.
-
- If the program exits with an error during the script reading process the
- original wad file should be untouched. However if there is an error during
- the writing procedure the wad file willbe corrupted, so keep a backup copy of
- your wad file.
-
-
- Scriptfiles:
- A script file is just a list of the inupt filenames and the corresponding
- texture name that will be included in the wad file. The texture name can be
- up to 16 characters long and can include the '*' and '+' characters for
- animated textures. There should be one entry per line. Comments are prefixed
- by // and can appear after an entry or on a separate line. NewWad supports
- pcx/bmp/lbm formats but only with 256 colour images and dimensions that are
- a multiple of 16.
-
- For example:
- ----script.txt-----
- tech06_2.pcx TECH06_2
- stairs.lbm STAIRS
- // this is a comment
- crate0~1.bmp CRATE
- lava1.pcx *LAVA1 // this is also a comment
- -------------------
-
- Running "newwad script.txt wadfile.wad" would do the following:
-
- If a file called wadfile.wad does not exist then a file called 'wadfile.wad'
- would be created, and it would contain 4 mip textures: TECH06_2, STAIRS,
- CRATE and *LAVA1. Use these names in .map files to specify which texture you
- want each face to have. Also files called palette.lmp and colormap.lmp would
- be written to disk. If you are using the quake palette you can ignore/delete
- these files.
-
- If a file called wadfile.wad exists then the 4 mip textures would be added to
- the file. Palette.lmp and colormap.lmp would NOT be created.
-
-
- Limitations:
- You can't add a picture that is bigger than 1024x512. Since the largest
- textures in registered Quake are 320x192 pixels I think that this limit is
- more than large enough.
-
- The imput image MUST have dimensions that are a multiple of 16 pixels.
-
- The program exits if an error is encountered. A valid wad file is only
- created if no errors are encountered so you must fix the error in the script
- file or source images and rerun the program.
-
-
- Notes on Palettes:
-
- The quake palette consists of 256 indexed colours, numbered from 0 to 255.
- Colour 255 is used as a transparency colour. Palette entries 240 to 254 are
- used as fullbright colours, that is these colours stay the same intensity
- regardless of the surrounding light level in the game. In quake they are used
- in lights, red sigils etcetera. Color 0 is the transparency colour for sky
- textures. Sky textures are a 256x128 bitmap, the left 128x128 portion is the
- partially transparent part of the sky (fast-moving, lower clouds), and the
- right 128x128 portion is the higher, slow-moving, solid cloud texture.
- Palette index 0 is used for transparency.
-
- The sub images only use the first 240 colours unless there is a direct match
- to a fullbright colour or the transparent colour (palette entry 255).
-
- NewWad now uses the palette from each file that is read. Thus it is possible
- to create a wad2 file with textures based on another palette for a total
- conversion. However, it is still the user's responsibility to ensure that
- the palettes of all the input files are all the same.
-
- If you are making a total conversion you should put them in the gfx sub-
- directory of your game directory. (e.g. make a directory under the Quake
- directory called "mygame". Then make a sub-directory called gfx in which you
- put the .lmp files. Your levels should go in the quake\mygame\maps directory.
- Start quake with the command line quake -game mygame and the modified palette
- will be included. If you are going to change the palette you will need to change the palette
- mapping of each of the .lmp, .spr and .mdl files.
-
- To convert the .lmp, .spr and .mdl files I suggest you use swchpal by
- Andy Bay.(Look for SWCHPAL.ZIP on ftp.cdrom.com or mirrors)
-
- Put all the lump files (except for colormap.lmp and palette.lmp) in a
- directory with swchpal.exe. Copy the original palette.lmp as oldpal.pal and
- the new palette.lmp as newpal.pal.
-
- Make a batch file eg: switch.bat that contains the lines:
- -------switch.bat----------------
- for %%f in (*.lmp) do swchpal %%f
- for %%f in (*.mdl) do swchpal %%f
- for %%f in (*.spr) do swchpal %%f
- ---------------------------------
- (note the double % signs are supposed to be used)
-
- All the .lmp files in gfx.wad can be converted at once by the command
- swchpal gfx.wad
-
-
- WadView and BspView:
- The utilities WadView and BspView are included. You can browse an existing
- wadfile or bsp file and extract the textures to pcx files.
- The command line usage is simple:
- wadview <wadfile>
- or
- bspview <bspfile>
-
- <wadfile> and <bspfile> are the full names of the .wad file or .bsp file that
- you want to view.
-
- WadView will use the pallete lump if there is one in the wad file or the
- Quake palette otherwise. BspView always uses the Quake palette. The size of
- the image is reduced by a factor of two for large textures; there is now a
- size indicator in the top left corner of the screen.
-
- Note: WadView and BspView don't run under windows 95 but NewWad still does.
-
-
- History:
- 0.99 I was going to write a complete utility but then I saw this program and
- it's source and thought 'why reinvent the wheel?'. Given that Daniel
- Gilliland wrote that he did not intend to update the program I decided to do
- it myself. I had already written the decimation routine so I just slotted it
- into the source and recompiled.
-
- 1.0 I have added the ability to update an existing .wad file as well as
- create a new .wad file. I have also added a rudimentry check on an existing
- .wad file to see if it has a directory entry (i.e. is not corrupted) before
- attempting to add textures to it.
-
- 1.2 Added palette handling to NewWad and the creation of palette.lmp and
- colourmap.lmp files. Added WadView and BspView utilities to the distribution.
- The ammount of output text has been greatly reduced.
-
-
- Email:
- Contact me (Christopher Wise) at wise@eng2.eng.monash.edu.au
- Feel free to ask questions. I would like feedback if the program doesn't work
- properly. I will try to fix any bugs, time permitting and may add new features.
- I hope that this program is of use to level creators.
-