=============================================================================
                                 JLib
                                Changes

      Copyright (C) 1996  Jonathan Paul Griffiths.  All rights reserved.

  This file documents changes worth mentioning made from version to version. 
         The most recent changes made are at the top of the document.
=============================================================================


Changes since 1.6
-----------------
* - X now has keyboard and mouse support, and the memory leak in
    screen_blit_buff_to() is fixed thanks to the great work of Henrik Schmidt.
* - Added joystick code for linux X11 & svgalib thanks to Arturo Espinosa.
* - Added joystick code for djgpp 13h and grx20, and both watcom targets,
    Thanks to Lennart Steinke.
  - Added debug code to djgpp/grx2 target code - others coming.
  - Both djgpp targets now have a faster block_set_pal() and share the code.
  - gcc makefiles strip the executables by default now.
  - Keyboard code now handles extended key buffering properly.
  - Added screen_set_app_title() which is used in error code to hide JLib's
    presence, and to title windows in windowed o/s's.
  - Started work on a native windows target using MS VC++.
  - Watcom/djgpp/linux now share almost all kb code.
  - fixed a bug with mouse cursor clipping in linux/svgalib.
  - Added kb_get_next_scan_code() for low level buffered kb input.
  - Added sprites_do_intersect() for intersections between 2 sprite systems.
  - Added buff_stamp/stencil_sprite_buff() to draw a sprite frame using
    the contents of a buffer as the solid part.
  - Garded redefinition problems with jlib types.
  - The basic font is now packed into a bit array, so takes up 8x less space.
* - New memory store functions shared by all targets (FAST!).
* - Buffers now hold a line offset table, used to avoid multiplies. Some
    primitives now use the offset table: hline, vline, box, rect, points,
    line, char/string..
* - Optimised sprites: Reduced inner loop complexity and simplified RLE
    encoding. Clipping should now work in every case (i.e sprite bigger than
    buffer etc) and clipping draws are optimised. Y-only clipping uses RLE
    drawing, X clipping draws are faster. NC functions are now *very* fast.
