The Graphics Factory
EGA Version 2.0
Copyright (C) 1993 James A. Sausville
All Rights Reserved

I. INTRODUCTION
----------------
The Graphics Factory is a powerful yet easy to used graphics editing program.
The program allows you to create sets of graphic images that may be easily
utilized in your own Microsoft BASIC programs. The Graphics Factory also
allows easy creation of complex animated sequences.

II. COMPATIBILITY
------------------
Graphics created with The Graphics Factory should be compatible with Qbasic,
Quick Basic(V4.5), The Basic Professional Development System, and Visual
Basic for DOS. There is no reason that I am aware of that would prevent the
use of Graphics Factory images with Turbo Basic or Power Basic programs. The
registered version of The Graphics Factory is shipped with separate utility
programs (see below) that allow the graphics to be used in Quick C programs.

III. HARDWARE REQUIREMENTS
---------------------------
The minimum suggested hardware configuration consists of a 286 or better
microprocessor, 640k of RAM and an EGA display. A mouse is recommended, but by
no means necessary, to use this program. Any combination of disks drives
may be used with The Graphics Factory.

Approximately 572,000 bytes of FREE RAM is recommended for The Graphics
Factory (Free RAM being the amount left over after MS-DOS, device drivers and
TSR programs have loaded). You may check the amount of free RAM that you have
available with the MS-DOS CHKDSK command (see your DOS manual for details). If
you have less free RAM available The Graphics Factory may load and run, but
will terminate with an error during certain operations. By comparison, many
of todays commercial DOS game releases require even more free RAM.

IV. SCREEN DESCRIPTION
-----------------------
Across the top of the screen is the main menu bar. This menu bar works in the
same manner as the one found in the Quick Basic/QBasic editor. Most of the
programs functions are accessed through these drop down menus.

The large rectangle in the upper left hand corner of the screen is the
editing window. All drawing and editing of the current image is performed
within the editing window. The image in the editing window is a 6 times
magnification of the image in the active frame.

The small rectangle in the center of the screen is the active frame. The
current image is displayed normal size in the active frame. All changes made
in the editing window are immediately shown in the active frame.

There are 48 storage frames located at the bottom of the screen. Graphic
images you create can be stored in these frames. There are six pages of
storage frames, only one of which is displayed on screen at a time.

A second (lower) menu bar exist on the upper right side of the screen. The
"buttons" on this menu bar activate specific functions instead of displaying
a menu as the buttons on the upper menu bar do.

The area of the screen framed by the two menu bars (upper and lower) and
the editing window is the mode and message "window". The first part of the
window displays the current drawing mode (dot, line, etc.) or the current
active function (circle, box, etc.), along with instructions on what input may
be required. Any text that appears in a double line bordered window at the
center of the screen supersedes any text that is in the mode and message
window.

Below the lower menu bar is a status line that informs you of the current
frame size and which page of graphics is currently displayed (the Active
Page). Below the status line and above the active frame the current X and
Y locations of the drawing cursor are displayed. This display allows more
accurate placement of circles and other graphics.

Below the status line and to the right of the active frame is the color
palette. An arrow above the colors indicates the current drawing color.
Keyboard users should press the [<] and [>] keys to change the drawing
color. Mouse users should move the mouse cursor over the desired color
and press the left mouse button to select it.


V. SUMMARY OF FUNCTIONS AND COMMANDS
-------------------------------------

COMMANDS - GENERAL
There are many places within the graphics factory that require the selection
of a point in the editing window, or the selection of a color from the
palette. This sub section describes how to makes these and other selections
mentioned in the descriptions of the programs functions. Separate
instructions for keyboard and mouse users are provided where necessary.

SELECTING A POINT
When the program asks you to select a point, the drawing cursor in the
editing window should be moved to the desired location with the cursor keys.
Pressing [Enter] will then select the point indicated by the cursor. The
cursor may be moved in larger increments by pressing [Control] while using
the left and right cursor keys. To move the cursor up and down in larger
increments use [Control] Page Up and [Control] Page Down (this was not my
idea - control up and control down combinations do not make a scan code!).

