home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 14 / CDACTUAL.iso / cdactual / demobin / share / program / asm / RTGRAF.ZIP / MAP.ZIP / MAP.DOC < prev    next >
Encoding:
Text File  |  1990-06-19  |  3.2 KB  |  134 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.           MAP.C
  10.  
  11.           This is what this whole project was about 14 months ago.  I
  12.           wanted to make a game that worked on a hex grid board.  In order
  13.           to do that, I needed a way to draw images using a mask that
  14.           formed the 'hex'.
  15.  
  16.           This .ZIP contains a code for displaying a hex grid map (MAP.C);
  17.           a program to convert .PCX files into my RTGRAF format (CPAINT.C);
  18.           a program to display and image (with or without mask) (FLASH.C)
  19.           and two more .ZIP files.  These two ZIPs contain the RTGRAF form
  20.           of the images (IMAGEBMP.ZIP) and the .PCX form (IMAGEPCX.ZIP).
  21.  
  22.           There is one addition file found in IMAGEBMP that is not a pixmap
  23.           (.BMP) file.  This file is MASK.MSK; which is the mask used for
  24.           displaying the other images.
  25.  
  26.           == Running MAP.EXE ==
  27.  
  28.           Open the IMAGEBMP.ZIP in the current directory.  There will be
  29.           about 22 files.  Then simply run MAP.exe.  It will load the
  30.           images, then display the map in EGA mode 0x10.  If you want
  31.           another video mode, add the mode as the 1st argument:
  32.  
  33.                c:>map             = EGA mode 0x10 = 640x350
  34.                c:>map 0x12        = VGA mode 0x12 = 640x480
  35.                c:>map 18          = VGA mode 18(decimal = 0x12)
  36.                c:>map 0x53        = ATI Vgawonder 800x600
  37.  
  38.           == Converting .PCX files ==
  39.  
  40.           Commercial image editors are so much better that what I could
  41.           develop on my time budget, that I decided to use one of them to
  42.           create the image, and then simply convert the file.  The images
  43.           in IMAGEPCX.ZIP were done one afternoon for the most part. The
  44.           ones named UNICORN (and variations) are used in the 'suite'
  45.           program. The others are for the map. These (the map entries) were
  46.           drawn on a 32x32 bit tile.
  47.  
  48.           The conversion process simply takes a file name (generally ending
  49.           in .pcx, but not required); removes most of the header;
  50.           decompresses it; and writes out a file with the same base name,
  51.           but an extension of '.BMP'.  In order to work with 'egamplot',
  52.           the resulting file must be no larger than 64k bytes.  As a
  53.           byproduct, there will be 4 files created, one for each color
  54.           plane.  These are named 'p__1.dat' through 'p__4.dat'.  They
  55.           generally are of no real use.
  56.  
  57.           Unless, you are making a bit mask to plot a .BMP file through! 
  58.           The form of the bit mask is a just like another color plane.  For
  59.           this map program, I started with a tile that was simply black and
  60.           white.  The black areas were the four corners that I did not want
  61.           displayed.  I ran this .PCX through CPAINT and discarded the
  62.           resulting .BMP.  I then took one of the intermediate color plane
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.           files ('p__1.dat') and renamed it to 'mask.msk'.  By using black
  76.           (all zeros) and white (all ones) , I had the same pattern in all
  77.           of the color planes.
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.