* - You can now build production versions of JLib which do not perform
    NULL handle checking for each primitve by specifying JLIB_PRODUCTION in
    jtarget.h. (obviously, you shouldn't #define JDEBUG for production builds).
  - Default checking has been stepped up - sprites now check to make sure
    thier frames are valid numbers, other functions perform more vigorous
    checking also.
  - Added a default palette (not set by default), and pal_get_default() to
    return a copy of it.
  - bpoly and btriangle share thier edge array now.
  - Keyboard code now keeps its buffer as USHORTS, and buffers more extended
    keys such as function keys.
  - Some very minor changes to joystick API after actually implementing it.
  - Added sprite_add_rect() to add a bounding rect to a sprite frame, and
    sprite_kill_buffers() to remove sprite buffers, by Jean-Sebastien Monzani.
  - You can now specify JLIB_PARANOID in jconfig.h to turn on extra checking
    of parameters, provided JLIB_DEBUG is defined.
  - Updated documentation to reflect new functions and changes.
  - Garded uclock functions against re-initialisation.
  - Implemented timing for palette fading operations.

Changes since 1.5
-----------------

New Features:                                              
* - Signal handling for cleanup on targets that support it.
* - If debugging is turned on,  JLib now keeps track of which functions have
    been called in a runtime stack,  vastly reducing debugging output. The
    stack is only dumped when an error occurs,  and is used to determine
    where an error has occurred,  reducing the debugging text needed in the
    final executable. All debug code still compiles out if debugging is not
    enabled. You can also still trace all library calls for part or all of
    your program.
* - Changed screen_load_pal to pal_load and added a default pal_load_fp().
    Also added pal_to_green/red/blue, and screen_fade_to_pal().
  - Added both clipping and non-clipping buffer scaling functions.
  - Added microsecond timing routines, uclock_init() and uclock_read().
  - image_save_pcx() a contribution from Lennart Steinke.
  - Added sprite stamp/stencil_color to draw a sprite frame in a solid color.
  - Added sprite_save and sprite_save_fp to save sprite files.
  - Added ULONG and LONG, 32 bit integer types.

Bug fixes/Spec enchancements:
  - Fixed targets to only use global variable names "__jlib*" and "vesa_*"
  - Fixed re-calling behaviour of screen/kb/mouse functions.
  - Fixed clipping triangle routine to handle all cases.
  - fixed a bug with lines being drawn 1 pixel too short.
  - Fixed a bug with safe integer swapping macro (ironic, huh?).
  - fixed a bug that caused spr-edit to hang under grx 2.0
  - Fixed watcom vesa target mouse pointer being drawn at top of screen.
  - Fixed screen blitting clipping bugs with Watcom 13/vesa,djgpp13,linux
  - Can now read ALT keys, left/right shift and some others.
  - Can now read buffered extended keys with kb_get_next_ext_key();
  - Can now read up to three mouse buttons.

Optimisations:
  - Only one copy of error text for most internal calls to jlib_exit now kept.
  - Partially optimised filled triangle routines.

Documentation:
  - Updated for new functions and debugging.
  - Linux info sheet updated.
  - HTML v1.0 docs finished, available with JLib as a seperate package.
  - Targets.doc is now part of the main documentation.

Demos:
  - Demo 1 now shows the new palette operations available.
  - Boring old demo 9 is now a buffer scaling demo.

Utes:
  - Added a cool palette editor contributed by Lennart Steinke: see
    ute/pal_edit.c for details.
  - Added a converter pal_conv to convert pal_edit file for use with JLib.
  - New joinspr by Arturo Espinosa allows joining multiple files.


Changes since 1.2
-----------------
Documentation:
  - Removed function list as it was way out of date.
* - Word-processed jlib.doc and added all the new information,  contents and
    and index.  End result:  60 something pages of nicely formatted docs :)
  - Documentation has been moved to the jlib/doc directory and is available
    in both .doc (word 7) and .txt (unix ASCII text) format.
  - target.txt/doc updated.
  - Added a quick reference chart refer.txt/doc

New Features:
**- WATCOM Mode 13H target!  Only took me about two weeks of lunchtimes too!
**- WATCOM VESA target! This one took blood,  sweat and tears...
**- New linux svgalib target - replaces mode13h and grx2 targets,   works
    much better too.
  - Added a clipping buff_filled_triangle.
  - Added a clipping buff_convex_poly.
  - Added a clipping buff_stencil_sprite.
  - Added a clipping buff_stamp_sprite.
  - Added automatic memory optimisation to minimise the amount of memory a 
    sprite system uses based on the largest sprite frame loaded/built.
* - Changed header system again - see the documentation for details.
* - Targets can now use default types,debugging code, pallette code to
    minimise development time.
  - New demo (14) -more test code I couldn't biff!
  - Added pal_to_grey() to convert a color palette to greyscale.
  - Added pal_get_closest_rbg() in prep for more palette conversion functions.
* - can now compile debug support in and turn it off/on during runtime.
  - strippal.exe reads .jlb files as well as PCX's now.
  - can now build demos or utes as make targets in unix based makes.
 - Added sprite_load_fp to load sprite files from already open files.