Mouse users can select a point by moving the mouse cursor over the desired
point and pressing the left mouse button. The mouse can be used to move the
drawing cursor without selecting a point by pressing the right mouse button
instead of the left. This allows for easy placement of circles, etc. in
precise locations.

SELECTING A COLOR
Use the [<] and [>] keys to move the palette indicator arrow to the desired
color, pressing enter to select the color. Mouse users may select a color
by pressing the left mouse button when the mouse cursor is over the desired
color.

SELECTING A FRAME
Move the flashing frame border with the cursor keys to the desired frame and
press [Enter] to select it. Pressing the left mouse button when the mouse
cursor is over a frame will also make a selection. For most functions the
[PgUp] and [PgDn] keys and on screen "buttons" are still available when
selecting a frame. This allows you to select a frame from a different page,
even when inside a program function.

SELECTING A FILE PATH
In order to save or load any type of file with The Graphics Factory, a file
path must be selected. Any valid MS-DOS file path (drive and directory) may
be selected. The program will retain the last file path that was chosen and
will present you with the option of using the same path again. If no path
was chosen the program will offer the "(default)" file path. This is the
drive and directory that The Graphics Factory was loaded from. The maximum
allowable length for a file path is 28 characters.

SELECTING A SAVE FILE NAME
When you save a palette, pattern group or a .SET file, the appropriate
extension will be added to the file name for you. Any file name that will
work under MS-DOS is allowed.

SELECTING A FILE TO LOAD
After selecting a file path (see above), the program will ask for a file
mask. This is any valid MS-DOS file mask and may include wildcards
(* and ?). The normal use of a file mask is to sort out only the files
with the desired extension (i.e. *.GF).

After selection of the file mask, the program searches the selected path for
files that match the file mask. All matching files are listed on the screen
( up to limit of 115 ) in the order that they are found. If no files are
found that match the file mask a window will appear informing you of this.

To select a listed file, move the "arrow" pointer (->) with the cursor keys
to the desired file name and press [Enter]. Pressing the left mouse button
when the mouse cursor is over a file name will select that file for loading.
If you have selected the wrong file you may choose another file name if you
select [N]o at the "Load this file" prompt.


DISK MENU (SAVE AND LOAD FRAMES)

1. SAVE ACTIVE FRAME
The image in the active frame is saved to disk. A .SET file is not created,
and no palette or frame size information is saved with the graphic.

2. SEQUENTIAL FRAME SAVE
A group of frames is saved in a file in the order that they appear in the
storage pages. You select the first frame to be saved and the last frame to
be saved (inclusive). See "SELECTING A FRAME" above for details on selecting
a frame. The first frame selected and the last frame selected may be on
different pages (in other words the frame set being saved may span several
pages). The maximum number of frames that may be saved is displayed when
you are choosing the last frame. The maximum number of frames that may be
saved in a single file depends on the size of the frames. Frames saved in
this manner may be loaded sequentially or randomly.

3. RANDOM ACCESS SAVE
Frames to be saved are chosen one at a time and displayed, as they are
chosen, in the active frame. Any frame from any page may be selected to be
saved, up the  maximum allowed at the current frame size. Frames saved
in this manner may be loaded sequentially or randomly.

4. SHOW SAVE CALCULATIONS
This function displays the maximum number of frames that may be saved at the
current frame size. The offset of graphics within the save file is also
displayed here.

5. LOAD A SINGLE FRAME
A single graphic image is loaded from disk and placed in the active frame.
The frame size is reset to 48 x 32 to accommodate the largest possible
frames. No palette or frame size data is loaded with a single frame.

6. SEQUENTIAL FRAME LOAD
A set of frames is loaded from disk into the storage pages at the frame you
select. A bit of caution is required as the frames will load over any images
already stored there. Frames will load into consecutive pages as required.
Frames that were saved sequentially or randomly may be loaded this way.

7. RANDOM ACCESS LOAD
A set of frames is loaded into the program and displayed, one at a time, in
the active frame. You must select the storage frame that each loaded image
will be placed in. You may place the images in any frame on any page. Frames
that were saved sequentially or randomly may be loaded this way.

