
DISCLAIMER (Just for my protection)

The is a BETA test version of the WACKER program. When you execute
this program you do so at your own risk. I take no repsonsiblity for
any damage caused and make no claims as to the functionality of the
program.

Please dont be frightened by the above sentence. It it just to cover
me in case anything should go wrong. WACKER does crash occasionaly,
but it has NEVER done any serious damage to any of the machines it
has been tested on.


Regards

Keith Wilkins


I can be contacted via email at the addresses below:

spike@nectech-uk.com OR spike@nectech.demon.co.uk

---------------------------------------------------------------------

Thanks to:

Lee Witek -         For pre-alpha testing an lots of handy ideas about the
                    user interface.
Jean Serge Gagnon - Alpha testing and suggestions for improvement

---------------------------------------------------------------------


Version Control
---------------

Alpha3  24/06/94  * First limited alpha test of basic functionality


Beta2	07/07/94  * Loads of new functionality.
                  * Bug fixed in the gallery that was causing GPF
                    under windows on some systems.
                  * Improved documentation.

Beta3   09/07/94  * Bug fix to cure save BMP error, it seems a line
                    of code got deleted between Alpha3 & Beta1/2 that
                    setup in internal pointer in fBMPSave().
                  * Fix of load object bug memory being accidently freed
                    by the gallery display function.
                  * Button regions added for texture & picture galleries
                    but no internal graphics yet.

Beta4   15/07/94  * Button text added
                  * DragNDrop partially implemented
                  * Some minor bugs fixed
                  * Finally squashed the obscure save bitmap bug that
                    was giving real problems on bitmaps where the width
                    wasnt a multiple of 4, bloody windows!!!

---------------------------------------------------------------------


Known bugs
----------

Picture DragNdrop    - Doesn't always register picture drop even when
                       the two windows definately overlap. Problem in
                       the rectangle intersect function.

Slow initialisation  - After doing some speedups its still slow,
                       escpecially after adding sprite & graphics
                       support. Pallette setting takes a rather long
                       time and I cant figure why ??

Occasional NULL      - I squash these whenever I encounter one but
pointer error          I'm sure there must still be some somewhere.

---------------------------------------------------------------------

Future Additions/Features
-------------------------

High Priority
*************
Ability to build PNAME, TEXTURE1 & TEXTURE2
Drag an drop on texture build/modify
Use of extended memory to store loaded objects


Low Priority
************
GIF Load/Save
LIG <handle> <patch> <filename>  - Load an image patch from a GIF file
SIG <patch> <filename>           - Save a image patch from a GIF file




---------------------------------------------------------------------



Getting Started
***************

Place all the files in the directory containing DooM.WAD. Type WACKER
to run the program. The screen goes black for about 3-5 seconds at
the start before the loading meassage appears. It takes about 20-30
seconds to initilise depending on the machine (sorry, but there is a
mass of data to load & check for consistency).

WACKER will only run in 640x480x256 SVGA mode. If you don't have SVGA
then use a VESA emulator such as UNIVESA.

It has been tested without problems on the following configs:

Clone 486DX2-66 16MB RAM Diamond VIPER VLB grapics card
Clone 486-DX40 16MB RAM GENOA VLB card with Cirrus chipset
NEC Versa-50 laptop 4MB RAM

WACKER works under windows (if you must). I have been told that it now
works O.K under OS/2. The only problem I've come across under windows
is on the Diamond VIPER machine, using crtl-esc to task switch will
completely lock the machine. On the versa the screen corrupts on return
to wacker but it still functions O.K. The moral of this story is dont
bother with windows.

The more free memory the better.

WACKER is written in C using Microsoft Visual C (prof) and is
compiled using the huge memory model, after the major work is
done I plan to port it to a 32bit flat model program using DJPP. 


BATCH FILES
***********

WACKER now supports external batch files and an argument to speedup
that initialisation process. The batch files must be ordinary
text files with 1 command+args per line. To run a batch file type:

    WACKER [filename]

Its not too pretty at the moment but what the hell, it works, or at
least I think it does !!


To stop WACKER building the galleries then start WACKER with the

 -NOGALLERIES option
 
and it will start up faster but you wont have any pretty pictures to
look at.



WACKER MANUAL
*************