Bug fixes/Spec enchancements:
  - Fixed a duplicate symbol and undefined symbol compile warning from hp-ux.
  - Lots of little changes,  for WATCOM compilation.
  - Fixed a make bug for djgpp makefile. 
  - Fixed a screen blitting problem for most targets.
  - Fixed a bug with the RLE code and signed char representation. 
  - Fixed the demos and popup.c to stop using B_X_SIZE,IMG_WIDTH etc and
    to start using the correct values such as B_MAX_X,  IMG_MAX_X etc..
  - Added kb support for uppercase characters,  Caps Lock and shifted chars to 
    linux and djgpp target.
  - Gave the linux 13h target a real mouse pointer.
  - Version number changed to a single float.
  - Added JOY_CENTRE constant,  (wasn't going to get far without that)
  - Fixed the green sprite in demo5 to rotate properly (it was bugging me)
  - A couple of last minute changes to some kb code,  fingers crossed!!
 - Creating a sprite system with frames but no sprites works now. 

Testing:
  - No problems with either WATCOM target,  I want to hear about any!
     -I am aware of the version # being returned as -nan.
  - Tested svgalib 320x200 & 640x400,  no problems.
  - No problems with generic as yet.
  - No problem with djgpp13h
  - HAVENT TESTED X windows - I expect bugs.

Changes since 1.0
-----------------
Documentation:
  - Improved and added to image docs.
  - Added to buffer docs,  discuss speedups.
  - Heaps of sprite docs added: move/animate,whole vs fixed point etc.
  - Added error stuff to misc docs.
  - Updated docs to reflect int positions rather than USHORTS.
  - Added decription of joystick interface.
  - Documented all the newly added functions.

New Features:
  - Added code to keep track of the number of active sprites - SPR_NUM_ACTIVE
* - Added jlib_exit and set_exit_handler for dealing with runtime library
    errors.
  - Added fixed point sprite movement/animation and sprite_set_mode to allow
    a mixture of fixed point and whole number sprites.  read the docs for
    more info.
  - Added code (in /misc) to compute the speed of target in fps.
**- Changed most U/SHORT parameters to ints,  with associated problems.
    This means you can have real coordinates now!
**- Added 640x480 and 800x600 X target,  with a font you can read.
  - Added handle/parameter checking for all clipping routines.
**- Added buff_stencil_buff_to for transparent background buffers, w/ demo.
  - Added buff_filled_triangleNC,buff_draw_triangle(NC) 
  - Added build_sprite_from_buffer to dynamically build sprites,  with a demo.  
  - Added sprite_find_first_frame to get unused frame numbers.

Bug Fixes/Spec Enhancements:
  - sprite_find_first_free now handles a full system correctly.
  - popup_info handles strings with newlines now.
  - Fixed a bug with sprite_free that was causing occasional crashes.
  - Fixed a bug that was causing vertical lines to be drawn 1 pixel longer
    than they should have been.
  - fixed a bug with fading in palettes under X (last color not faded).
  - fixed a bug with building w/ some versions of make (.o files in wrong
    place).
  - fixed demo3 to load a palette up - you can see it running on X now.
  - fixed a bug that was causing rectangles to be drawn 1 line too short.
* - X partial blit support is improved.
  - Added dummy functions to allow X compilation of input-dependant code.
  - Fixed all compilation warnings except those pertaining to debugging
    routines having no effect when not compiling for debugging.
  - Optimised the palette routines for X.
  - Added full clipping checks to buff_blit_buff_to() and blit_img_to()
  - Fixed linux and dos grx based mouse behaviour to be more spec-compatable.
  - Fixed some spec bugs in the behaviour of dos and linux kb and mouse.
  - Turning a sprite off now restores the default values.  
  - Combined jtypes.h and jdebug.h into jconfig.h
  - moved all declarations in headers out to source files and extern'd them.
  - Fixed visibility problems with dos 13h mouse.
  - Fixed spec compatability with linux kb support.
  - Fixed a bug with buff_blit_buff_to (+NC) drawing 1 pixel too small.  
  - Fixed yet another problem with horizontal and vertical lines 1 pix. out.  
  - makefiles re-written for easier updating.
* - A few portability changes,  now compiles under hp-ux. (haven't run it
    though!).
  - Made an endian related change to image/lz.c,  haven't tested the effect
    on a big-endian machine yet,  but hopefully it works now.  
  
Testing:
  - What? You think I've got time to test it all too?  ;)  All right:
  - I Can now build all of the utes and demos under X on a sparc without
    an error.  They behave well,  quitting by complaining about mouse
    support.  The demos all do much better - including demo 10,  which
    runs now,  and demo1 doesn't crash - it just looks wierd.  Still,
    thats progress!
  - I have built +run JLib under linux svgalib (all modes),  all dos modes,
    and linux X11 without problems (except kb and mouse support for X).  
  - Generic build has been tested under linux and hp-ux - try it on your
    favourite unix box....
  - I have built JLib on a sysVr4 sparc station with x and an hp-ux 9 unix
    box.  Building goes fine,  running is with varying degrees of success.
    I will keep you posted,  and hope to have full X support soon.


Changes since 0.9
-----------------
Documentation:
  - Mouse documentation added.
  - Keyboard documentation added.
  - Utes documentation added.
  - Image documentation added.
* - X installation docs added.
* - Linux info sheet added to hopefully turn some people on to Linux :)
  - Collision detection added to docs.
  - Documentation spell checked.