8. CREATE A .SET FILE
When a set of frames is saved by the graphics factory, a .SET file is
created. This file contains information that The Graphics Factory uses to
load in a set of previously created frames. The data in a .SET file may
also be used by your programs to load and use Graphics Factory images. See
"USING GRAPHICS FACTORY GRAPHICS" below for more information on using a
.SET file.

This function allows you to attempt to recreate a "lost" or damaged .SET
file. You must know the number of frames in the set, the X and Y dimensions
of the graphics, and their offset within the file. The last item may be
calculated by using the formula:
OFFSET = (4 + INT (( X + 7) / 8) * 4 * Y) / 2
where X and Y are the width and length respectively. The palette used to
create the graphics is also saved in the file. You may use the current
palette in the file or enter the palette data yourself.

9. TURN WARNINGS ON/OFF
When you load a single frame or overlay a pair of frames, a warning message
informs you that the active frame will be erased. This function allows you
to toggle these warnings on or off.


MODE MENU (DRAW MODE SELECT)

1. DOT MODE
This is the standard drawing mode. Selecting a point will turn that point to
the current drawing color. If the point selected is already the current
drawing color it will be returned to the background color.

2. LINE MODE
In this drawing mode points are selected in pairs. You select the first
point and then the second point and a line is drawn between them.

3. CONTINUOUS LINE MODE
As you select each point a line will be drawn from the previous selected
point. This continues until you select a new drawing mode.


SHAPE MENU (SHAPES AND FILLS)

1. MAKE A CIRCLE
The color of the circle is selected first. Then select the  center point
of the circle followed by the radius point. The radius point should be
selected along the X or Y axis of the circle. A circle will then be drawn
around the center point passing through the radius point.

2. MAKE A RECTANGLE
First select the color of the rectangle you wish to draw. Then select a
point indicating the upper left corner of the rectangle, followed by a point
indicating the lower right corner. A rectangle will be drawn between the
indicated points.

3. MAKE AN ELLIPSE
Start by selecting the color of the ellipse and then select its center point.
Indicate the X radius of the ellipse along the X axis, and then indicate the
Y radius of the ellipse along the  Y axis. If you reverse the X and Y
radii the ellipse will not draw correctly. An ellipse should be drawn around
the center point passing through both radius points.

4. SOLID COLOR FILL
This function works like the Microsoft BASIC paint function. Select the color
to fill and then the color to stop the fill at. Finally, select the point in
the editing window you wish the fill to begin at. You may wish to use fill on
a duplicate of you image, as improper use of the fill function can be a
disaster.

5. USER PATTERN FILL
The patterns that you create with the "CREATE FILL PATTERNS" function (see
below) are used in this function. This function works the same as the solid
color fill (see above) except that a custom fill pattern is used. The function
will display all 48 of the currently loaded fill patterns and ask you to make
a selection. Select a pattern in the same manner as you would select a
storage frame. When The Graphics Factory first loads, it loads a pattern
file called "USERPATS.PAT". If you save a custom pattern group under this
file name it will automatically be available to you every time you start the
program.

6. LOAD FILL PATTERNS
After selecting the path to search on, a listing of all pattern files found
will be displayed. Select the pattern file you wish to load and those
patterns will then be available to the above function.

7. SAVE FILL PATTERNS
The fill patterns created by "CREATE FILL PATTERNS" (see below) are saved
to disk as a pattern group. When The Graphics Factory first loads, it loads
a pattern file called "USERPATS.PAT". If you save a custom pattern group
under this file name it will automatically be available to you every time you
start the program.

8. CREATE FILL PATTERNS
Turns The Graphics Factory into a giant pattern editor. The active page is
stored and any loaded patterns are displayed in the storage page. You may
use any available editing function to create patterns. A pattern must be
in the storage page in order to be saved when you exit pattern edit mode.
This is very close to being program level recursion (grin).

9. G.F. PATTERN FILL
There are 8 pages of 45 predefined patterns that come with The Graphics
Factory. To change the page of the patterns displayed, select the frame
that contains the up or down arrow icon. The patterns are all one color
patterns that should work with any palette.


COLOR MENU (PALETTE AND COLOR)

