
                      ######  ######  #####   ######
                          ##  ##  ##  ##  ##  ##
                          ##  ##  ##  #####   ####
                      ##  ##  ##  ##  ##  ##  ##
                       ####   ######  #####   ######
              
                          John's Object Editor


                              Version 1.4

                           14. December 1995




Introduction
------------
JOBE is a project I started a long time ago when I was about to start
coding a game. I wanted to get better known with the Pascal language
and started making this editor. The whole thing is coded in Borland
Pascal 7.0. Much of the code is really rather slow because no special
optimizations have been done to it. It soon became a well used utility
in my projects and I decided, why not share this with others? I hope
you too will like this program. Please send a message stating further
enhancements you would like to see in future versions.

The program is in short terms a sprite making utility which enables
you to make collections of freely sized sprites for games and
utilities. Maximum size for the moment is 64x64. The sprites can
be exported in a raw format to avoid all unnecessary headers and
such. Registered users also get a program to convert them to a run
lenght encoding (RLE) format which is really fast for transparent sprites.
The program can of course also be used to make your own font sets.



Disclaimer
----------
The author is under no circumstance liable for any damage caused by
use or misuse of this program.  This also includes loss of work or
profit because of a program fault. Use it at your own risk.



Copyright
---------
This program can be spread freely. No fee higher than the cost
of reproduction and sending is allowed to be charged by a third
party who wants to spread the program.
The author preserve all rights of this program, it's source and
future versions. This goes for all the additional programs that
come with this program and registered versions.



GAMEWARE
--------
If you like this program and would like to send your gratifications
then please consider this: Send any IBM compatible game you have
lying around collecting dust. Send only originals, no copies are
accepted. I collect old as well as new titles for the PC and would
like to see my collection expand even further. If you have options
please contact me so I can decide which I would like to have.

If you would like to send a donation, a $20 or 150 NOK fee will
do just fine. Payment hazzle is often the reason why people don`t bother
registering a product. The bank usually takes half of the money in
paperwork fees. Any IBM compatible game is preferred. Remember to
mark the package as a gift (and with no higher value than $70) so
I don`t have to pay customs on every package I get. Thanks!

You are welcome to use this program for commercial purposes. If you
decide to do so, please send me a copy of the full release program.
That would really, really make me happy.. :) I hope to be able to
release a commercial game in the future, and this program will
certainly be used during the creation...

If you register you will be automatically be notified of further
enhancements of this program or others that I have made.
Registered users will also receive an additional JOB2RLE
encoder with the appropriate decoder source in assembly. The
runlenght encoding is really fast and can be used in realtime
for showing transparent sprites. The sprites takes less space and the
drawing is much faster. It is also sprite size independent so you can
use different sized sprites drawn with the same routine. Excellent
for games!

No X-Mode support is implemented yet for the program and the sprite format.
I addition you will get an BMP2JOB and BMP2RAW converter. This way you
can draw those sprites in another drawing program and use the converter
to make JOB or RAW files. If you have an Internet adress please
send me that so I can give you the registered version by email.

Send your donation to the following adress:

School:
    John Christian Lonningdal     <- I will stay at this adress
    PB 1841, Mek                     out December 1995 so use the
    N-6401 MOLDE                     below adress if you send it
    NORWAY                           later...

Home dear home:
    John Christian Lonningdal
    Lerumsvei 56                 Email: John.C.Lonningdal@hiMolde.no
    N-5073 SKAALEVIKNESET                 (valid out December 95)
    NORWAY

Please report any bugs you come across when using this program.
But remember I am not liable for any loss caused by these bugs.



What has this editor that others don`t?
---------------------------------------
Well, of the ones I have tried out there they all miss one important
feature: A usable interface. I wanted the program to have nearly every
feature as a button somewhere, like a drawing program. As this is an
editor for smaller graphical objects I haven`t really put that many
functions in it. I believe much of the real game graphics need careful
drawing on a pixel level to look any good. I soon realized that one
function would be nice to add: A smoothing option. No real magic here,
just a plain smoothing function with a treshold lever to adjust the
effect of nearby pixels. An UNDO function is also added for safer
drawing. Drawing with random selection of palette in a given range
is also a very nice feature to add texture to your drawings.


Save your work often!
---------------------
I have to emphasize that you save your work as often as you can.
A lot of the routines (esp. LOADING) have little or none error
checking at the moment. The program might crash and you could loose
your work. I will try to add more error checking in future versions.
Sorry, but now you are warned.


Graphic card problems
---------------------

