PUTMAKER
GFA BASIC Tool Goes High-Rez
MONOCHROME UPDATE BY
THOMAS HOPPER
ORIGINAL PROGRAM BY
A.L. HUBBARD
Monochrome Putmaker is the high-resolution version of a color graphics utility that appeared in the November 1988 issue of START. It makes adding pictures to your GFA BASIC 2.0 or 3.0 programs a snap. Simply draw your monochrome artwork with an easy-to-use program like DEGAS, then run Putmaker to clip the picture and PUT it in your program. The graphics file PUTMAKER.PUT used to jazz up Putmaker's title screen is a perfect example.
How It Works
Putmaker will load uncompressed DEGAS .PI3 images, and GFA BASIC PUT
and SCREEN files. You then define a rectangular area of an image using
the GEM-style rubberband box and save it to disk as a GFA BASIC PUT file
to use in your own programs. Finally, you can save a picture back to disk
in any of the three formats, making Monochrome Putmaker a graphics file
converter as well!
Once you have your picture on disk, you use two related GFA BASIC commands to manipulate and store the block of graphic screen data as a bit pattern in a string variable.
GET X0,Y0,X1,Y1,A$ reads a rectangle from the screen and stores it in A$. X0 and Y0 are the coordinates of the upper left-hand corner; X1 and Y1 are the lower right-hand coordinates.
PUT X0,Y0,A$,[mode] draws the bit pattern back on the screen, with the upper left-hand corner of the block's location specified by X0 and Y0. The optional mode parameter indicates the graphics mode, typically used to define how the block interacts with the background. (See your GFA BASIC manual for details.)
Running The Program
To run Putmaker, double-click on the archive file MONO_ARC.PRG on your
backup START disk. Choose Extract when the dialog box appears, then use
the file selector to choose a destination disk. Three files will un-ARC
to that disk.
|
|
Program:
Type: Requirements: Arcfile: Files:
Language: |
Monochrome Putmaker
Programmer's utility 512K, high rez MON0_ARC.PRG MONOMAKR.PRG TRIAL.P13
GFA BASIC 2.0 |
To see an example of what Putmaker can do, double-click on PtJTMAKER.PRG, then load the picture file TRIAL.PI3 into the workscrcen. From the Select menu, choose PUT Area and then use the mouse to "rubberband" a section of the picture. Choosing PUT File from the Save menu will save that screen section to disk as a PUT file.
To load the PUT file into your own program, simply BLOAD the file into a string and then PUT the bit pattern wherever you want it. For example, this is how Putmaker loads its own title screen:
Mainscreen$=Space$(9926)
!Set up string variable
Bload "MONOMAKR.PUT",Varptr(Mainscreen$)
!Load the PUT
Put 206,125,Mainscreen$
!Then PUT it to the screen
Menu Options
Here's a quick run down of Putmaker's menu options. Putmaker is definitely
user friendly and needs few directions.
Desk
About Monomaker: Copyright and version information.
File
Introduction: A reminder of the program's capabilities.
Credits: Credit for the original Putmaker.
QUIT: Exits the program.
Load
PUT File: Loads a GFA BASIC PUT-format file.
DEGAS File: Loads a DEGAS .PI3-format file.
SCREEN File: Loads a GFA BASIC SCREEN-format file.
Save
PUT File: Saves the selected block in GFA BASIC PUT format.
DEGAS File: Saves the whole screen in DEGAS PI3 format.
SCREEN File: Saves the whole screen in GFA BASIC SCREEN format.
Select
PUT Area: Lets you select an area of the workscreen to save
or view as a PUT file.
View
Selected PUT: Displays the PUT area previously selected.
WORKSCREEN: Displays the workscreen.
Free Memory: Displays available system memory.
Disk Space: Displays amount of free disk space on a selected drive.
Thomas Hopper lives in Michigan, where he attends Alma College and studies physics and philosophy. This is his first program for START.