1. CHANGE A PALETTE COLOR
Select the color in the palette that you wish to change. Use the [<] and
[>] keys or buttons to cycle through all 64 available colors. The current
color number is displayed in the mode and message window. You may use the
[Esc] key (or button) to abort without changing the color. To finalize your
selection press the [Enter] key or press the left mouse button when the
mouse cursor is over the color being changed.

2. SAVE CURRENT PALETTE
The current palette is save to disk for later use.

3. LOAD SAVED PALETTE
A palette that was previously saved is recalled from disk.

4. RESTORE DEFAULT PALETTE
The standard default palette used by MS-DOS/Quick Basic is restored.

5. USE GR. FACTORY PALETTE
Changes the palette to the one used to make the title screen and demos for
The Graphics Factory.

6. REPLACE AN IMAGE COLOR
If you have a graphic image that contains an undesirable color, this
function can be used to replaced it with another palette color. Select the
color that you wish to replace, and then select the color that will replace
it. All occurrences of the first color in the active frame will be replaced
by the second color. This is especially useful if you change the palette
after you have created several graphics. This function is also found under
the image menu.

7. INVERSE IMAGE COLORS
The image in the active frame is logically inversed. Color 0 becomes color
15, color 1 becomes color 14, an so on. If you are unhappy with the results
simply inverse the image again and it will be returned to normal. This
function is also found under the image menu.

8. INVERSE PROGRAM COLORS
This function is useful if you want to work on graphics with a light
background color. The background is changed to white and color 15 (the
color of all text, menus and buttons) is changed to black. Activating this
function a second time will change the colors back.

9. CHANGE COLOR 15
It is not possible to change color 15 (usually white) with the "change a
palette color" function (see above). This option allows you to select
the color to be used without the change taking affect until after the
selection is finalized.


ERASE MENU (ERASE && CLEAR)

1. ERASE ACTIVE FRAME
The image in the active frame is erased. You are asked for confirmation
before proceeding.

2. CLEAR ACTIVE PAGE
The storage page that is displayed is clear of all graphics images. You are
asked for confirmation before proceeding.

3. CLEAR ALL PAGES
All graphics on all storage pages are erased. You are asked for confirmation
before proceeding.


IMAGE MENU (MANIPULATE IMAGE)
Note: These functions all work on the image in the active frame.
1. HORIZONTAL FLIP
The current image is reversed left to right.

2. VERTICAL FLIP
The current image is inverted top to bottom.

3. FLOP IMAGE
The current image if subjected to a horizontal and a vertical flip.

4. MOVE (SHIFT) IMAGE
The current image is moved left, right, up or down by pressing the cursor
keys. Mouse users should use the cursor buttons that appear in the mode
and message window to move the image. The [Esc] key or button should be
used to exit this function.

5. ROTATE IMAGE RIGHT
6. ROTATE IMAGE LEFT
The rotate right and left function will turn an image 90 degrees right or
left respectively. These functions will only work with images that are
square (i.e. frame size 32 x 32). If an image is taller than it is wide
or wider than it is square, the image will be cropped (truncated) to make
it square. It is suggested that you make a duplicate of your image before
attempting to rotate it.

7. REPLACE AN IMAGE COLOR
This is the same function that is listed under the color menu (see above).

8. INVERSE CURRENT IMAGE
This is the same function that is listed under the color menu (see above).


FRAME MENU (MANIPULATE FRAMES)
Note: These functions work on frames in the storage pages.
1. ANIMATE FRAMES
Any frames on any page may be assembled as a animation sequence. Select
frames as you would for a random access save, up to the maximum allowed at
the current frame size (displayed in the mode and message window). When you
have finished selecting frames, the sequence will be displayed in the active
frame. The current delay between frames is displayed in the mode and message
window. You may change the delay by using the [<] and [>] keys or buttons
(located by the palette).

When the animation sequence is ended, you have the option of saving the
animation sequence as a frame set. Simply follow the on screen instructions.

2. DUPLICATE FRAME
Makes a copy of one storage frame to another storage frame. Select the
storage frame to duplicate, and then select the frame to receive the
duplicate.