The main wacker screen will apprear after intialistation.


               ------------     --------------
              |            |   |             |
              |            |   |             |
              |  TEXTURE   |   |   PICTURE   |
              |  WINDOW    |   |    WINDOW   |
              |            |   |             |
              |            |   |             |
              |            |   |             | 
              |            |   |             |                  
               ------------     -------------
                         
               ------------------------------                 
              |                              |                
              | COMMAND WINDOW               |                
              |                              |                
               ------------------------------                  

Click the mouse within a window to activate it, or use the keyboard:

C = Command Window
T = Texture Gallery
P = Picture Gallery

When you wish to exit WACKER press ALT_X or type BYE in the command
window.


How WADS are handled
--------------------

You can load many different PWADS into WACKER, each PWAD youu load
must be given a HANDLE which can be upto 8 characters in length. All
PWADs are held separately an do not patch each other. The exception
to this is the texture and picture resources, if a PWAD contains new
pictures or textures these will replace textures in the main picture &
texture galleries.

A picture is defined as any object within a WAD file that is in the
doom picture format. These can be PATCHES, SPRITES or GRAPHICS, where
GRAPHICS refers doom the DOOM help screens & player faces, status bar
etc. Pictures can be detected in a PWAD but they must be in the following
formats OR have a name identical to a gallery patch/sprite/graphic:

PATCHES     Enclosed between P_START & P_END entries
SPRITES     Enclosed between S_START & S_END entries
GRAPHICS    New objects are not allowed but any name conforming to the
            naming conventions of the main DOOM.WAD will be picked up
            and loaded as a graphic

Any operation involving a PWAD or IWAD requires the use of the handle
to identify which wad you wish to operate upon. The main DOOM IWAD
file is always called "DOOM" and the handles "PATCHES", "TEXTURES",
"SPRITES" and "FLOORS" are all reserved, do not attempt to load a new
PWAD with these handle names otherwise you will not be able to access
the loaded PWAD.

EXAMPLE - Load a level, add modify a patch and save the new PWAD

LDW E1M1 d:\games\doom\mylevel\e1m1.wad
LPB E1M1 DOOR2_9 d:\games\doom\mylevel\newdoor.bmp
SDW E1M1 d:\games\doom\mylevel\newgrp.wad

After the LWB command is executed the new DOOR2_9 patch will appear
in the patch window.


EXAMPLE - Load a level and copy graphics & level from another PWAD

LDW TESTLEV mylevel.wad
LDW DONOR donorlvl.wad
COPY AG128_1 TESTLEV
COPY DONOR E1M1 TESTLEV
COPY DONOR BCRATEM1 TESTLEV DOOR2_4
SDW E1M1 newlevel.wad



---------------------------------------------------------------------


Picture Gallery
---------------

The picture gallery holds three picture lists: PATCHES, SPRITES & GRAPHICS
the same command set applies to all picture lists. i.e You can use any
graphic for inclusion in a texture. The following keys will swap
between lists at any time:

F5  - Patch list
F6  - Sprite list
F7  - Graphics list

Once in a particular list the following commands apply:

I                  - Give information about the displayed picture
F                  - Find a picture name       /* Not Implemented */
HOME               - Display last picture in the selected gallery
END                - Display first picture in the selected gallery
PAGE UP            - Jump down the selected picture list
PAGE DOWN          - Jump up the selected picture list
UP/LEFT CURSOR     - Move to the next picture in the selected list
DOWN/RIGHT CURSOR  - Move to the next picture in the selected list

All of the above functions are accessable via the mouse interface, by
clicking on the buttons under the mouse window. To dismiss the info
window press any mouse button.

/* Patch Gallery Beta Notes */

The drag'N'drop interface is only partially implemented in this beta,
i.e This is a far as I've got at the moment,and this Is a Beta.

You can pick up patches/sprites & graphics in this version and drop
them onto the texture window. The will then be saved onto the texture
and remembered. Once you've picked up a patch/etc then the cursor
keys will allow you to finely position the data before releasing the
mouse button.

