****************************** * * * BobEd V 1.5 * * * * A general purpose object * * editor * * * * İ Peter Philip, 1986 * * * ****************************** BobEd, the program's source and this document are all İ Peter Philip. However all of these may be copied freely provided that no fees except normal copying charges or online service charges in the case of downloading. The source code for this program may be freely modified as long as the copyright notice is left intact and the resulting program is left in the public domain. You may use parts of this program in any original program as well. I would be glad to hear any comments, suggestions, bug reports, etc you may have about this program and further programs along its line - you may write to me at the address following the text. INSTRUCTIONS FOR USE ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ 1. General BobEd is a general purpose object editor that can be used to create BOB's, sprites, gadgets or any other small graphic image. Its limitations are that it can create images up to 48 bits wide by 45 bits high by 4 bits deep (16 colors). BobEd can edit nine objects on the screen at once. Objects can be saved in binary (not IFF) or C Data statements. Binary saved objects can be loaded in for later editing. Remember that to get back to the Workbench screen from a window without front/back gadgets hold down the left Amiga key and N (back) or M (front). You will need these keys because BobEd has no front/back gadgets. 2. Editing The large box to the left is the magnified edit box. The nine small boxes on the right are the actual size object boxes. To select a new object to work on, click the left button inside the object you wish to edit. To clear individual pixels, select the background color and paint over the pixels desired. To clear the entire frame, select the menu option "CLEAR" under the "EDIT" menu. The "FLIP" option will flip the object around the y-axis around the center of the object. The "ROTATE" option will rotate the object 90° right. 3. Copying and Undoing To copy any frame to another frame: 1) first click on the frame to be copied (if not already selected) and select "COPY" from the "COPY" menu. This will place the image in a buffer which remains intact until wiped out by another COPY. 2) click on the box you wish to copy to and select "PASTE" from the "COPY" menu. You may PASTE this image as much as you wish, just repeat step 2). You may also use the copy buffer as a primitive UNDO function, just COPY the image before making a major change and if you wish to fix it, PASTE the image back and you will have the image back from the time you saved it. 4. Colors BobEd uses 4 bit planes on a lo-res screen, therefore you may edit images with up to 16 colors. To select a new color, click inside that block of color. Note that the box on the right will change to the new color, also, the background color is on the extreme left - it is there, you just can't see it (because it is the background!). Use this color to erase with. These colors are fixed within this program, meaning that you must use these 16 to create your object but these may be changed within your own program. The importance of this will come later in the saving section because this program allows you to save as many bit planes (up to 4) that you want (sprites are 2, BOB's can be any and workbench gadgets are 2). Therefore you MUST use the appropriate colors for your image - that is if you plan to create a 2 bit plane (4 color) image you must use colors 0-3 (background, color1, color2, color3), similarily, if you are creating a 3 bit plane object you must use colors 0-7; in general : Planes # Of Colors Use Colors ------------------------------------------- 1 2 0-1 2 4 0-3 3 8 0-7 4 16 0-15 This is especially important when saving as C code because if you use a color out of the specified range it will not be saved (see Saving below). 4. Saving. To save an image, make it the current object (if not done already) and select "SAVE" from the "FILE" menu. A requester will now appear asking for some information. Click inside the file name box (the large one) and type a name for the object, next select the number of bit planes to save by clicking in the box on the right of the file name box, pressing DEL and entering the desired number of planes (1-4 are valid). The middle button labled "C" is the C-code switch, when the "C" is highlighted, the object will be saved in C-code format; when it is not highlighted it will be saved in binary format (see below for a description of this format). If you wish to edit the object at a later time, you MUST save it in binary format - BobEd CANNOT load the C-code data statements. Finally, to save the object, click on "FRAME", you will now see a crosshair on the edit box, click once on the upper left hand corner of the object and drag out a box to the lower right hand corner and click again - BobEd will now save your image. Note that when you save an obect as binary it will always save all 4 bits of the image for you. The following format of BobEd's binary save is simple : BYTE 1 : Hex FF - a flag that this is not C code. BYTE 2 : X0 - upper left hand corner (within box) BYTE 3 : Y0 BYTE 4 : X1 - lower right hand corner (within box) BYTE 5 : Y1 BYTE 6 -> - compressed binary data: since the program uses only 4 bits per pixel we can compress two bytes into one by shifting every second byte into the upper nybble (4 bits) of the saved byte. Loading an image is very easy. Select the object box that you want to load the image into and select "LOAD" from the "FILE" menu, click inside the file name box in the load requester and type the name - hit return or "LOAD" when finished and the image should load, If it does not load, check to see if the name is correct and make sure the image you are trying to load is in BINARY format (see above), if the load fails, nothing will happen. 5. Compiling the source The source code for this program was written for Lattice C V3.03 and consists of the following files : disk.c drawbox.c events.c gadgets.c main.c menus.c requesters.c bobed.h There is also a script file called MakeBobEd that will compile the source automatically and LinkBobEd which will link the resulting object code. The code compiles without errors. 6. Improvements Improvements slated for V 2.0 include : o Load IFF brush o Save IFF brush o File requester with listing o Rotate by any angle at arbitrary point o Flip on both axis o Fill, Lines, Circles and Boxes o Edit larger objects with up to 5 bit planes o Edit Hi-Res objects o Edit color palette o Better speed Feel free to modify this program yourself in any way you want, just leave my copyright notice in if you plan to distribute it. 7. Who am I ? Peter Philip 111 Ancaster Ct. Dartmouth, Nova Scotia B2V 1J2, Canada