3. EXCHANGE FRAMES
Will swap the location of two storage frames on the same page. Simply
select the two frame to be exchanged.

4. OVERLAY FRAMES
Allows to images in the storage page to be overlaid in the active frame.
Any image in the active frame will be erased. Select the frame to be on the
bottom, then select the frame to overlay on top of it.

5. RESIZE FRAMES
This function will allow the size of the frames to be changed. Any image in
the active frame will be cropped(truncated) to fit the new dimensions. The
smaller the size of the frames, the larger the number of them that may be
saved in a frame set.


BLOCK MENU (BLOCK GRAPHIC FUNCTIONS)
1. BLOCK ERASE
A small portion (a block) of the image in the active frame can be erased,
leaving the rest of the image intact. Select the upper left and lower
right corners of the region to be erased.

2. CUT AND PASTE
3. COPY AND STAMP
A section of the image in the active frame may be copied or cut(removed) and
then pasted or stamped in any location on any frame from any page. The
[G]et frame and [P]ut frame functions (see below) are available to assist
in retrieving and storing images from the storage frames. When an image is
pasted or stamped it is overlaid onto any image already there. The four
flashing drawing cursors show the area to be affected by the paste/stamp.
Move these cursors with the cursor keys as usual. Mouse users should note
that they are positioning the upper left drawing cursor and the other 3
cursors will maintain there positions relative to it.

4. ADD TEXT CHARACTERS
After selecting the color for the text, type in the text string to be used
(6 characters maximum). Any character that can be created with the keyboard
may be included in the string. After pressing return you may stamp the text
on to any frame as described above (paste and stamp).


MISCELLANEOUS FUNCTIONS AND BUTTONS

[Q]UIT BUTTON
Asks you if you wish to exit the program. Answer yes and your out.

[Esc] ABORT BUTTON
Allows you to abort a function the same as if you pressed the [Esc] key.

[G]ET FRAME
Used to retrieve an image from the current (active) page. Press [G] and then
select the frame to be transferred to the active frame. Mouse users may press
the left mouse button when the mouse cursor is over the [G]et frame button
or when the mouse cursor is over the storage page, to activate this function.

[P]UT FRAME
Used to place the image in the active frame in to a storage frame. Press [P]
and then select the storage frame to receive the image. Mouse users may press
the left mouse button when the mouse cursor is over the [P]ut frame button
or when the mouse cursor is over the active frame, to activate this function.

[PgUp] BUTTON
[PgDn] BUTTON
Allows you to change the active page by moving up or down through the storage
pages. Keyboard users should use the Page Up and Page Down keys, while mouse
users may use the [PgUp] and [PgDn] buttons on the lower menu bar.

[<-] (BACKSPACE) BUTTON
Allows you to activate Erase Active Frame without using the Erase Menu.
Press the backspace key or use the backspace button to activate.


VI. USING GRAPHICS FACTORY GRAPHICS
------------------------------------

When The Graphics Factory saves a set of frames it creates a .SET file.
This file contains data about the number of frames in the set, their
X and Y dimensions, their offset within the file and the palette that was
used to create them. You can load and use the information found in a
.SET file as follows:

DIM SET%(19)                            ' A SET FILE CONTAINS 20 INTEGERS

DEF SEG = VARSEG(SET%(0))               ' SET THE SEGMENT ADDRESS
BLOAD "YOURFILE.SET", VARPTR(SET%(0))   ' SET THE OFFSET ADDRESS AND LOAD
DEF SEG                                 ' RESTORE THE DEFAULT BASIC SEGMENT

FRAMES% = SET%(0)                       ' THE NUMBER OF FRAMES IN THE SET
XWIDTH% = SET%(1)                       ' THE WIDTH OF THE FRAMES
LENGTH% = SET%(2)                       ' THE LENGTH OF THE FRAMES
OFFSET% = SET%(3)                       ' THE OFFSET OF FRAMES IN THE ARRAY

DIM GRAPH%(FRAMES% * OFFSET%)           ' ARRAY TO HOLD THE GRAPHIC IMAGES