Unfortunatly you cant save out your new textures, yet.... 8(

Give me a week and it'll be there.



Texture Gallery
-------------

I                  - Give information about the displayed texture
                     While in this mode LEFT,RIGHT ARROW move UP/DOWN the
                     list of patch descriptors that make the texture. Pressing
                     the return key will cause the Patch Gallery to display
                     the patch for that descriptor. Press ESC to exit.
                     For mouse based operation:
                     Left button   = Previous patch entry
                     Right button  = Next patch entry
                     Centre button = Display patch in patch gallery
                     Left+Right    = Close window


S                  - Step throught the drawing of a patch, each time you press
                     the 's' key then next patch.

F                  - Find a patch name  /* Not implemented in this vesion */
HOME               - Display last patch
END                - Display first patch
PAGE UP            - Jump down the patch list
PAGE DOWN          - Jump up the patch list
UP/LEFT CURSOR     - Move to the next patch in the alphabetical list
DOWN/RIGHT CURSOR  - Move to the next patch in the alphabetical list

Again as with the picture gallery all the above functions are available via
the button bar.


---------------------------------------------------------------------


Command Window
--------------

This window is the command line interface to wacker, the following
commands are currently supported:

BATCH    - Redirect command window input from batch file
COPY     - Copy object from pwad->pwad
DEL      - Delete objects
DISP     - Force patch/texture window to display object
FILE     - Enable/Disable command line logging to a file 
HELP     - Display command list
LDW      - Load a PWAD/IWAD into memory
LIST     - List details of pwad/patch/texture
LOB      - Load/patch a WAD object from windows BMP file
LOR      - Load/patch a WAD object from RAW format file
LPB      - Load a picture from a windows BMP file
LPR      - Load a picture from a raw binary file
MOVE     - Move an object within a WAD
MCOPY    - Multiple copy from WAD to WAD or gallery
SDW      - Save a PWAD/IWAD to disk
SOB      - Save a picture format object to a windows BMP file
SOR      - Save an WAD object to a raw binary file
SPB      - Save a picture to a windows BMP file
SPR      - Save a picture to a raw binary file

Many of the commands use an argument called PICTURE this agument can be
any loaded patch,sprite or graphic object from

Some command do take a while to exectue, be patient. It does take time to
copy all of the patches from the gallery to a WAD. The longest wait is
if you copy then entire patch/sprite list to a WAD then delete the WAD as
WACKER must rebuild the patch list from the original wad.


Command Detail
--------------


BATCH <filename> [STEP]

Take command line input from the given filename, the file should be
a text file with identical format to that of the keyboard command
line. The FILE command can be used to generate batch files that may
then be edited and used. If the optional STEP parameter is given
then the user will be promped to run each command line and given
then option of exiting batch mode.

---------------------------------------------------------------------

COPY [handle] <obj> <handle|PATCHES|SPRITES> [obj]

Copy is used to copy individual objects between WAD files or within
a WAD file. If the final agument is ommited then the object is
copied with the same name.
Additionally copy may be used to copy ANY graphic object into
the picture gallery. This is done using the Pseduo handles 'PATCHES',
or SPRITES for example:
       
       COPY <handle> <object> PATCHES [object]

Any picture object that is copied in the picture gallery can then
be used within a texture. Yes this does mean you can put the DooM
logo in a texture or a Spider demon.

Copy can also be used to copy any picture object to a WAD, this can be
done by omitting the handle, then 1st argument must the the name of a
picture in one of the galleries. i.e

       COPY AG128_1 MYWAD
       
Will copy the AG128_1 patch into a WAD called MYWAD which must already
exist. The 1st argument can be PATCH|SPRITE|GRAPHIC. The pseudo handles
may still be used for this type of copy to clone a patch.

---------------------------------------------------------------------

DEL <handle|picture|texture> [object|ExMx|patch|floor|sprites|FORCE] [obj]

This command can be used to delete almost any loaded object or group
of objects.

        DEL <handle>                  - Delete handle & contents
        DEL <handle> <ExMx>           - Deletes ExMx level from handle
        DEL <handle> <ExMx> <object>  - Delete object of level
        DEL <handle> <object>         - Delete object of handle
        DEL <object>                  - Delete a patch|texture

If no handle is given then the object MUST be a patch or a texture.
The patch or texture will be deleted from the texture list but NOT
from the PWAD it was loaded into. If you wish to delete patch AND
wad entry then used DEL <handle> <object>. When a patch is deleted
WACKER will search ALL other loaded PWADS for a replacement and use
that to replace the deleted patch, if no replacement is found then
that patch is erased from all texture entries, if any particular
texture has no patches left in its description then it will also be
deleted. When only the <handle> is used then either the entire PWAD
is erased. The PATCHES, SPRITES, GRAPHICS and TEXTURES pseudo handles
can be used in the delete, remember that deleting any picture may also
delete textures by association. If you delete the entire patch list
you WILL lose all of the patches. BUT if you load a PWAD with its own
patches and you then delete all of the doom patches you will just be
left with the textures that can be built from the new PWAD.

When you attempt to delete a single object from a picture gallery
WACKER will attempt to find a replacement for that picture with the
same name from a different WAD that is loaded into memory. For example
if you patch AG128_1 from a PWAD and then type DEL AG128_1 the original
DOOM AG128_1 will be put back into the gallery, type DEL AG128_1 again
and the new AG128_1 will re-appear. If you wish to delete a picture
without the auto-replace feature then do DEL AG128_1 FORCE and WACKER
will not attempt to find a replacement. The FORCE agrument is only valid
for PICTURE deletions. An alternate way is to delete the picture from
the WAD rather than the gallery as the galleries hold separate lists
from the WADS.

For example:

                DEL PATCHES          - Delete ALL patches from the patch
		                       gallery. But not from wads
                DEL TEXUTRES         - Delete ALL textures from the texture
		                       gallery.
                DEL WIBBLE           - Deletes a loaded WAD called WIBBLE

                DEL WIBBLE PATCHES   - Deletes all patch entries from WIBBLE
		                       that lie between P_START & P_END.
		                          
                DEL WIBBLE FLOORS    - Deletes all floor entries from WIBBLE
		                       that lie between F_START & F_END.

                DEL WIBBLE SPRITES   - Deletes all sprite entries from WIBBLE
		                       that lie between S_START & S_END.
		                          
                DEL WIBBLE E1M1      - Delete level E1M1 from wibble
                DEL WIBBLE ENDOOM    - Delete the ENDOOM object from WIBBLE
                DEL AASTINKY         - Delete the AASTINKY texture from the
		                       texture gallery.
                DEL AG128_1 [FORCE]  - Delete the AG128_1 patch from the
		                       patch gallery.

---------------------------------------------------------------------

DISP <picture|texture|P|T> [picture|texture]

This command will force the picture or texture galleries to display a
particular image. If a partial name is given then DISP will match
it against the gallery contents. The P & T operators force disp to
only match P-Pictures or T-textures

        DISP T STAR  - Would display the 1st STARTAN texture
        DISP A       - Texture and Patch windows display 1st entry
                       begining with 'A'
        DISP AG128_1 - Display the AG128_1 patch

---------------------------------------------------------------------

FILE <filename|OFF|CLOSE>

Enable/Disable command line logging to a text file. This command
is handy for saving repetative functions and using the BATCH
command to automate things. If a filename is given then the file
is opened, if a file is already opened then the old file is closed.
If you wish to stop logging then use FILE CLOSE.
                          
---------------------------------------------------------------------

HELP

This will display a list of commands available within the command
window.

---------------------------------------------------------------------

LDW <handle> <filename>

Load a WAD into memory, the WAD can be an IWAD or a PWAD. A handle
name must be given. Do not choose a handle that is the same as a
patch or texture name or this may cause some commands to function
strangely.

The following handle names are reserved, do not used them:

DOOM,PATCHES,TEXTURES,SPRITES,FLOORS

You have been warned, WACKER will not stop you but you may find
that a lot of commands will fail to operate with these names.

---------------------------------------------------------------------

LIST <handle|picture|texture|PATCHES|SPRITES|GRAPHICS|TEXTURES>
     [start ojbect] [filename]

Dump information to screen or file about an object. This command
has several modes of operation. If you wish to direct the
output to a file then give a filename at the end. If wacker is
unsure if the agrument is a start object or a file it will ask.

If a handle is given then the directory of the WAD is printed
to the screen/file. If a 2nd argument is given then wacker will
attempt to use this as a search key, and will start listing the
WAD from the 1st match of the search key. This is handy for listing
large WADs, for example:

    LIST DOOM P_START    - List patches within doom (no Xref)
	
It would be better to use the following to list the patches as
it will also generate a cross-reference to the used textures.

    LIST PATCHES

Similarly LIST TEXTURES will display alll loaded texures and a
cross reference to the patches contained in each texture.

If just the name of a picture or texture is given then information is
displayed about that object. For patches the command will also
display a list of textures that the picture is used in. For textures
it will display the list of pictures for that texture.

---------------------------------------------------------------------

LOB <handle> <object> [object] <filename>

Load an DooM picture format object from a windows BMP format file.
The object name can be an existing or new object. If the object
exists then it is modified otherwise it will be created. If the
second object argument is given then and a new object is created
then it will be placed after the object. This is handy for loading
new sprites into an IWAD between the S_START/END markers. If no
second argument is given the object is tagged onto the end of
the WAD.

You can use this to replace sprites/misc graphics/patches.

(See notes about importing external bitmaps)

---------------------------------------------------------------------

LOR <handle> <object> [object] <filename>

Load an DooM picture format object from a Raw binary format file.
The object name can be an existing or new object. If the object
exists then it is modified otherwise it will be created. If the
second object argument is given then and a new object is created
then it will be placed after the object. This is handy for loading
new sprites into an IWAD between the S_START/END markers. If no
second argument is given the object is tagged onto the end of
the WAD.

You can use this to replace anything.

---------------------------------------------------------------------

LPB <handle> <patch> <filename> [PATCH|SPRITE]

Load a new picture into a WAD file from a windows BMP format
file. If the object exists then it replaces the object otherwise
a NEW picture will be created. Existing pictures will be replaced
in the relevant list but any new object will always be created in
the patch list unless the optional PATCH|SPRITE] argument is used
to explicitly specify the list to load the new object into.