New Features:
  - Added buff_convex_polyNC to draw simple filled polgons.
  - Added buff_hollow_poly and buff_hollow_polyNC for polygon outlines.
**- Added new image format .jlb - jlib image file for simple Image in/output.
     Also image_load_jlb,  image_save_jlb,  compression + rle code.
     Added device independant IO to load/save .jlb files.
  - New ute - pcx2jlb converts simple pcx's to .jlb files.
* - Linux keyboard support finally added.
* - Added a keyboard handler for dos (get that monkey off my back!).
  - Bounding rectangle stuff added to spr_edit.
* - Most I/O stuff is now endian - independant.
  - Makefiles changed to new common format for easier updating.  
  - Added popup_about() and popup_info() simple dialog boxes.
  - Added a sprite collision demo (demo9).
  - Added a popup demo (demo10)
  - Added another collision demo (demo 11) because I couldn't bear to throw
    the collision test code away.
**- Added a dos grx2 320x200,  640x480 and 800x600 target.
**- Added a linux grx2 320x200,  640x480 and 800x600 target.
  - Added filled ellipse and circle,  and clipping ellipse and circle.
  - Proper font for 640x480 targets.
  - Made 640x480 spr_edit usable.

Bug Fixes/Spec Enhancements:
  - Fixed a bug with loading bounding rectangles from sprite files.
  - Fixed a bug with spr_edit and sprgrab under DJGPP V2 (mouse problem).
  - Fixed a casting problem under DJGPP v2.
  - Fixed a bug that was causing crashes in spr_edit.c.
* - Fixed some bugs with collision testing - it didn't work properly at all.
  - Fixed a bug in demo1.c (refrencing freed memory).
  - Fixed a bug in horizontal/vertical line drawing that was causing the 
    routines to draw lines 1 pixel shorter than they should have been.
  - Fixed stubify problem with djgpp v2 makefile.
  - Linux keyboard now checks innited status.
  - Fixed RANDOM macro in demos to avoid djgpp v1 "limits.h" problem.
  - Added default text restore to djgpp targets (needed for textmode.exe).
  - Changed misc/trig stuff to compile under new version (irresponsable not to
    have tested it! - mental note).
  - djgpp mouse now checks initted status.
  - X subdirectory renamed to x - all lowercase filename convention now in
    effect. Makefiles updated.
  - Fixed a major bug in sprite_init that didn't set the free flags to zero.

Testing:
**- Tested install for each target as follows:
	 djgpp v1 320x200x256      - 100% make without problems.
	 djgpp v2 320x200x256      - not tested.
	 djgpp v1 grx640x480x256   - 100% make without problems.
	 linux svgalib 320x200x256 - 100% make without problems.
	 x windows 320x200x256     - make ok but utes and demo10 naffed.
	 djgpp v2 grx2_320x200x256 - not tested.         
	 djgpp v2 grx2_640x480x256 - 100% make without problems.
	 djgpp v2 grx2_800x600x256 - not tested.         
	 linux grx2_320x200x256    - 100% make without problems.
	 linux grx2_640x480x256    - 100% make without problems.
	 linux grx2_800x600x256    - not tested.         
=============================================================================