DEF SEG = VARSEG(GRAPH%(0))             ' SET THE SEGMENT ADDRESS
BLOAD "YOURFILE.EXT", VARPTR(GRAPH%(0)) ' SET THE OFFSET ADDRESS AND LOAD
DEF SEG                                 ' RESTORE THE DEFAULT BASIC SEGMENT

SCREEN 9                                ' SET EGA 640 x 350 - 16 COLOR MODE

PALETTE USING SET%(4)                   ' SET THE COLOR PALETTE

GD = 0                                  ' INDEX OF THE GRAPHIC TO DISPLAY

WHILE INKEY$ = ""                       ' LOOP UNTIL A KEY IS PRESSED
	PUT (0,0),GRAPH%(GD * OFFSET%),PSET ' DISPLAY THE GRAPHIC

	GD = GD + 1                         ' INCREMENT THE INDEX
	IF GD > FRAMES% - 1 THEN GD = 0     ' KEEP INDEX VARIBLE WITHIN RANGE

	CALL TIME_DELAY(.5)                 ' CALL A HALF SECOND TIME DELAY
WEND                                    ' END OF WHILE LOOP

END                                     ' JUST A FORMALITY

Please note the sub TIME_DELAY() is not shown in this example. An operational
version of this program may be found in the file OILDEMO.BAS and an
unstructured version in the file OILDEMO.TXT.

As you can see from the above example it is not very difficult to load and
use Graphics Factory images. It is not necessary to load the .SET file if
you hard code the values for the number of frames and the offset of the
frames in your program itself. The values for width and length can be used
in your program to place the graphics in adjacent positions.


VII. ERROR AND INFORMATION WINDOWS
----------------------------------

There are a wide variety of errors that may be reported during load and save
operations. This section describes the errors in details and offers some
potential solutions. Additional warning and option windows are also described
here.