(See notes about importing external bitmaps)

---------------------------------------------------------------------

LPR <handle> <patch> <filename> [PATCH|SPRITE]

Load a new picture into a WAD file from a raw binary format
file. If the object exists then it replaces the object otherwise
a NEW patch will be created by default unless the optional PATCH|
SPRITE] argument is used to explicitly specify the list to load
the new object into.

---------------------------------------------------------------------

MCOPY <handle|PATCHES|SPRITES> [start_obj] [end_obj]
                                              <handle|PATCHES|SPRITES>

Copy is used to copy multiple objects between WAD files or between
a WAD and a gallery. If the copy is WAD->WAD then all ojbects from
and including <start_obj> to <end_obj> are copied. If the destination
is a gallery then only non-zero picture format objects will be copied.

You can use this to copy all of the active patches to a WAD for saving,
when copied in this way the patches will be placed between the relevant
START/END markers, these will be created in the WAD if they dont exist.

If the start and end objects are omitted then the entire WAD is copied
across to the destination handle.
       
---------------------------------------------------------------------

MOVE <handle> <entry> <dest_entry>

This will move an object within a WAD file, you can use it to
reposition objects. It will move the entry to be after dest_entry
in the directory list. 

---------------------------------------------------------------------

SDW <handle> <filename> [PWAD|IWAD]

