Block Builder ~~~~~~~~~~~~~ M.Meany, 1993. Disclaimer ~~~~~~~~~~ I accept no responsibility for the performance of this program. By using this program you are accepting full responsibility for the consequences. What Is It? ~~~~~~~~~~~ BlockBuilder is a small utility that may be of use to assembly language programmers designing games or demos. It's purpose is to collect all the brushes that your program will eventually use as graphics for bobs and store them in a single binary file. I wrote this utility for myself, so it's functionality may not be to everyone's liking. Usage ~~~~~ The program can be launched from the CLI or WorkBench. No parameter parsing takes place, so don't bother wasting time experimenting! The program is controlled entirley by gadgets, all of which are visible when the program is first launched. Below is a quick run through of each gadgets function: Image Load Will allow you to select an IFF ILBM file. The binary gfx data will be ripped from this file and added to the list of images stored in memory. The width, height and depth of the image will be displayed for your reference. For every image loaded a mask is built. The mask is generated by ORing together all the planes of the image. Show Ho Ho Ho! A half hearted attempt I'm afraid. This gadget will allow you to view an interpretation of your image on the WorkBench screen. Obviously this techniques is very limited in use, but should show you enough to refresh your memory. Next Steps you on to the next image in the list. Prev Steps you back to the previous image in the list. Bank Load Allows you to load a previously created bank. Note that you can load a bank with images in memory, they will all be merged. So it is possible to keep separate banks of images handy so that they can simply be added to other projects at a later date. Save Allows you to save the current list of images as a binary file. Binary File Format ~~~~~~~~~~~~~~~~~~ The format of the binary file generated by BankBuilder has been styled to my particular needs. Once loaded a very short routine can be used to convert a bank straight into a double-linked list that allows for easy access to any given image. The format of each image is shown below: Contains garbage Contains garbage Width in bytes of this image Height in lines of this image Depth of this image Raw data for this image, saved as consecutive bitplanes Mask data for this image, size = 1 bitplane of image. The following fragment of code shows how to convert the bank into a linked list when loaded into memory: ; Entry a0->start loaded bank ; for 1st image, make successor NULL MakeList move.l #0,4(a0) Pred = NULL ; determine size of binary data for this image ( not forgetting mask ) ML_Loop cmp.l #$11111111,(a0) beq.s ML_Done moveq.l #0,d0 move.w 12(a0),d0 depth addq.w #1,d0 allow for mask mulu 8(a0),d0 mulu 10(a0),d0 add.l #14,d0 image header move.l a0,a1 add.l d0,a1 a1->next image move.l a1,(a0) a -> b move.l a0,4(a1) b -> a move.l a1,a0 bra.s ML_Loop ML_Done move.l #0,(a0) Succ = NULL rts Closing Thoughts ~~~~~~~~~~~~~~~~ There are 101 features missing from this program. Some ideas are: 1. Give banks an icon that can hold palette data as tooltypes. 2. Display images on a custom screen so true colour/depth can be seen. 3. Allow a range of images to be tested for animation. 4. Allow loading of ANIM5 brushes: Each frame becomes a separate image. 5. Allow masking to be switched off. 6. Allow masks to be loaded separately or created within the program. 7. Save banks with a PC relative header that when run will turn bank into a linked list. 8. Allow a large IFF to be loaded and then chopped into consecutive images. 9. Allow an image to be cut from a loaded IFF. 10. Add some image manipulation tools such as Mirror, Flip, Shift etc. Well I will probably continue to work on this utility for my own benefit. However I have included the source code, Devpac compatible, for you to play with. Please send any mods to me so that I can keep updated. Thanks and Credits ~~~~~~~~~~~~~~~~~~ This program uses reqtools.library, created by Nico Francois. The ILBM loader was programmed by Steve Marshall. Tools used: Devpac, Powerwindows, BumpRevisionDeluxe, DPaint (?????), Mungwall, Scribble. M.Meany,