BAD DRIVE SPECIFICATION - The disk drive specified does not exist or is not
responding properly according to DOS. The first letter of a save or load
path should be a valid disk drive identification letter (i.e. "C:\qb45\").

BLOAD TRANSFER CORRUPT - Heavily fragmented IDE hard disk drives can cause
the Quick Basic V4.5 BLOAD command to corrupt the data that is loaded. If
this error window appears, the Graphics Factory has attempted to load your
graphics 10 times, and failed. Repeated failures may indicate a damaged
file or hardware problems.

It is quite rare for this error to appear in version 2.0 of the Graphics
Factory. All Quick Basic programs that use the BLOAD command to load
graphics should test the integrity of the graphics before continuation of
the program. Please see the section BLOAD TRANSFER CORRUPT - SPAWN OF
SATAN below.

FILE NOT FOUND - The error window will inform you of the name of the file
that was not found. In all probability this will be a missing .SET file.
The load file routines virtually prohibit any other type of file not found
error.

FRAME SIZE TOO LARGE - The maximum size for graphics factory frames is
48 x 32. Larger frames may be created by using the optional Graphics Factory
Utility Pack, but they cannot then be loaded back into the Graphics Factory.
A defective .SET file can also cause this error.

INSUFFICIENT SPACE - The disk drive you attempted to save your graphics to
does not have enough room for them.

WRONG FILE SIZE ERROR - SET files, pattern files, and palette files all
have a fixed file size. If the file size is incorrect the file is damaged
or bogus and cannot be loaded. The size of a graphics file is calculated
from information in the .SET file. If the information in the .SET file does
not match the actual size of the graphics file, the graphics cannot be
loaded.

WRONG FILE TYPE - The Graphics Factory only saves and loads memory imaged
(BSAVE/BLOAD) files. All other types are rejected.

UNKNOWN SAVE FAILURE - The path specified does not exist or the drive specified
reported an error. This is an error reported by BSAVE itself and was not
trapped by the above routines.

UNKNOWN LOAD FAILURE - You should not get this error. (There is not any easy
way to simulate it either!) This is an error reported by BLOAD itself and
was not trapped by the above routines.

NOTE: The following are non error windows that appear as needed.

ACTIVE FRAME WILL BE ERASED - When you overlay frames or load a single image
the image currently in the active frame will be erased. This message was
intended to protect you from yourself. It may be turned off and on from the
disk menu.

FILE ALREADY EXISTS - This message prevents you from wiping out existing files
by accident.

FRAME SIZE MISMATCH - The set of frames that was loaded did not match the
current frame size. You have the option of changing to the new frame size.
If two different sizes of frames are loaded at the same time, frame size
should be set to accommodate the larger frames.

PATTERN PALETTE MISMATCH - The palette used to created the patterns is not
the same as the current palette. You have the option of changing to the
new palette.


VIII BLOAD TRANSFER CORRUPT - SPAWN OF SATAN
--------------------------------------------
I believe this is more of a hardware/software compatibility problem than a
bug in QB 4.5. It is an assumption on my part that the BLOAD command bypasses
the ROM BIOS and accesses the hard drive hardware directly. This does make
things much faster, and it usually works (emphasis on usually).

If a set of graphics is mangled by BLOAD, the put graphics function will
return an "illegal function call" error when an attempt is made to put the
mangled frame on the screen. In order to avoid this in my own programs I
have devised a rather asinine work around. After BLOADing a set of graphics
I rapidly display them inside of an error trapped loop. On the occurrence
of an error the graphics are reloaded and tested again.

For example:

SUB TESTFRAMES(NUMFRAMES, OFFSET, GRAPHICS%())

XERROR = 0  '  a global error flag (heaven forbid - a global variable!)

FOR LLL = 0 TO NUMFRAMES - 1

	ON ERROR GOTO BADLOAD:

	PUT (0,0),GRAPHICS%(LLL * OFFSET),PSET

	ON ERROR GOTO 0

	IF XERROR = 1 THEN EXIT FOR

NEXT LLL

END SUB


REM THE FOLLOWING MUST BE IN MODULE LEVEL CODE OF ERROR
  TRAPPED SUB

BADLOAD:

XERROR = 1

RESUME NEXT

The calling routine should test the status of XERROR on completion of the
TESTFRAMES sub. If XERROR = 1 then the graphics caused an illegal function
call and should be reloaded. The calling routine should terminate after
several unsuccessful loads, lest a damaged file put your program into a
perpetual loop.


IX. SHAREWARE REGISTRATION
-------------------------
This program has been distributed as a shareware program. If you find this
program to be useful and wish to support it, send $20.00 too:
							James A. Sausville
							P.O. Box 737
							White River Jct VT 05001

For complete details on registration read the file REGISTER.TXT and print
out the form REGISTER.FRM. Upon registration you will receive the registered
version of the graphics factory (free of all shareware notices) and a separate
program call the Graphics Factory Utility Pack.

The Graphics Factory Utility Pack contains several functions that quite
literally do not fit into the Graphics Factory itself. The functions
allow you to create larger frames by pasting together adjacent frames in
a set (horizontally or vertically) and by expanding each individual frame
to twice its normal size. To see an example of  what the GFUP can do
run the program GFUPDEMO.BAS.

As an added bonus, the GFUP can convert your frame sets to a special
Graphics Factory Conversion (GFC) format. This format allows me to write
separate conversion programs to allow your GF frames to be used with other
programming languages. The first such program GFC_TO_C is included with
the GFUP. The GFC_TO_C program allows you to use any Graphics Factory
images with Microsoft Quick C V2.5 (and assumably with C/C++ 7.0).


X. CONCLUSION
-------------
(and other odds and ends...)

I wrote the Graphics Factory to create large sets of graphics for strategy
games I planned to write in Quick Basic 4.5. Version 2.0 includes a user
interface that at least looks as if it belongs in the 1990's. There will
be a high res VGA version available to registered users for $5.00. If the
EGA/VGA high res versions prove successful I may create a 320 X 200 -
256 color version, available as a separate product.

If the Graphics Factory fails to measure up in some respect, or, God forbid,
you find a bug, please drop me a line at my P.O. Box. While I do apologize
that written documentation is not available, it would of course cost extra.
It has come to my attention that the high resolution VGA version of  The
Graphics Factory would be capable of creating Windows icons, with support
from the VGA Graphics Factory Utility Pack. Anyone Interested?