Save a memory resident WAD file to either a PWAD or an IWAD, if the
IWAD/PWAD argument is missing the file is saved as a PWAD by default.
 
DO NOT save you pwad to any file name that is already open/loaded.
When WACKER loads a PWAD with LDW it leaves the file handles
open to make access faster. The last time I tried it it junked
loaded file.

---------------------------------------------------------------------

SOB <handle> <object> <filename>

This command will attempt to save the given object as a windows BMP
format file. The object name given must be a DOOM picture format
object. WACKER attempts to verify the object by checking the header
of the object as if it were a picture and verifying that the header
parameters are within some set limits.

---------------------------------------------------------------------

SOR <handle> <object> <filename>

Save an object from within a WAD to a binary file in raw binary
format file.

---------------------------------------------------------------------

SPB <picture> <filename>

Save a entry from the picture gallery to a windows format BMP file,
the handle is not needed as this is provided by the association
of picture gallery.

---------------------------------------------------------------------

SPR <picture> <filename>

Save a entry from the picture gallery to a raw binary file,
the handle is not needed as this is provided by the association
of picture list.

---------------------------------------------------------------------

Notes about importation of external bitmaps in GIF/BMP files:

    The 2nd object parameter can be used to force WACKER to store a
    resource a particular point in the PWAD i.e within S_START/END.
    If the operation replaces an object then this parameter is ignored 

    When WACKER imports a graphic file it will convert the palette of
    your file to an equivalent colour on the doom palette. It is not
    always possible for WACKER to exectly match the colours, it will
    do the best job it can and find the closest match. If you wish to
    have transparent colours in your patches then use the following
    colour value:

        Red=0 Green=255 Blue=255

    Once imported into wacker the cyan transparent regions will vanish
    and be converted to transparent areas. I have found that corel
    draw seems to do some gamma correction on images and so everything
    comes out a little darker.

---------------------------------------------------------------------
The END