home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / s / showbmp2.zip / SHOWBMP2.DOC < prev    next >
Text File  |  1993-03-28  |  5KB  |  93 lines

  1.  
  2.      Documentation For The ShowBMP2 Unit.
  3.      Compiled March 28, 1993.
  4.      Written By Mike Stone.
  5.  
  6.      The author hereby disclaims all warranties relating to this software,
  7.  whether expressed or implied, including without limitation any
  8.  implied warranties or merchantability or fitness for a particular
  9.  purpose. I will not be liable for any special, incidental, consequential,
  10.  indirect, or similar damages due to loss of data/damage to hardware or
  11.  any other reason, even if I have been advised of the possibility of
  12.  such damages.
  13.  
  14.      Moving right along.. this software is released as freeware and you
  15.  are welcome to distribute it to anyone and everyone, and to use it in
  16.  your own programs. (And don't worry about annoying "Please Register Me"
  17.  messages in the .tpu).
  18.  
  19.      This is the update for Show_BMP.zip, and comes with one new procedure
  20.  and one new function.
  21.      All the unit does is display 64768 byte bitmapped files in
  22.  320x200x256c mode. I was messing around with bitmaps and had this code
  23.  around so I thought i'd release it after I saw some messages about
  24.  people trying to display bitmaps. Its nothing monumental but it works and
  25.  does so fairly fast. Although you won't get the compression you have in
  26.  gif's and pcx's, binary's are faster on the display and are much easier to
  27.  manipulate. There is one new procedure you can all with show_bmp. Here
  28.  are all the procedures together:
  29.  
  30.      1) SetVideoMode (mode:byte);
  31.      2) ShowBmp      (BitmapToBeShown:string, Fastdisplay:boolean);
  32.      3) Fadeout      ;
  33.  
  34.  And one function:
  35.  
  36.      1) VGA256Exist:boolean;
  37.  
  38.      I included the SetVideomode procedure just in case you don't know how to
  39.  change the video mode to $13 (320x200x256c). Then all you have to do
  40.  once you have the correct mode, is call Showbmp with the filename of
  41.  the bitmapped you want displayed. So:
  42.  
  43.      SetVideoMode($13);
  44.      ShowBmp('Example.bin',false); {Call with the name of the Bmp to show}
  45.      Textmode(Co80);         {Don't forget this when ending your program!}
  46.  
  47.      Don't try initiating the .bgi drivers and calling ShowBmp! ShowBmp will
  48.  probably work with other resolutions other than 320x200, but you'll get a
  49.  smaller picture or really screw things up (so do it at your own risk!).
  50.      VGA256Exist is a function that will return "true" if the adaptor
  51.  supports VGA 256c. It isn't guarenteed to work, but on the few computers
  52.  I have tried it on, it has returned the correct results.
  53.      As for the new procedure, Fadeout will fade the picture out (obviously!)
  54.  and there is also a new feature. When displaying your bitmap, you
  55.  can display them the way described above, or this new way:
  56.  
  57.      SetVideoMode($13);
  58.      ShowBMP('Example.bin',true);
  59.      Textmode(Co80);
  60.  
  61.      You will find the screen write to be extremely quick, and coupled with
  62.  the fade, something you can dazzle your friends with (grin). Unfortunately
  63.  additional care must be taken to avoid unpleasant situations. Firstly,
  64.  using this routine this way, may not work with all adaptors, but should
  65.  with most standard models. Next, the double check in the unit to make sure
  66.  that Mode $13 has been initiated has been removed, so make sure you
  67.  call SetVideoMode.
  68.  
  69.      Now about the actual data files used. They MUST be 64768 bytes long, and
  70.  no error checking is made (neither is there any error checking when setting
  71.  the video mode to see if the users adapter can handle that mode). I came
  72.  across three utilities that can help in making the needed .bin files.
  73.      First there is the grab.exe utility that comes with Anivga11.zip.Although
  74.  it makes two files they can easily be combined, HOWEVER it seems that the
  75.  images they "grab" are sixteen copies of the picture captured (if you
  76.  understand what I mean), so although it makes for a nice special effect,
  77.  it isn't very useful (thought i'd mention it though in case someone tried
  78.  using it). Oh, and also it has a 3 byte .pic header, so that will really
  79.  mess things up.
  80.      Second I have heard of another grab.exe that makes .bin files (not .pic)
  81.  and that should work fine from what I know of it (although I have never
  82.  used it myself).
  83.      The third program is called intro.exe and comes with a supporting
  84.  utility called Gif2Bmp v1.0. I am not sure where I got it from but it
  85.  works ideally.
  86.  
  87.      One final note, the Unit was compiled with the $G+ directive, so
  88.  it will only run on 286+ CPU's. This was to make the fading routine
  89.  work properly (and quickly enough).
  90.  
  91.      Btw.. the unit is now written mainly in Assembly and compiled with
  92.  Turbo Pascal 6.0 and, once again, may not display properly on all VGA cards.
  93.