I'm sorry to say that JOBE is not compatible with that many video
cards. For the moment I'm using a standard SVGA BGI driver along
with an option to use a S3 driver. Unfortunately the S3 driver
does not work all that good on newer S3 cards. Currently I know
JOBE works fine on Cirrus Logic cards and ET4000 based cards. I'm
adding VESA support as the next upgrade. Expect version 1.5 with
VESA support over christmas...


Functions
---------
The functions are rather self explanatory as each of the buttons have
a name tagged on it. But anyway, here they are....


The ARROWS in the top left corner is used to go back and forth between
the objects. RIGHT CLICK on these arrows to jump 10 objects at a time.
Click on the number between the arrows to enter any
number you want to jump directly to. If you go far to the right
end of your object list, you will get a message asking you wheter
you want to create a NEW object. INSERT and DELETE functions
are also quite easy to understand:

DELETE : Will remove the current object from the list and move you
         to the previous object. A RIGHT CLICK on this button will
         let you delete all objects (NB! This can't be undone).

INSERT : Will push the current object one step forward and a new
         empty one will be inserted as the current object.


The four functions below are the editing options you can use
to draw on the middle window.

PIX    : Draw single pixels with the current pen selection.

LINE   : Simple line drawing. Click on start point - hold the mouse
         button down - release it at the end point.

FILL   : A flood fill option. Fills with current pen selection below

BAR    : Filled rectangle function. Uses current pen selection below


You can choose 4 different ways of how the pen should behave.

NORMAL : The current color marked with a sqare on the palette
         is used to draw/fill with.

TRANSP : Draw/fill with transparet colors. The current drawing color is
         drawn with the current transparency level.

RANDOM : This function chooses a random color between your foreground
         and background selections. By using smooth transition palettes
         you can use this to draw a noise texture with different
         intensities of the same color. Now you don`t have to change
         colors everytime you want to select a similar color.

BLUR   : A blur function to be able to blur our jagged edges.
         Can also effectively be used on large areas (fill/bar)
         to make smooth transitions to the background. The current
         blur percentage is used. The current color selections will
         not affect this function.

The leftmost slider (tagged BL) is for adjusting the weight percentage
of the pixel you draw on and its eight immediate neighbours. In effect
you will get a blur function. The percentage is the amount the center
pixel counts.

The rightmost slider (TR) is then for adjusting the transparency level.
This is the percentage the current drawing color will influence on the
drawing background.

Note that the RIGHT mouse button always only draws single pixels with
the current background color no matter what drawing function is active.
I found this reasonable as it allows for easier sketching and
correction of sprites.

---

GETCOLOR: Sample a color on the screen (Syringe). Just click the LEFT button
          to read a new paint color. Click the RIGHT button to read
          a new backgroud color. You can click anywhere on the desktop.

---

ZOOM IN : Enlarges the size of the boxes on the draw area. When
          changing to a new object the size might be changed if
          the zoom value is too big to fit the draw area.

ZOOM OUT: Reduces the size of the boxes.

MAX/MIN : Maximum/Minimum Zoom function. Minimum is 2x2 size.
          By looking at the minimum size you will get an impression
          of how your sprite would look in 320x240 resolution.

GRID    : Turn on and off a pixel grid on the drawing area.

RESIZE  : You can resize the window at any moment. Your old drawing
          will be cut from the right and bottom, so shift the part
          you want to keep up to the top left corner. There is no
          problem in having different sized objects in one JOB
          collection. For the moment only even numbered sizes can
          be used. If you customize your sprite to 33x25 the size
          34x26 will be used. A resize can not be undone.

LOAD PAL: Load a 256 color palette file. This is the simple 256*3
          byte sized palette file. I have throwed in a simple
          palette editing tool along with this program that makes
          these files. At the moment it can read SVP, BMP and LBM files.

EDIT PAL: Edit the current palette. Here you can change the R,G,B
          values of every color and use functions like COPY,SWAP
          and SPREAD. You can also LOAD and SAVE in the palette
          editor. Remember that the palette file is NOT saved with
          the JOB file so please remember to do this in the palette
          editor if you want to keep the palette. Palette changes
          can not be undone at the moment.

LOAD    : Loads a JOB file. The objects you have in memory will be lost.

SAVE    : Save a collection of objects into a JOB file. If the
          RAW button is down, a raw version of the objects will
          also be saved in a separate RAW file. See below for
          descriptions of both file formats.

RAW
 IMPORT : Import a RAW file containing one or more objects. This
          function can import other file formats as long as you know
          the format they are in. Answer the questions about the
          format after you have selected the file you want to import.
          
RAW     : Switch this option on to save a RAW version of the file
          along with the JOB file.

UNDO    : Wow.. an undo function. Great to have if you did something
          wrong in the last mouse click/sweep.

CUT BMP : With this you can load a 256 color BMP file and copy whatever
          part of it you want. The copybox will have the same size as
          the object you are editing. If you LEFT CLICK on this button
          the current palette will be used. The picture might look horrible
          if another palette is used in the BMP file. If you RIGHT CLICK
          on this button, the picture will be adapted to the current palette.
          Also the BMP file must be 640x480 or lower. NB: There is very
          little error checking in this routine so be careful,
          save your work before using this option! If you use the same
          palette as in the BMP file and you want to use the same color
          indexing use LEFT CLICK on this button. Otherwise it might adapt
          to an equal color found first in the palette which probably will
          mess up your plans on using that index for e.g. palette rotating.

COPY    : Copy the object into the copybuffer.

PASTE   : Paste the copybuffer to the object.
          You can paste different sized objects onto eachother.
          The object will be clipped if it is too big.

PASTE
   TRSP : Paste the copybuffer to the object using the current background
          color as the transparet color from the source (copybuffer).
          Great for drawing sprites individually before adding them
          together to form new ones.

CLEAR   : Clears the whole object with the current background color.

QUIT    : Quite obvious isn't it? :)

FREE
 ROTATE : Rotate the object freely at a given angle. Pixels in the
          outer corners of the object will rotate out of the object and
          be lost. Rotating objects between 0 and 90 degrees might look
          bad as no anti-aliasing is applied at this moment. You almost
          always have to fix up on the object afterwards.

+90,-90 : Is for rotating the image +/- 90 degees.

The ARROWS on the right side of the screen are for scrolling the
object within the edit area. The current background color will be
rolled in on the other side. Pressing your RIGHT mouse button on
these arrows will flip the object horizontally or vertically.

The box above the arrows is a scratchpad for trying out the
objects amongst eachother. If you press the RIGHT mouse button the
whole area will be filled with the current object.

You can select the current editing color by pressing the LEFT
mouse button on the palette. A small box should indicate which
color you have selected. By pressing the RIGHT mouse button you
can select the RIGHT buttons editing colour. This is also used
as the background color showing up when scrolling or clearing an
object completely. It is also the color used to determine which
pixels that are to be transparent when using the PASTE TRSP function.
The background and foreground color is always shown as two boxes in
the top right corner of the status bar.

The memory text on the top indicates the available memory you have.

When the mouse is on the drawing area your drawing coordinate is shown
on the status bar.


Keyboard
--------
Some functions have their respective keyboard buttons as well.
There are some functions hidden with no graphical button and is
activated by keyboard commands only.

 + -  : Walk up and down on the palette. Great if you have smooth
        palettes and don't want to move your mouse up and down between
        the palette and the editing window. That's why there is no
        graphical button for this function.

 < >  : Just like the arrows in the top left corner. < = Left, > = Right

 PgUp : Zoom In.
 PgDn : Zoom Out.

 Del  : Delete an object in the list.
 Ins  : Insert an object in the list.

  G   : Turn GRID on and off.

  R   : Turn RAW-save option on and off.

 Esc  : Quit the program.

  C   : Copy current object.

  P   : Paste copybuffer to current object.

  T   : Paste copybuffer with transparent function.

  U   : Undo last action.

  L   : Load JOB file.

  S   : Save JOB file.

  F   : Free rotation of object to any angle.

Space : Sample a color. LEFT click = new draw color. RIGHT = new back color.


JOB file format
---------------
The fileformat is really simple and based on the BP 7.0 GetImage
command. The first word is the Width of the object + 1. The second
word is the Height of the object + 1. After that ((Width+1)*(Height+1)
of byte data describes the raw image. At the end of each object there
is an extra reserved word (not really needed, maybe I will remove this
in the next version). The next object then follows with the same
structure.

Two JOB files can be appended on each other manually with no problems.
The editor will still manage to read the file. For example in 4DOS
(and Win95) you can write "COPY HERO.JOB TILES.JOB COLLECT.JOB" to
append both files together.

The RAW file format that the editor saves if you have the RAW button
active is simple too. It's 100% raw chunky data in a long stream.
The user will have to know for himself the width and height of the
objects in the RAW file when he uses them in his programs.

When you save, a JOB file version will always be saved. This is because
you can`t read RAW files except by importing them. Remember the JOB
format can contain freely sized objects in one and same file.



Afterword
---------
The program searches for a DEFAULT.SVP to use as the start up
palette. If no such file is found a palette will be created in
the editor. You can therefore use whatever palette you want as
the default when starting the program. Copy one of your palettes
to the filename DEFAULT.SVP. The interface tries to adapt to the
current palette and there should therefore at least be one bright,
one medium and one dark color in the palette. (Usually this is
always found).

Remember that you are drawing in 640x480 resolution so if you
are using the sprites on 320x200 screen the aspect ratio will be all
wrong. Draw the sprites a bit lower in height to fix this. Also
the gamma might not be 100% equal to that of 320x200. Adjust your
monitor a bit brighter to get a more precise look on how the
object will be if you want to use them in 320x200. I will try to
add gamma correction to the program later.

The smallest zoom value is 2x which means you can see how the
sprite looks in a 320x240 resolution.

If you want to save space then draw the sprites with light coming
from above and not the sides. By adjusting your drawing routine
so that you can output them from both sides you get to use the
same sprite facing both ways. The result will be much more pleasing.

When drawing i.e. a person try to make the parts of him which
are furthest away darker. If he is facing left then draw his
right leg a bit darker than the left.

If you want your sprites to look cartoonish then consider drawing
the outlines in black. Use another color than index 0 which usually
is used as a transperent index color. A typical trick that is
used in cartoons is to weigh down bottom lines by drawing them
thicker. It works in cartoons, why not on computers?



History
-------
The program was really started sometime in 1992 but got enhanced
quite a lot in the early months of 1995. The history will however
start with the first GAMEWARE version availiable.

1.0 : First John created the JOBE....eh..well..?     (23. May 1995)

1.1 : Oops.. some bugs rose to the surface...        (24. May 1995)
      Should have done some serious monkey testing before releasing. :(
      - Fixed ZOOM bug (zoomed out too much)
      - Fixed Resize bug. (BP 7.0 bug actually).
      - Removed debug info that popped onto the screen.
      - The RAW button had no effect (always saved as raw).
      - The flood fill didn`t get too far on big objects.
      - Added copy/paste to different sized objects.

1.2 : General bugfixing + some additions             (13. Sept. 1995)
      - Fixed dreadful Insert BUG (when inserting at start of list).
      - Added Zoom Max/Min.
      - Modified/added undo functionality.
      - Added Paste Transparent function.


1.3 : Bugfixes and upgrades                          (11. Nov. 1995)
      - Found and removed some undo bugs
      - It now free`s up memory correctly
      - Added rotate function
      - Added getcolor function
      - Added delete all function
      - BMP and LBM palette load
      - Fixed bug in cut BMP (small BMPs)
      - Added adaptive palette in cut BMP (right clicking on Cut BMP)
      - Added screen coordinates
      - Added transparency draw function
      - Added random draw function


1.4 : Bugfixes (again) and upgrades
      - Added BGI driver selection (two drivers)
      - Added Raw Import function
      - Fixed up and added functions to palette editor
      - Added palette editor to program
      - Added drives to file selector + general fixup
      - Enhanced the GUI a bit
      - Fixed up drawing interface to combine different tools
      - Added bar (filled rectangle) function
      - Removed average and replaced it by a blur function


Future upgrades
---------------
I have a few thoughts about future versions of this program.
Although it was first intended for personal use I have now come
to spread it for public use. If I receive enough requests, I will
almost certainly follow up on improvements and bug fixes. So please
give me some hints on what you want to have in future versions.
Remember though that this program is not meant to replace any
hot shot commercial drawing package, but merely function as an easy
DOS utility for making sprites for games and utilities. Please let
me know which of the functions below you want to see first...


- VESA support! Sorry for the compatability problems...
- Support odd numbered width and height.
- Add more error checking.....
- Antialiasing on rotate
- Palette stencil (only draw on certain colors)
- Palette selection stencil (only use certain colors when drawing)
- Similar color selection for random draw (with treshold)
- Choice between crop or resample on sprite resize.
- Import more file formats (PCX, TGA, etc.).
- Multiload objects off BMP (PCX, TGA, etc.) - enhanced RAW import
- Load more palettes off other file formats (PCX, GIF etc.)
- Incremental/decremental resizing of object area.
- Auto resize to fit a smaller image.
- Adjust average function to smooth around object (not black on edges)
- Export/Import RLE-compiled files
- General speedup

