GX2 Version history

 GX2 a2.5
 .color swapping in conversion procedures works now also if dest bpp and
  source bpp are the same (only 24,32 bpp yet with)
 .color swapping works also with dithering converters
 .PCX loader/saver can handle 24 bpp images
 .PNG loader added and partially adapted (not full, though)
 .PNG error handler improved (doesn't stop whole prog anymore)
 .GX2Demo uses only png images now
 .Draw has got parameter 'flags' - for sooncoming changes

 GX2 a3
 .brightness_image has now source and dest, still same image can be
  changed but it's also possible to use a destination image to gain
  a higher speed
 .16 bit whitefading bug removed
 .clearimage improved
 .PNGLib loads interlaced images
  -still no support for bpp > 32
  -still doesn't load Photoshop PNGs
 .rgb2bw - high quality fast rgb to black/white converter added,
  uses TV-like conversion (like e.g. Photoshop uses it)
 .loadbmp prob with bpp < 8 and image.bpp > bmp.bpp fixed
 .changed in timage some words to longints (better asm usage)
  -timage sizes now full 64 bytes
 .halfsize_image fully implemented
 .screen output via MMX works now 64 bit aligned
  -on AGP cards around 40% speed gain in average
 .timage/tsubimage type improved, timage supports now cursors
 .fixed tgrafx.close bug with clipping windows
 .nasty newfrontier getmem32 bug fixed
 .added simple pageflip support (I'm pretty sure that it doesn't
  work everywhere yet, only draw/get tested)
 .bugfix in sprite_1516 and sprite_32
 .first version of mouselib available
 .bmpcxlib loads now all available BMP types except RLE ones
 .fixed bug in savebmp
 .32 bit getpixel bug fixed
 .fixed bug in 16 bit rgb (TOO well optimized ;)
 .antialiased line support (line flags: lnantialias)
  -far from optimal, but works (improvements later, no time yet)
  -supports linestyle
 .convertimage improved
 .bug in timebase removed
 .antialiased circle and ellipse support
  -algo intended by me :)
  -due to ellipse uses extremely large nums, longint is not enough for
   qualitative displayment, I'll improve that soon
 .PNG loader bugfixed - loads now also Photoshop images!!
  - thanx flies to Bruno Henrat/FR
 .clear works correct with clipping windows

 GX2 a4
 .fixed BMP 8bpp loading bug (caused due false BMP-format description)
 .antialiased procedures twice as fast (bpp specific alphablend-pixel)
 .type trgb changed, byte alignment now bgr instead of rgb (better handable)
 .fixed bug in 32 bit line/hline - putted only 16 bpp instead of 32
 .fixed several problems with pageflipping
 .fixed minor line clipping problems (TP doesn't like mixed int/longint)
 .LFB line drawing improved
  -full asm
  -32 bit linestyle support (NOT supported in banked modes yet!)
 .elementary 24 bpp LFB support (definitely not all)
 .subimage support implemented
  -openimage modified
  -procedure setsubimage added
 .changed up some things to make FPC port possible
  -all LFB procedures use mode.displayofs (also needed for images)
 .copypage works (not final)
 .changed some imXXXX flags
 .initmem supports multiple images
 .new driver model
  -direct access to every driver even before gfx init
  -unlimited amount of drivers
 .VBE driver improved
  -recognizes 15 bpp modes fully correct if declared as 16 bpp mode
  -recognizes 32 bpp modes if declared as 24 bpp modes
  -should work better on some cards where it didn't work
 .added procedure pointertoimage
  -any timage which is written to a pointer, can be converted
   to a normal timage - useful for linked images
  -doesn't support subimages yet
 .added to timage for subimages variable 'time'
 .savegx2 needs to save also data tselector with a file
  -more useful for several internal tasks - don't need to
   differ between hd-image and internal image
 .mousedriver can handle linked cursors
 ^^^^ 1st unofficial alpha4
 .fixed bug in clearimage (replaced all image.imagestart by imgpos)
 .fixed bug in 24->xx conversion - PentiumII+ always set the
  zero-flag in 32 bit divisions
 .fillrect etc work now with mmx
  -fixed some small calculation bugs in fillword_mmx/filldword_mmx
   -weren't used therefore
  -on AGP cards approximately 95% faster
 .changed again some driver specs - still not final
 .some more gfx procedures take now longint parameters
  -soon all of them will work with longint, as this is more useful,
   because almost everything works 32 bit and convertation takes time
 .mmx movefromscreen implemented
  -not very efficient if bpl < 128, implemented in getimage procedures
   such a checking to use the fastest move
 .no difference between mem and screen putting
  -move2mem/movefrommem removed
 .draw-/getline improved
  -untested yet!!
 .unit gx_fx available
  -fast image rotation integrated (all color resolutions)
  -moved some procedures from gx_image.* to gx_fx.*
 .15/16 bit sprite putting 5..10% faster
 .setsubimage improved
  -doesn't overwrite global timage.size
  -duplicateimage and convertimage must be adapted!!
 .reorganized gx_image.pas - shall be nonpublic for programs soon
  -moved some procedures to grafx2.pas
 .changed duplicateimage
  -didn't work with images with offset <> 0
 .improved convertimage
  -handles also sprites now
  -doesn't abandon cursor hotspots
 .FLIC-Player available
  -still not optimized
  -does only handle 8 bit FLICs, loads only at FLIC's bpp into image
 .added some new cursors to mouselib
  -found some kind of stack overflow bug - wasn't able to encounter
   position yet, BP debugger seems to be buggy itself... :\... just
   move the mouse some time in gx2mouse and you'll see the prob
 .almost complete 24 bit linear support
  -not completely tested yet (only functions in gx2demo tested)
  -not optimized
 ...uh, just saw that the size of the GX2-sources nearly reach 500K...
  I expect 600...700K in the final (excluding jpeg-sources)
 .changed imageloader specs
  -must have a flags-field for additional settings and a bpp field
  -added ldXXXX flags in gx_glob
  -making all loaders to follow the specs may take a while
 .improved procedure blend
  -automatically opens destination image if required
  -handles also 24 bpp images (MMX possible)
 ^^^^ 2nd unofficial alpha4
 .added 24 bits mosaic effect in gx_fx.pas/asm
 .fixed pixel distortion bug in brightness_32_mmx
  -always 2 pixel swapped due false shifting and combining
 .added 24 bits mmx brightness proedure
 .redesigned color conversion interface
  -procedure setconvert renamed to getcnvproc
  -removed global variable proc_conv
  -getcnvproc returns pointer to conversion procedure
 .PNGLib supports transparent images
 .fixed small bmp 8 bpp saving bug
 .idimage containing the string 'GfX2' is now longint with this value
  -timage changed
  -fairly small speed increase this way
 .added drXXXX flags
  -used in draw command - drdefault is normal flag
  -addition and subtraction are done this way now
  -drand, drxor and dror not useable yet, but already present
 .improved getcnvproc
  -has flags field - also color swapping (rgb<>bgr) is defined here now
  -all color conversion procedure parts for swap/nonswap mode are splitted
   up
 .color resolution converters work partially with MMX (32 to 15.16)
  -20% speed increase
 .bugfixed 24 bpp sprite routine (have I ever mentioned I hate 24 bpp???)
 .doublesize_image and halfsize_image improved
  -with 32 bits due MMX 70..90% speed increase depending on function
   and image
  -24 bits support
 .blur_image in gx_fx available
  -for 24 and 32 bits
  -MMX version two times faster (32 bits only)
 .rotate_image improved
  -draws also without transparent color on existing image - higher speed
   in alot of situations
  -10% faster in all situations
 .image scaler implemented (tgrafx.scale)
  -full draw capabilities - converts by fly, adds, etc...
  -not completely optimized
  -may contain small bugs, even that it's been thoroughly tested
 .increased default GFX buffer size from 32K to 128K
  -larger images supported in buffer consuming procedures
  -needed for sooncoming scaling interpolation, which requires 3 times
   more memory than normal scaler
 .added procedure scale_image in gx_fx implemented
 .added procedure flipimage
  -if images equal in all aspects, moves source imagedata to dest imagedata
 .added procedure scaleup_image to gx_fx
  -nice effect in combination with blur_image (demo follows soon)
 ^^^^ 3rd unofficial alpha4
 .fixed bugs in MMX filling procedures
  -fillword_mmx (hanged sometimes)
  -filldword_mmx
 .PNG saver available
  -big thanx flies to Martin Beck!
  -improvements follow soon
 .fixed bug in vline procedures of all bpp
  -di previously overwritten in asm code
 .fadeout and fadewhite improved
  -take now color increase/decrease amount as parameter
  -see procedure header comments for details how to use
 .improved png loader
  -code more clear
  -loader slightly faster
  -transparency chunks now completely right interpreted
 .font format slightly modified
  -tfont larger
  -BMP1-fonts also allow different font sizes now
 .added BMP8 font format support
  -uses currently putpixel, will be improved soon
 .fixed some bugs in 1-bit font drawer
  -bugs didn't occur yet because only 8-pixel-width-fonts were used
 .fixed wrong viewport-calculation in tgrafx.get subprocedures
 .changed tgrafx.bitblit
  -procedure parameters are named different
  -linear and even banked sofware version do their work now at the maximum
   possible speed
  -full clipped (works right as far as I was able to test it)
 .added procedure setfontattributes
  -adjusts size, x- and y-alignment
  -size represents in bitmapped fonts the actual subfont
 .added procedure closefont
 .textwidth and textheight are able to calculate width of almost all font
  types
  -due to vector fonts aren't supported yet, it can't calculate their width
 .System font now included in exe-files (via sysfont2.obj - linked)
 ^^^^ 4th unofficial alpha4
 .Font position animation now supported
  -smfont11.xfn is such a font
 .driver interface slightly changed
  -driver isn't required now to find the modes -> smaller code
 .textwidth improved
 .Four new flags supported by all drawing operations (draw,scale,drawline)
  -drdither - dithering, if conversion from 32/24 bpp to 16/15 bpp
  -drand    - combine image with background via logical and
  -drxor    - combine image with background via logical xor
  -dror     - combine image with background via logical or
 .png loader again a bit faster (appr. 30%)
 .16 bit image data addition 10% faster
 *Official alpha 4, released on 12th of April 1999

 GX2 b1
 .tmode tidied up
  -font settings have an own record (tmode.font)
 .Font system improved
  -spacer is now also in 1 bit fonts multiplied with subfont+1
  -supports text underlining and strikeout (setable with setfontattributes -
   in the flag-field with constant textunderline or textstrikeout)
  -1 bit font writer in LFB _6_ times faster than before - even faster than
   the GX1 font writer ever was!
 .setbrightness_image supports now also 15/16 bpp
  -however a bit slower than 24/32-pendants - they use MMX and have their
   values directly, without decoding them
  -shows up small rounding problems (too few bits in these modes)
 .fixed bug in movefromscreen_mmx - I already knew that bug, just forgot to
  remove it also there (movefromscreen_386 had it, where it was already fixed)
 .timebase is now based upon Thomas Schatzls CPU unit for FPC
  -uses, if available, the CPU timestamp - EXTREMELY accurate
 .new unit gx_utils introduced
  -contains the procedure drawrects2screen - draws rectangles within an image
   to the screen - UNCLIPPED!!
 .mousedriver contains new event: onmouseany
 .Error device gxerror introduced
  -write to it as textfile - the program will halt with this error message
  -you can redirect this to your own error handler, if you like to
 .new 32 bits stream system introduced
  -new base for file reading/writing within GX2 - is data source independent!
  -almost identical to the streams of the unit objects, but 32 bits
 .FLIC-Player interface improved
  -contains seek to jump to a frame, getcurrframe to retrieve the actual
   frame and getlastframe to get the last available frame
 .Mouse driver doesn't show mouse anymore after mouse initialisation - you
  need to call showmouse now
 .Help file available made by Arno Fleck (far from finish)
 ^^^^
 1st beta1 preview
 .Font rotation supported with 1-bit-fonts
  -call setfontattributes to use it
 .fixed some problems with 24 bit procedures (can't test them on my own
  machine)
 .object model improved
  -tgrafx main object, heredity for all other types
  -tgxscreen, tgxmem, tgxwindow objects available
   -advantage: you can't call e.g. in a tgxmem-object any procedure that
    is restricted to screens and you can define own objects based upon tgrafx
 .32 Bit streaming object moved into stream32.pas - useable for everyone
  who needs it
 .more hardware-support, first S3 driver works
  -currently only blitting and rectangles supported
 .improved scaling routines
  -fixed bugs in 24 and 32 bits scaling (24 bpp not tested yet!)
  -scaling images larger now about 20..30% faster in 15/16,24 and 32 bpp
 .direct RLE image/sprite support removed
  -doesn't have any benefits on today's machines
 .added some required procedures
  -getfont to retrieve the actually used font
  -getlinestyle to get the actual line style
  -getpattern
  -getfontattributes
 .memory sprite-drawing nearly twice fast with MMX
  -new MMX-spriteroutines included, support 15,16 and 32 bpp
 .scalers work now a bit more accurately
 .tgxwindow has got resizing/moving procedures
  -procedures only influence viewport, but e.g. a move won't move the
   visible data, that needs to be done by the user
 .procedure setdisplaystart added
  -allows scrolling over the whole virtual screens
 .procedure setvirtualscreenwidth in tgxscreen added
  -allows to set virtual screen widths for scrolling with above mentioned
   procedure setdisplaystart
 .procedure setclipping available - influence clipping area
 .mouselib - function tmouse.there added
  -checks if the mousepointer is in the specified rectangle
 .gx_utils extended by new display-buffer-system
 .image and sprite putting esp. in linear modes definitely faster
  with small images (~30%)
 .various functions in gx_fx minimally upspeeded (<= 5%)
 .png-saver saves truecolor/grayscale-images at a better compression ratio
 .fixed bug in asm 1bit-fontwriter
  -caused GPF if a character wasn't available
 ^^^^
 2nd beta1 preview
 .setfont/getfont work more error-tolerant
 .get/setclipping again removed from main object
 .tgxwindow features getclipping
 .S3 driver fixed - detected on all card S3
 .ellipsedrawer handles now larger sizes in antialiasing mode and looks better
 .setfont resets font size
 .fixed bug in antialias line putter - had problems with floating point -
  bp didn't recognize div by 0 but wrote alot of crap into memory
 .added some procedures to tgxscreen-object to handle the viewports better
 .helpfile 250% larger
 .fixed bug in getfont - returns now correct pointer
 .improved viewport-handling
 .made some procedures private in tgrafx-object to avoid misuse
 .fixed bugs with 8-bit timages containing subimages
 .added 4 additional font attribute procedures
 .improved font format - supports also vector fonts now
  -old Borland CHR-fonts convertable to XFN-fonts (chr2xfn.exe)
  -font rotation available
  -old XFN-fonts produce false format error when loading - font version is
   now 1.01 ($0101)
 .diverse changes in procedures concerning fonts
 .added functions getmaxcharwidth and getmaxcharheight
 .Raw font (*.FNT) to XFN-font converter available (fnt2xfn.exe)
 .currently 63 XFN fonts available
 .tstream32 contains new flag - ready - should be true of after init no
  error occured, done should set it to false again
 .almost all things rewritten to streaming
 .fixed small bug in 15/16 bit outfading - new method could cause color
  overflow
 .tbuffer improved
  -bfmem2scr is new flipping system - uses 2 video pages, if available, and
   puts data onto not visible screen and flips after drawing on it
 .antialiased line much more accurate with longer lines
 .small demo for buffering available (bfdemo.pas)
 .circle/ellipsedrawer use gfx buffer - no 1024 pixel height limit anymore
  and 2048 saved bytes
 .moved color conversion procedures into gx_col.pas
 .timage type changed to work better with FPC
 ^^^^
 3rd beta1 preview
 .faster 24 bit filler
 .helpfile slightly extended
 .fixed hidecount bug in mouselib
 .fixed line clipping bug
 .a 2nd call of tgxscreen.init automatically closes the old mode and
  initializes a new one
 .jlib also adapted to streaming mode now
 .saved some mem by shortening the max string length or the error codes
 .fixed color bug in 32 bpp vline
 .no use of unit crt anymore
 .fixed bug in 24 bit non-mmx crossfader - didn't work
 .textscreen now also restored with 80x50 resolution
 .fixed some bugs concerning 24 bpp imaging
 .mouselib doesn't lock the interrupts anymore
 .png-loader fixed - had problems with greyscale palettes
 .pcx-loader fixed - GPF if file larger than 64K, didn't even load
  anything
 .fixed 1/4 bpp bug in savebmp
 .gif unit available
 ^^^ official released beta 1

 GX2 b2
 .tgrafx.clear faster due usage of mmx
 .fixed zero string length textheight/textwidth bug
 .chr to xfn converter improved
  - works better with bad chr files (however not all)
  - mass conversion possible
 .fixed bug in copypage
 .changed clhitrueno24 constant to $88 - was $84, which was clhitrue
 .changed jump address in grafx2.asm - pattxor
 .pcigetdevinfo in drv_pci improved - returns only true if device found
 .mouse driver improved
  -direct hardware support added (much more better than in GX 1.x)
   -improved detection of MS mouse types
   -automatic data synchronisation - cursor doesn't jump wild around if
    some wrong bytes were recieved
   -you can plug off the mouse and again plug in and it'll work again
   -cursor isn't too slow like in GX 1.x - automatic 2x acceleleration
    implemented, similar to that one of normal mouse drivers
   -no more problems if mouse moved while initializing
  -is able to handle up to 3 mice (one via driver, 2 via comport)
  -variable inited added
   - only true if init didn't fail
   - more stability due to checking for true in each proc of tmouse
  -left-hander-support (procedure setlefthand)
   -swaps buttons for left-handers
 .flood filler included
  -thanx to Jean-Jaques Mordas for the code
  -code will be improved soon (higher speed)
 .gx_fx supports image mirroring
  -not 24 bits yet
  -untested
 .gx_fx supports contrasting
  -only for 32bpp yet
  -only for lowering contrasts yet
 .image rotation in gx_fx works now with double as angle value
 .fixed bug in tgrafx.textwidth - had problems with space-strings in
  combination with vec-chars
 .added procedure hextoint in gx_glob
 .GX2 doesn't halt program anymore if no supported card detected
  -useful if only memory modes are used
 .added procedure tgrafx.gray - returns gray values for rgb screen
 .fixed bug in 24 bits getpixel (untested)
 .fixed checking for wrong color depths in some procedures
 .fixed wrong pixel size calculation in tgrafx.drawline
 .fixed clipping bug in tgrafx.drawline
 .fixed banking problems in tgrafx.drawline
 .bilinear scaling supported (flag drbilinear)
  -not extremely fast, but should do its work
 .helpfile extended
 .fixed bug in bitblit within memory
  -thanx to Martin Beck
  -moving in all directions now at equal speeds
 .fixed bug in 4 to 32 bit color converter
 .fixed RGB/BGR bug when saving 8 bit PNG files
 .fixed bug in banked scaling when converting color depths
 .fixed bug in 24 bits addfill
 .changed tgxwindow.move behaviour
  -doesn't resize now if window gets out of screen
  -untested about if this causes instability with some operations
 .image mirroring supports 24 bits now, fixed address problem
 .fixed small bug in getmaxcharheight
 .stream32 includes now all necessary constants - including
  the unit 'objects' isn't required anymore
 .highering/lowering contrast now supported for all color resolutions
 .added procedures addpixel/subpixel
  -adds or subtracts colors with saturation
 .added setfontattributes flags 'texadd' and 'textsub'
  -allows transparent font displayment
 .1 bit fonts with more than 32 pixels x-size are supported now
 .font system now in extra unit gx_font
  -GX2 supports True Type Fonts from now on!!
   .thanx to Freetype team (www.freetype.org)
  -old font system in tgrafx only available for some while now, will be
   removed within the next version, just there for compability issues
 .'GrafX2' is now named 'GX2' - sounds better and avoids confusion with
  other, similar named units
 .TTF to XFN converter available
  -XFN much faster loadable than TTF
  -programs don't always require slow and large TTF system
 .adapted 2 old fading routines from GX1 to GX2
  -gx_fx: fadeshade, fadecircle
 .unit gx_print is available, supports printing on Epson and HP compatible
  printers
  -not free for commercial use - see header of that file

