home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
-
- MAP.C
-
- This is what this whole project was about 14 months ago. I
- wanted to make a game that worked on a hex grid board. In order
- to do that, I needed a way to draw images using a mask that
- formed the 'hex'.
-
- This .ZIP contains a code for displaying a hex grid map (MAP.C);
- a program to convert .PCX files into my RTGRAF format (CPAINT.C);
- a program to display and image (with or without mask) (FLASH.C)
- and two more .ZIP files. These two ZIPs contain the RTGRAF form
- of the images (IMAGEBMP.ZIP) and the .PCX form (IMAGEPCX.ZIP).
-
- There is one addition file found in IMAGEBMP that is not a pixmap
- (.BMP) file. This file is MASK.MSK; which is the mask used for
- displaying the other images.
-
- == Running MAP.EXE ==
-
- Open the IMAGEBMP.ZIP in the current directory. There will be
- about 22 files. Then simply run MAP.exe. It will load the
- images, then display the map in EGA mode 0x10. If you want
- another video mode, add the mode as the 1st argument:
-
- c:>map = EGA mode 0x10 = 640x350
- c:>map 0x12 = VGA mode 0x12 = 640x480
- c:>map 18 = VGA mode 18(decimal = 0x12)
- c:>map 0x53 = ATI Vgawonder 800x600
-
- == Converting .PCX files ==
-
- Commercial image editors are so much better that what I could
- develop on my time budget, that I decided to use one of them to
- create the image, and then simply convert the file. The images
- in IMAGEPCX.ZIP were done one afternoon for the most part. The
- ones named UNICORN (and variations) are used in the 'suite'
- program. The others are for the map. These (the map entries) were
- drawn on a 32x32 bit tile.
-
- The conversion process simply takes a file name (generally ending
- in .pcx, but not required); removes most of the header;
- decompresses it; and writes out a file with the same base name,
- but an extension of '.BMP'. In order to work with 'egamplot',
- the resulting file must be no larger than 64k bytes. As a
- byproduct, there will be 4 files created, one for each color
- plane. These are named 'p__1.dat' through 'p__4.dat'. They
- generally are of no real use.
-
- Unless, you are making a bit mask to plot a .BMP file through!
- The form of the bit mask is a just like another color plane. For
- this map program, I started with a tile that was simply black and
- white. The black areas were the four corners that I did not want
- displayed. I ran this .PCX through CPAINT and discarded the
- resulting .BMP. I then took one of the intermediate color plane
-
-
-
-
-
-
-
-
-
-
-
-
- files ('p__1.dat') and renamed it to 'mask.msk'. By using black
- (all zeros) and white (all ones) , I had the same pattern in all
- of the color planes.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-