home *** CD-ROM | disk | FTP | other *** search
/ TopWare 18: Liquid / Image.iso / liquid / top1002 / svgaqb10.txt < prev    next >
Text File  |  1993-06-04  |  194KB  |  6,127 lines

  1.  
  2.                                          
  3.           
  4.                                          
  5.           
  6.                                          
  7.           
  8.                                          
  9.           
  10.                                          
  11.           
  12.                                          
  13.           
  14.                                  REFERENCE MANUAL
  15.           
  16.                                          
  17.           
  18.                                       FOR THE
  19.           
  20.                                          
  21.           
  22.                                      SUPER VGA
  23.           
  24.                                          
  25.           
  26.                                  GRAPHICS LIBRARY
  27.           
  28.                                          
  29.           
  30.                                   TO BE USED WITH
  31.           
  32.                                          
  33.           
  34.                                MICROSOFT QUICKBASIC
  35.           
  36.                                          
  37.           
  38.  
  39.  
  40.  
  41.  
  42.             
  43.           1993 by Zephyr Software - Stephen L. Balkum and Daniel A. Sill
  44.           
  45.           All rights reserved.  No part of this book shall be reproduced
  46.           or transmitted by any means, electronic, mechanical,
  47.           photocopying, recording or otherwise, without written
  48.           permission from Zephyr Software - Stephen L. Balkum and Daniel
  49.           A. Sill.
  50.           
  51.           Although every effort has been made to insure the accuracy of
  52.           the material in this book, Zephyr Software, Stephen L. Balkum
  53.           and Daniel A. Sill assume no responsibility for errors or
  54.           omissions.  In addition no liability is assumed for damages
  55.           resulting from the use of the information contained herein.
  56.           
  57.           Printed in the United States of America
  58.           
  59.           Trademarks
  60.           
  61.           QuickBasic and QuickC are trademarks of the Microsoft
  62.           Corporation.
  63.           The Graphics Interchange Format (c) is the Copyright property
  64.           of CompuServe Incorporated.
  65.           GIF (sm) is a Service Mark property of Compuserve Incorporated.
  66.           All others are trademarks of their respective owners.
  67.           
  68.  
  69.  
  70.  
  71.  
  72.             
  73.                             SOFTWARE LICENSE AGREEMENT
  74.                
  75.                  By using this software, you agree to the terms of
  76.                                   this agreement.
  77.                
  78.                No warranties are expressed or implied.  In no event
  79.                shall Zephyr Software, Stephen L. Balkum or Daniel
  80.                A. Sill be held liable for damages resulting from
  81.                the use or misuse of this product, including but not
  82.                limited to implied warranties of fitness for a
  83.                particular purpose.
  84.                
  85.                Shareware version may be freely distributed as long
  86.                as all files stay together and are not modified in
  87.                any way.  No cost may be charged for the shareware
  88.                version beyond normal and reasonable copying and
  89.                distribution expenses.
  90.                
  91.                No products developed with this software shall be
  92.                sold unless this software has been registered with
  93.                Zephyr Software, Stephen L. Balkum or Daniel A.
  94.                Sill.
  95.                
  96.                At no time for any reason shall this software be
  97.                reverse engineered, decompiled or disassembled.
  98.                
  99.                This software may not be rented or leased.
  100.                
  101.                This software may be used only on one terminal or
  102.                one computer at any one given moment in time.  This
  103.                software may not be installed on a network of any
  104.                type.  Contact Zephyr Software, Stephen L. Balkum or
  105.                Daniel A. Sill for networking options.
  106.                
  107.                United States Government Restricted Rights:
  108.                Use, duplication or disclosure of this software and
  109.                documentation by the U.S. Government is subject to
  110.                the restrictions as set forth in subparagraph
  111.                (c)(1)(ii) of the Rights in Technical Data and
  112.                Computer Software clause at DFARS 252.227-7013.
  113.                Contractor/manufacturer is Stephen L. Balkum and
  114.                Daniel A. Sill, P.O. Box 7704, Austin, Texas 78713-
  115.                7704.
  116.                
  117.                The ownership of this software may be transferred as
  118.                long as Zephyr Software, Stephen L. Balkum or Daniel
  119.                A. Sill is notified in writing of the transfer date
  120.                and new owner.  The new owner must agree to this
  121.                contract.  The transfer must include all registered
  122.                updates and previously registered versions.  The
  123.                original owner may not retain any copies in any form
  124.                of the registered software or its documents.
  125.           
  126.  
  127.  
  128.  
  129.  
  130.             
  131.           INTRODUCTION
  132.           
  133.           We spent weeks searching the depths of the internet ftp sites
  134.           for a library that would allow the programmer full access to
  135.           the abilities of Super VGA.  We wanted the colors VGA could
  136.           provide and better resolution than EGA could provide.
  137.           Professionally developed libraries with this ability were
  138.           definitely out of our price range.  After our searches
  139.           continuously returned nothing, we decided to fill the apparent
  140.           void in the shareware market.
  141.           
  142.           Our searches did give two useful packages:  John Bridge's
  143.           VGAKIT and Finn Thoegersen's VGADOC.  We began with these two
  144.           works and developed a graphics library intended to allow the
  145.           programmer access to the huge world of high resolution
  146.           programming.
  147.           
  148.           On the surface the task appeared quite simple.  However, it
  149.           quickly became obvious that the routines in this library would
  150.           be required to affect extremely large amounts of data.
  151.           Operations must be quick to be successful.  Therefore, every
  152.           effort was made to create the fastest code possible - even at
  153.           the expense of size.  For this reason we opted to write code
  154.           with the 32 bit instructions of the 80386 and 80486 chips.  It
  155.           is our opinion that anyone with a hi-res card in a lesser
  156.           machine may have some priorities out of order. All routines
  157.           are written in assembly and use absolutely no floating point
  158.           values.  Anytime a real number was required, fixed point
  159.           notation was used.  In addition we attempted to write the
  160.           routines such that any reasonable argument passed can be
  161.           interpretted intelligently by the library.
  162.           
  163.           With the numerous Super VGA cards available and no well
  164.           established standard we chose John Bridge's identification and
  165.           bank switching routines as a beginning.  These two routines
  166.           have undergone some modification, but not enough to justify
  167.           copyrighting this portion of the library's code by Zephyr
  168.           Software.  We have no intentions of releasing our changes to
  169.           these routines into the public domain.  From that point onward
  170.           all code is original.  In some instances common algorithms
  171.           were researched and original code written according to that
  172.           algorithm.
  173.           
  174.           This Super VGA library gives the programmer transparent access
  175.           to sixteen different Super VGA cards including the VESA
  176.           standard.  The programmer only needs to verify that the end
  177.           user's card has been identified, but not which card was
  178.           recognized.  After proper identification, all functions react
  179.           in exactly the same fashion.  The library contains functions
  180.           to draw all of the major primitives.  In addition there are
  181.           functions that modify the screen palette, write text on the
  182.           screen with a choice of fonts and modify the reaction of the
  183.           primitives.  Identification routines include not only the
  184.           video card, but also the amount of video memory, type of
  185.           
  186.  
  187.  
  188.  
  189.  
  190.   
  191.           processor and installed pointing devices.  Advanced functions
  192.           provide full mouse support (when used with a Microsoft
  193.           compatible driver) and joystick support.  Finally, support for
  194.           two dimensional and three dimensional coordinate systems is
  195.           provided including rotation, translation, scaling and projection.
  196.           
  197.           Development is ongoing.  We wrote this library to easily
  198.           interact with Microsoft QuickBasic.  Versions for Microsoft C
  199.           and Professional Basic exist as well.  We plan to release
  200.           updates with new functions and faster code in the future.
  201.           
  202.  
  203.  
  204.  
  205.  
  206.             
  207.           SUGGESTED METHODS FOR USING THIS LIBRARY
  208.           
  209.           USE WITH MICROSOFT QUICKBASIC
  210.           
  211.           We assume that the programmer is familiar with all of the
  212.           capabilities of the Microsoft QuickBasic compiler and
  213.           environment.  Understanding of the lib and link commands is
  214.           encouraged as well as the use of quicklibraries.  However, to
  215.           ensure you are able to get up and running quickly, the
  216.           following commands may be helpful:
  217.           
  218.           To create a quicklibrary from SVGAQB10.LIB, type the command:
  219.           
  220.                  LINK /QU SVGAQB10.LIB, SVGAQB10.QLB, NUL, BQLB##
  221.           
  222.           where ## is the version of QuickBasic you are using (45 for
  223.           QuickBasic version 4.5).
  224.           
  225.           If you wish to create a quicklibrary from SVGAQB10.LIB and
  226.           additional libraries, type the command:
  227.           
  228.                LINK /QU SVGAQB10.LIB+????.LIB (continue as desired),
  229.                              SVGAQB10.QLB, NUL, BQLB##
  230.           
  231.           where ## is the version of QuickBasic you are using (45 for
  232.           QuickBasic version 4.5) and ????.LIB represents the additional
  233.           desired libraries.
  234.           
  235.           After the quicklibrary has been created, you should start
  236.           QuickBasic by typing:
  237.           
  238.                                   QB /L SVGAQB10
  239.           
  240.           This will tell the compilier to use the SVGAQB10.QLB
  241.           quicklibrary when running and when creating an executable.
  242.           
  243.           VERIFICATION OF A COMPUTER'S HARDWARE
  244.           
  245.           It is strongly recommended that any program written with this
  246.           library first verifies that the computer is a 80386 or better
  247.           by calling the whichcpu function.  Many of the library's
  248.           functions use 386 exclusive code which may cause a computer
  249.           with a lesser processor to crash.  In addition whichmouse must
  250.           be called before calling any of the mouse functions.  Lastly,
  251.           it is recommended that whichjoystick be called before a
  252.           program uses the joystick routines.
  253.           
  254.           It is required that a program call whichvga prior to any
  255.           function that communicates with the video card.  If whichvga
  256.           returns a zero for unknown card type, the program should not
  257.           call any graphics function.  Without proper identification of
  258.           the video card any graphics function will likely cause a
  259.           system failure.  It is recommended, although not necessary,
  260.           that a program call whichmem prior to calling any res
  261.           
  262.  
  263.  
  264.  
  265.  
  266.   
  267.           function.  Although the video card was properly identified, it
  268.           may not have sufficient onboard memory to support the desired
  269.           resolution.  As a second check the res functions will do
  270.           nothing if the video card has not been identified or if the
  271.           video card does not support the specified resolution for
  272.           memory or hardware reasons.
  273.           
  274.           USE OF 2-D AND 3-D FUNCTIONS
  275.           
  276.           In the interest of speed, the 2-D and 3-D functions were
  277.           written to best work on multiple points at once.  We refer to
  278.           these functions as object-oriented.  This means that the
  279.           points defining an object (a box, a house, etc.) should be
  280.           contained within one array and calls to the functions should
  281.           act on all of the points in the array.  Calls to functions
  282.           have a high speed overhead, therefore, placing more than one
  283.           object in the same array and passing the entire array to the
  284.           functions can be beneficial.  However, these functions will
  285.           work on a single point as well.
  286.           
  287.           Another consequence of our object-oriented 2-D and 3-D
  288.           functions is the use of the scaling functions.  When scaling
  289.           objects, we recommend the object be defined about the origin.
  290.           D2scale and d3scale both work with respect to the origin.
  291.           This eliminates a significant number of translations that
  292.           would otherwise be required by having a definable scale
  293.           origin.  For example, to draw two boxes, one scaled by one-
  294.           half of the other, each rotated by 45 degrees at the center of
  295.           the screen, the recommended procedure is as follows:
  296.           
  297.             define an array box containing the 2-D points: (100, 100),
  298.                (-100, 100), (-100, -100), (100, -100), (note: the box is
  299.                centered about the origin.)
  300.             rotate box by 45 degrees about (0, 0) and place the output
  301.                in rbox,
  302.             scale rbox by 50% (scaling factor would be 128, or 80 hex)
  303.                and place output in srbox,
  304.             translate rbox to the center of the screen - a translation
  305.                of 320, 240 in 640x480 resolution - and place output in
  306.                trbox,
  307.             translate srbox to the center of the screen - same
  308.                translation as for rbox - and place output in tsrbox,
  309.             draw trbox and tsrbox on the screen.
  310.           
  311.           Notice that by defining the box centered about the origin the
  312.           translation values were extremely intuitive.  Also notice that
  313.           if we had scaled the second box after the translation, it
  314.           would have been draw in the upper left quadrant of the screen
  315.           instead of the center.
  316.           
  317.           In mathematics and many sciences it is customary that in a 2-D
  318.           coordinate system the Y axis increases upward and the X axis
  319.           increases to the right.  The computer industry has decided
  320.           that the Y axis should increase downward.  The 2-D functions
  321.           are not affected by the choice in coordinate systems.
  322.           
  323.  
  324.  
  325.  
  326.  
  327.   
  328.           However, it is important to remember that a positive rotation
  329.           in d2rotate rotates from the positive X axis to the positive Y
  330.           axis.  Therefore, when using mathematical conventions, a
  331.           positive rotation moves counter-clockwise.  On the computer
  332.           screen a positive rotation moves clockwise.
  333.           
  334.           The 3-D coordinate system follows the mathematical conventions
  335.           by using a right-handed coordinate system.  The easiest way to
  336.           visualize this coordinate system is by using your right hand.
  337.           Place your index finger and thumb at a right angle to one
  338.           another as if to form an imaginary pistol.  Now place your
  339.           second finger at a right angle to your index finger.  It
  340.           should be at a right angle to your thumb as well.  This
  341.           represents the three axes.  The index finger is the X axis,
  342.           the second finger is the Y axis and the thumb is the Z axis.
  343.           The easiest way to remember rotation directions in this system
  344.           is cyclically.  A positive rotation about the X axis rotates
  345.           the Y axis into the Z axis.  A positive rotation about the Y
  346.           axis rotates the Z axis into the X axis.  A positive rotation
  347.           about the Z axis rotates the X axis into the Y axis.
  348.           
  349.           After doing all necessary 3-D transformations, projection onto
  350.           the 2-D computer screen is required.  Although the computer
  351.           screen's coordinate system does not follow mathematical
  352.           conventions, the d3project function automatically takes care
  353.           of all conversions.  The programmer only needs to draw the
  354.           resulting lines on the screen.
  355.           
  356.           THE CONCEPT OF SPRITE GRAPHICS
  357.           
  358.           The key to sprite graphics is the assumption that only a small
  359.           percentage of the pixels in a graphics block are used by the
  360.           animation and the remaining pixels should be treated as
  361.           transparent, revealing the background behind the sprite.  The
  362.           sprite routines in this library only act on non-transparent
  363.           colors, thus, saving time by ignoring a large number of
  364.           pixels.  When retrieving the background for a sprite, prior
  365.           knowledge of the sprite itself permits obtaining background
  366.           only where it is necessary.
  367.           
  368.           The following steps outline an example for the recommended
  369.           procedure for using the sprite functions:
  370.           
  371.             1.draw the sprite on the screen - a white stick figure on a
  372.                black background, for example
  373.             2.use blkget to place the sprite in an array stick
  374.             3.use spritegap to simultaneously retrieve the background
  375.                into backstick and place stick on the screen, declaring
  376.                black as the transparent color
  377.             4.use spriteput to replace the background backstick in the
  378.                same location as step 3
  379.             5.repeat steps 3 and 4 as many times and in as many
  380.                locations as desired
  381.           
  382.           CONVENTIONS USED IN THIS MANUAL
  383.           
  384.  
  385.  
  386.  
  387.  
  388.   
  389.           
  390.           All parameters, other than strings, passed to and from
  391.           functions and procedures in this QuickBasic library are short
  392.           (two byte) integers.  No floating point values are used.
  393.           
  394.           Whenever a pixel is written on the screen, a mode is required.
  395.           Unless otherwise noted, there are four possible modes:  set,
  396.           xor, or and and.  These modes are represented by the numbers
  397.           one through four respectively.  Technically, set is the
  398.           fastest mode.  However, xor maybe the most useful.  Xor'ing a
  399.           point twice with the same color returns the original color.
  400.           This can be used to cover and uncover graphics.  In addition
  401.           when a reference to a color index is made, only values between
  402.           and including 0 and 255 are valid.  Any integer will work, but
  403.           only the lowest eight bits are recognized.
  404.           
  405.  
  406.  
  407.  
  408.  
  409.             
  410.           BLKGET
  411.             
  412.           ° Syntax
  413.             
  414.             BLKGET X1, Y1, X2, Y2, GfxBlk
  415.             
  416.           ° Input
  417.             
  418.             X1, Y1 - top left corner of block
  419.             X2, Y2 - bottom right corner of block
  420.             GfxBlk - integer destination array
  421.             
  422.           ° Output
  423.             
  424.             If declared a function, Blkget returns 1 if successful, 0 if
  425.             failed.
  426.             
  427.           ° Usage
  428.             
  429.             Blkget stores the pixel data contained within the block
  430.             defined by (X1, Y1)-(X2, Y2) in the variable referenced by
  431.             GfxBlk.  GfxBlk must be dimensioned as a short integer array
  432.             with a size in integers equal to
  433.           
  434.                            [(X2-X1+1)*(Y2-Y1+1)] / 2+3.
  435.                                          
  436.             Note, however, that GfxBlk can be quite large.  If the size
  437.             of GfxBlk is insufficient, Blkget will overwrite any data in
  438.             memory contained beyond GfxBlk and may possibly cause the
  439.             system to crash.  Blkget enforces X2X1 and Y2Y1.  Also, the
  440.             coordinates must be valid on the screen at the current
  441.             resolution.
  442.             
  443.           ° See Also
  444.             
  445.             BLKPUT, GETLASTSTRING, SPRITEGAP, SPRITEPUT
  446.             
  447.           ° Example
  448.             
  449.             REM PLACES 1/4 OF A CIRCLE AT THE CENTER OF THE SCREEN
  450.             REM $INCLUDE: 'SVGAQB10.BI'
  451.             DEFINT A-Z
  452.             
  453.             DIM BLOCKDATA(0 TO 483) AS INTEGER
  454.             
  455.             VMODE = VIDEOMODESET
  456.             IF WHICHVGA = 0 THEN STOP
  457.             RES640
  458.             
  459.             DRWCIRCLE 1, 10, 30, 30, 20
  460.             FILLAREA 30, 30, 10, 7
  461.             
  462.             BLKGET 0, 0, 30, 30, BLOCKDATA(0)
  463.             BLKPUT 1, 320, 240, BLOCKDATA(0)
  464.           
  465.  
  466.  
  467.  
  468.  
  469.   
  470.             
  471.             WHILE INKEY$ = ""
  472.             WEND
  473.             VIDEOMODESET VMODE
  474.             END
  475.             
  476.           
  477.  
  478.  
  479.  
  480.  
  481.             
  482.           BLKPUT
  483.             
  484.           ° Syntax
  485.             
  486.             BLKPUT Mode, X, Y, GfxBlk
  487.             
  488.           ° Input
  489.             
  490.             Mode - pixel write mode (set=1, xor=2, or=3, and=4)
  491.             X, Y - location for top left corner of block
  492.             GfxBlk - integer source array
  493.           
  494.           ° Output
  495.             
  496.             If declared as a function, Blkput returns 1 if successful, 0
  497.             if failed.
  498.             
  499.           ° Usage
  500.             
  501.             Blkput places the pixel data contained in the variable
  502.             referenced by GfxBlk on the screen.  The top, left corner of
  503.             the block is specified by (X, Y).  Any (X, Y) is acceptable
  504.             and any portion of the block that lies outside of the
  505.             currently defined viewport will not be drawn.
  506.             
  507.           ° See Also
  508.             
  509.             BLKGET, GETLASTSTRING, SPRITEGAP, SPRITEPUT, GIFPUT, SETVIEW
  510.             
  511.           ° Example
  512.             
  513.             REM PLACES 1/4 OF A CIRCLE AT THE CENTER OF THE SCREEN
  514.             REM $INCLUDE: 'SVGAQB10.BI'
  515.             DEFINT A-Z
  516.             
  517.             DIM BLOCKDATA(0 TO 483) AS INTEGER
  518.             
  519.             VMODE = VIDEOMODEGET
  520.             IF WHICHVGA = 0 THEN STOP
  521.             RES640
  522.             
  523.             DRWCIRCLE 1, 10, 30, 30, 20
  524.             FILLAREA 30, 30, 10, 7
  525.             
  526.             BLKGET 0, 0, 30, 30, BLOCKDATA(0)
  527.             BLKPUT 1, 320, 240, BLOCKDATA(0)
  528.             
  529.             WHILE INKEY$ = ""
  530.             WEND
  531.             VIDEOMODESET VMODE
  532.             END
  533.             
  534.           
  535.  
  536.  
  537.  
  538.  
  539.             
  540.           D2ROTATE
  541.             
  542.           ° Syntax
  543.             
  544.             D2ROTATE NumPoints, Xorigin, Yorigin, Angle, InArray,
  545.             OutArray
  546.             
  547.           ° Input
  548.             
  549.             NumPoints - number of points to be rotated
  550.             Xorigin, Yorigin - center of rotation
  551.             Angle - angle of rotation about center
  552.             InArray - P2Dtype array containing points to rotate
  553.             OutArray - P2Dtype array holding rotated values
  554.             
  555.           ° Output
  556.             
  557.             no value returned
  558.             
  559.           ° Usage
  560.             
  561.             D2rotate takes the two dimensional points given in InArray
  562.             and rotates them by the specified angle about Xorigin,
  563.             Yorigin.  The results are returned in OutArray which can be
  564.             the same as InArray.  A positive angle causes a clockwise
  565.             rotation on the screen, from the positive X axis to the
  566.             positive Y axis.
  567.             
  568.           ° See Also
  569.             
  570.             D2SCALE, D2TRANSLATE
  571.             
  572.           ° Example
  573.             
  574.             REM ROTATE A TRIANGLE ABOUT ONE CORNER
  575.             REM $INCLUDE: 'SVGAQB10.BI'
  576.             DEFINT A-Z
  577.             
  578.             DIM TRIO(1 TO 3) AS P2DType
  579.             DIM TRI(1 TO 3) AS P2DType
  580.             DIM TRI2(1 TO 3) AS P2DType
  581.             
  582.             TRIO(1).X = 0
  583.             TRIO(1).Y = 0
  584.             TRIO(2).X = -80
  585.             TRIO(2).Y = 60
  586.             TRIO(3).X = 80
  587.             TRIO(3).Y = 60
  588.             
  589.             VMODE = VIDEOMODEGET
  590.             IF WHICHVGA = 0 THEN STOP
  591.             RES640
  592.             
  593.             GOSUB DRWTRI
  594.           
  595.  
  596.  
  597.  
  598.  
  599.   
  600.             
  601.             FOR I = 0 TO 360 STEP 2
  602.             D2ROTATE 3, 0, 0, I, TRIO(1).X, TRI(1).X
  603.             GOSUB DRWTRI
  604.             SDELAY 2
  605.             GOSUB ERTRI
  606.             NEXT I
  607.             GOSUB DRWTRI
  608.             
  609.             WHILE INKEY$ = ""
  610.             WEND
  611.             VIDEOMODESET VMODE
  612.             END
  613.             
  614.             DRWTRI:
  615.             D2TRANSLATE 3, 320, 240, TRI(1).X, TRI2(1).X
  616.             DRWLINE 1, 10, TRI2(1).X, TRI2(1).Y, TRI2(2).X, TRI2(2).Y
  617.             DRWLINE 1, 10, TRI2(2).X, TRI2(2).Y, TRI2(3).X, TRI2(3).Y
  618.             DRWLINE 1, 10, TRI2(3).X, TRI2(3).Y, TRI2(1).X, TRI2(1).Y
  619.             RETURN
  620.             
  621.             ERTRI:
  622.             D2TRANSLATE 3, 320, 240, TRI(1).X, TRI2(1).X
  623.             DRWLINE 1, 0, TRI2(1).X, TRI2(1).Y, TRI2(2).X, TRI2(2).Y
  624.             DRWLINE 1, 0, TRI2(2).X, TRI2(2).Y, TRI2(3).X, TRI2(3).Y
  625.             DRWLINE 1, 0, TRI2(3).X, TRI2(3).Y, TRI2(1).X, TRI2(1).Y
  626.             RETURN
  627.           
  628.  
  629.  
  630.  
  631.  
  632.             
  633.           D2SCALE
  634.             
  635.           ° Syntax
  636.             
  637.             D2SCALE NumPoints, ScaleX, ScaleY, InArray, OutArray
  638.             
  639.           ° Input
  640.             
  641.             NumPoints - number of points to scale
  642.             ScaleX - scale factor along X axis
  643.             ScaleY - scale factor along Y axis
  644.             InArray - P2Dtype array containing points to scale
  645.             OutArray - P2Dtype array holding scaled values
  646.             
  647.           ° Output
  648.             
  649.             no value returned
  650.             
  651.           ° Usage
  652.             
  653.             D2scale multiplies each coordinate in the two dimensional
  654.             array InArray by the corresponding scale factor ScaleX or
  655.             ScaleY.  The results are stored in OutArray which can be the
  656.             same as InArray.  A scale factor of 256 (100 hex) is
  657.             considered 100 percent and results in no change.  Therefore,
  658.             128 (80 hex) reduces values by one half and 512 (200 hex)
  659.             doubles values.
  660.             
  661.           ° See Also
  662.             
  663.             D2ROTATE, D2TRANSLATE
  664.             
  665.           ° Example
  666.             
  667.             REM SCALE A TRIANGLE
  668.             REM $INCLUDE: 'SVGAQB10.BI'
  669.             DEFINT A-Z
  670.             
  671.             DIM TRIO(1 TO 3) AS P2DType
  672.             DIM TRI(1 TO 3) AS P2DType
  673.             DIM TRI2(1 TO 3) AS P2DType
  674.             
  675.             TRIO(1).X = 0
  676.             TRIO(1).Y = 0
  677.             TRIO(2).X = -80
  678.             TRIO(2).Y = 60
  679.             TRIO(3).X = 80
  680.             TRIO(3).Y = 60
  681.             
  682.             VMODE = VIDEOMODEGET
  683.             IF WHICHVGA = 0 THEN STOP
  684.             RES640
  685.             
  686.             GOSUB DRWTRI
  687.           
  688.  
  689.  
  690.  
  691.  
  692.   
  693.             
  694.             FOR I = 256 TO 512 STEP 4
  695.             D2SCALE 3, I, I, TRIO(1).X, TRI(1).X
  696.             GOSUB DRWTRI
  697.             SDELAY 2
  698.             GOSUB ERTRI
  699.             NEXT I
  700.             
  701.             FOR I = 512 TO 128 STEP -4
  702.             D2SCALE 3, I, I, TRIO(1).X, TRI(1).X
  703.             GOSUB DRWTRI
  704.             SDELAY 2
  705.             GOSUB ERTRI
  706.             NEXT I
  707.             
  708.             FOR I = 128 TO 256 STEP 4
  709.             D2SCALE 3, I, I, TRIO(1).X, TRI(1).X
  710.             GOSUB DRWTRI
  711.             SDELAY 2
  712.             GOSUB ERTRI
  713.             NEXT I
  714.             
  715.             GOSUB DRWTRI
  716.             
  717.             WHILE INKEY$ = ""
  718.             WEND
  719.             VIDEOMODESET VMODE
  720.             END
  721.             
  722.             DRWTRI:
  723.             D2TRANSLATE 3, 320, 240, TRI(1).X, TRI2(1).X
  724.             DRWLINE 1, 10, TRI2(1).X, TRI2(1).Y, TRI2(2).X, TRI2(2).Y
  725.             DRWLINE 1, 10, TRI2(2).X, TRI2(2).Y, TRI2(3).X, TRI2(3).Y
  726.             DRWLINE 1, 10, TRI2(3).X, TRI2(3).Y, TRI2(1).X, TRI2(1).Y
  727.             RETURN
  728.             
  729.             ERTRI:
  730.             D2TRANSLATE 3, 320, 240, TRI(1).X, TRI2(1).X
  731.             DRWLINE 1, 0, TRI2(1).X, TRI2(1).Y, TRI2(2).X, TRI2(2).Y
  732.             DRWLINE 1, 0, TRI2(2).X, TRI2(2).Y, TRI2(3).X, TRI2(3).Y
  733.             DRWLINE 1, 0, TRI2(3).X, TRI2(3).Y, TRI2(1).X, TRI2(1).Y
  734.             RETURN
  735.           
  736.  
  737.  
  738.  
  739.  
  740.             
  741.           D2TRANSLATE
  742.             
  743.           ° Syntax
  744.             
  745.             D2TRANSLATE NumPoints, TransX, TransY, InArray, OutArray
  746.             
  747.           ° Input
  748.             
  749.             NumPoints - number of points to be translated
  750.             TransX - distance to translate along X axis
  751.             TransY - distance to translate along Y axis
  752.             InArray - P2Dtype array containing points to translate
  753.             OutArray - P2Dtype array holding translated values
  754.             
  755.           ° Output
  756.             
  757.             no value returned
  758.             
  759.           ° Usage
  760.             
  761.             D2translate takes the two dimensional points given in
  762.             InArray and translates them by the specified number of
  763.             pixels along each axis.  The results are returned in
  764.             OutArray which can be the same as InArray.
  765.             
  766.           ° See Also
  767.             
  768.             D2ROTATE, D2SCALE
  769.             
  770.           ° Example
  771.             
  772.             REM TRANSLATE A TRIANGLE
  773.             REM $INCLUDE: 'SVGAQB10.BI'
  774.             DEFINT A-Z
  775.             
  776.             DIM TRIO(1 TO 3) AS P2DType
  777.             DIM TRI(1 TO 3) AS P2DType
  778.             DIM TRI2(1 TO 3) AS P2DType
  779.             
  780.             TRIO(1).X = 0
  781.             TRIO(1).Y = 0
  782.             TRIO(2).X = -80
  783.             TRIO(2).Y = 60
  784.             TRIO(3).X = 80
  785.             TRIO(3).Y = 60
  786.             
  787.             VMODE = VIDEOMODEGET
  788.             IF WHICHVGA = 0 THEN STOP
  789.             RES640
  790.             
  791.             GOSUB DRWTRI
  792.             
  793.             FOR I = 0 TO 100 STEP 4
  794.             D2TRANSLATE 3, I, I, TRIO(1).X, TRI(1).X
  795.           
  796.  
  797.  
  798.  
  799.  
  800.   
  801.             GOSUB DRWTRI
  802.             SDELAY 2
  803.             GOSUB ERTRI
  804.             NEXT I
  805.             
  806.             FOR I = 100 TO 0 STEP -4
  807.             D2TRANSLATE 3, I, I, TRIO(1).X, TRI(1).X
  808.             GOSUB DRWTRI
  809.             SDELAY 2
  810.             GOSUB ERTRI
  811.             NEXT I
  812.             
  813.             GOSUB DRWTRI
  814.             
  815.             WHILE INKEY$ = ""
  816.             WEND
  817.             VIDEOMODESET VMODE
  818.             END
  819.             
  820.             DRWTRI:
  821.             D2TRANSLATE 3, 320, 240, TRI(1).X, TRI2(1).X
  822.             DRWLINE 1, 10, TRI2(1).X, TRI2(1).Y, TRI2(2).X, TRI2(2).Y
  823.             DRWLINE 1, 10, TRI2(2).X, TRI2(2).Y, TRI2(3).X, TRI2(3).Y
  824.             DRWLINE 1, 10, TRI2(3).X, TRI2(3).Y, TRI2(1).X, TRI2(1).Y
  825.             RETURN
  826.             
  827.             ERTRI:
  828.             D2TRANSLATE 3, 320, 240, TRI(1).X, TRI2(1).X
  829.             DRWLINE 1, 0, TRI2(1).X, TRI2(1).Y, TRI2(2).X, TRI2(2).Y
  830.             DRWLINE 1, 0, TRI2(2).X, TRI2(2).Y, TRI2(3).X, TRI2(3).Y
  831.             DRWLINE 1, 0, TRI2(3).X, TRI2(3).Y, TRI2(1).X, TRI2(1).Y
  832.             RETURN
  833.           
  834.  
  835.  
  836.  
  837.  
  838.             
  839.           D3PROJECT
  840.           
  841.           ° Syntax
  842.           
  843.             ret = D3PROJECT NumPoints, ProjParams, InArray, OutArray
  844.             
  845.           ° Input
  846.           
  847.             NumPoints - number of points to be projected
  848.             ProjParams - structure containing parameters used in projection
  849.               EyeX, EyeY, EyeZ - 3D location of viewer
  850.               ScrD - distance from viewer to projection screen
  851.               Theta - angle from positive 3D X axis to viewing direction
  852.               Phi - angle from positive 3D Z axis to viewing direction
  853.             InArray - P3Dtype array containing points to project
  854.             OutArray - P2Dtype array holding projected values
  855.           
  856.           ° Output
  857.           
  858.             Returns 1 if successful, 0 if any one point failed.
  859.           
  860.           ° Usage
  861.                       +Z axis 
  862.                          |
  863.                          |                   /\
  864.                          |                  /  \
  865.                          |            !     \ * \
  866.                          |            !......X: /
  867.                          |            ! Phi / \/
  868.                          |            !    /  :
  869.                          |            !   /   :
  870.                          |            !  /    :
  871.                          |       EyeX ! /ScrD :
  872.                          |       EyeY !/      :
  873.                          |       EyeZ *- - - -:- - - - - 
  874.                          |           / `      : 
  875.                          |          /   `     :
  876.                          |         /      `   :
  877.                          |        /      ---` :
  878.                          |       /___----            
  879.                          |      /     Theta
  880.                          |
  881.                          |________________________________________+Y axis
  882.                         /
  883.                        /
  884.                       /
  885.                      /
  886.                     /
  887.                    /
  888.                   /
  889.                  /
  890.                 /
  891.                /
  892.             +X axis
  893.           
  894.  
  895.  
  896.  
  897.  
  898.   
  899.             
  900.             D3project projects a specified number, NumPoints, of three
  901.             dimensional points starting at InArray into two dimensions
  902.             according to the parameters in ProjParams.  The two
  903.             dimensional points are stored in OutArray.  The location of
  904.             the viewer in this three dimensional space is given by
  905.             EyeX, EyeY, EyeZ in the ProjParams structure.  The
  906.             direction the viewer is facing is specified with ScrD,
  907.             Theta, Phi in the ProjParams structure using spherical
  908.             coordinates.  A virtual set of axes parallel to the true
  909.             axes are placed at the viewer's location.  ScrD is the
  910.             distance from the viewer to the center of the projection
  911.             screen, ie. the currently defined viewport on the monitor's
  912.             screen.  Theta is the angle in the virtual X-Y plane from
  913.             the virtual X axis to the projection screen.  Positive
  914.             angles rotate clockwise in the X-Y plane.  Lastly, the
  915.             angle of elevation above or below the virtual X-Y plane is
  916.             given by Phi.  Positive angles direct viewing above the
  917.             plane; negative below.
  918.             
  919.             If a point is projected to a location behind the viewer, ie.
  920.             on the side of the viewer opposite the projection screen,
  921.             D3project returns a zero indicating one or more failed
  922.             points.  The returned values of the X and Y for failed
  923.             points will be -32768 to make them easily identified.
  924.             
  925.           ° See Also
  926.           
  927.             D3ROTATE, D3TRANSLATE, D3SCALE, SETVIEW
  928.           
  929.           ° Example
  930.             
  931.             REM DRAW A CUBE AT THE CENTER OF THE SCREEN
  932.             REM $INCLUDE: 'SVGAQB10.BI'
  933.             DEFINT A-Z
  934.             
  935.             DIM CUBE(1 TO 8) AS P3DType
  936.             DIM PLOT(1 TO 8) AS P2DType
  937.             DIM PROJPARAMS AS PROJType
  938.             
  939.             CUBE(1).X =  100 : CUBE(1).Y = -100 : CUBE(1).Z =  100
  940.             CUBE(2).X =  100 : CUBE(2).Y = -100 : CUBE(2).Z = -100
  941.             CUBE(3).X =  100 : CUBE(3).Y =  100 : CUBE(3).Z = -100
  942.             CUBE(4).X =  100 : CUBE(4).Y =  100 : CUBE(4).Z =  100
  943.             CUBE(5).X = -100 : CUBE(5).Y = -100 : CUBE(5).Z =  100
  944.             CUBE(6).X = -100 : CUBE(6).Y = -100 : CUBE(6).Z = -100
  945.             CUBE(7).X = -100 : CUBE(7).Y =  100 : CUBE(7).Z = -100
  946.             CUBE(8).X = -100 : CUBE(8).Y =  100 : CUBE(8).Z =  100
  947.             
  948.             VMODE = VIDEOMODEGET
  949.             IF WHICHVGA = 0 THEN STOP
  950.             RES640
  951.             
  952.             PROJPARAMS.EYEX = -1040
  953.             PROJPARAMS.EYEY = -600
  954.           
  955.  
  956.  
  957.  
  958.  
  959.   
  960.             PROJPARAMS.EYEZ = -1200
  961.             PROJPARAMS.SCRD = 1700
  962.             PROJPARAMS.THETA = 30
  963.             PROJPARAMS.PHI = 45
  964.             
  965.             DUMMY = D3PROJECT 8, PROJPARAMS.EYEX, CUBE(1).X, PLOT(1).X
  966.             GOSUB DRWCUBE
  967.             
  968.             WHILE INKEY$ = ""
  969.             WEND
  970.             VIDEOMODESET VMODE
  971.             END
  972.             
  973.             DRWCUBE:
  974.             FOR J=1 TO 3
  975.             DRWLINE 1, 10, PLOT(J).X, PLOT(J).Y, PLOT(J+1).X,
  976.             PLOT(J+1).Y
  977.             NEXT J
  978.             DRWLINE 1, 10, PLOT(4).X, PLOT(4).Y, PLOT(1).X, PLOT(1).Y
  979.             FOR J=5 TO 7
  980.             DRWLINE 1, 10, PLOT(J).X, PLOT(J).Y, PLOT(J+1).X,
  981.             PLOT(J+1).Y
  982.             NEXT J
  983.             DRWLINE 1, 10, PLOT(8).X, PLOT(8).Y, PLOT(5).X, PLOT(5).Y
  984.             FOR J=1 TO 4
  985.             DRWLINE 1, 10, PLOT(J).X, PLOT(J).Y, PLOT(J+4).X,
  986.             PLOT(J+4).Y
  987.             NEXT J
  988.             RETURN
  989.           
  990.  
  991.  
  992.  
  993.  
  994.             
  995.           D3ROTATE
  996.             
  997.           ° Syntax
  998.             
  999.             D3ROTATE NumPoints, X, Y, Z, AngleZ, AngleY, AngleX,
  1000.             InArray, OutArray
  1001.             
  1002.           ° Input
  1003.             
  1004.             NumPoints - number of points to be rotated
  1005.             X, Y, Z - center of rotation
  1006.             AngleZ - angle of rotation about the Z axis
  1007.             AngleY - angle of rotation about the Y axis
  1008.             AngleX - angle of rotation about the X axis
  1009.             InArray - P3Dtype array containing points to rotate
  1010.             OutArray - P3Dtype array holding rotated values
  1011.             
  1012.           ° Output
  1013.             
  1014.             no value returned
  1015.             
  1016.           ° Usage
  1017.             
  1018.             D3rotate takes the three dimensional points given in InArray
  1019.             and rotates them by the specified angles about Xorigin,
  1020.             Yorigin, Zorigin.  The results are returned in OutArray
  1021.             which can be the same as InArray.  A virtual set of axes are
  1022.             placed at the origin of rotation and rotation takes place
  1023.             about these axes.  A positive angle causes a counter-
  1024.             clockwise rotation from the positive X axis to the positive
  1025.             Y axis.
  1026.             
  1027.           ° See Also
  1028.             
  1029.             D3PROJECT, D3SCALE, D3TRANSLATE
  1030.             
  1031.           ° Example
  1032.             
  1033.             REM ROTATE A CUBE AT THE CENTER OF THE SCREEN
  1034.             REM $INCLUDE: 'SVGAQB10.BI'
  1035.             DEFINT A-Z
  1036.             
  1037.             DIM CUBE(1 TO 8) AS P3DType
  1038.             DIM RCUBE(1 TO 8) AS P3DType
  1039.             DIM PLOT(1 TO 8) AS P2DType
  1040.             DIM PROJPARAMS AS PROJType
  1041.             
  1042.             CUBE(1).X =  100 : CUBE(1).Y = -100 : CUBE(1).Z =  100
  1043.             CUBE(2).X =  100 : CUBE(2).Y = -100 : CUBE(2).Z = -100
  1044.             CUBE(3).X =  100 : CUBE(3).Y =  100 : CUBE(3).Z = -100
  1045.             CUBE(4).X =  100 : CUBE(4).Y =  100 : CUBE(4).Z =  100
  1046.             CUBE(5).X = -100 : CUBE(5).Y = -100 : CUBE(5).Z =  100
  1047.             CUBE(6).X = -100 : CUBE(6).Y = -100 : CUBE(6).Z = -100
  1048.             CUBE(7).X = -100 : CUBE(7).Y =  100 : CUBE(7).Z = -100
  1049.           
  1050.  
  1051.  
  1052.  
  1053.  
  1054.   
  1055.             CUBE(8).X = -100 : CUBE(8).Y =  100 : CUBE(8).Z =  100
  1056.             
  1057.             VMODE = VIDEOMODEGET
  1058.             IF WHICHVGA = 0 THEN STOP
  1059.             RES640
  1060.             
  1061.             PROJPARAMS.EYEX = -1040
  1062.             PROJPARAMS.EYEY = -600
  1063.             PROJPARAMS.EYEZ = -1200
  1064.             PROJPARAMS.SCRD = 1700
  1065.             PROJPARAMS.THETA = 30
  1066.             PROJPARAMS.PHI = 45
  1067.             
  1068.             FOR I = 0 TO 360 STEP 5
  1069.             D3ROTATE 8, 0, 0, 0, I, I, I, CUBE(1).X, RCUBE(1).X
  1070.             DUMMY = D3PROJECT 8, PROJPARAMS.EYEX, RCUBE(1).X, PLOT(1).X
  1071.             GOSUB DRWCUBE
  1072.             SDELAY 2
  1073.             GOSUB DRWCUBE
  1074.             NEXT I
  1075.             
  1076.             WHILE INKEY$ = ""
  1077.             WEND
  1078.             VIDEOMODESET VMODE
  1079.             END
  1080.             
  1081.             DRWCUBE:
  1082.             FOR J=1 TO 3
  1083.             DRWLINE 2, 10, PLOT(J).X, PLOT(J).Y, PLOT(J+1).X,
  1084.             PLOT(J+1).Y
  1085.             NEXT J
  1086.             DRWLINE 2, 10, PLOT(4).X, PLOT(4).Y, PLOT(1).X, PLOT(1).Y
  1087.             FOR J=5 TO 7
  1088.             DRWLINE 2, 10, PLOT(J).X, PLOT(J).Y, PLOT(J+1).X,
  1089.             PLOT(J+1).Y
  1090.             NEXT J
  1091.             DRWLINE 2, 10, PLOT(8).X, PLOT(8).Y, PLOT(5).X, PLOT(5).Y
  1092.             FOR J=1 TO 4
  1093.             DRWLINE 2, 10, PLOT(J).X, PLOT(J).Y, PLOT(J+4).X,
  1094.             PLOT(J+4).Y
  1095.             NEXT J
  1096.             RETURN
  1097.           
  1098.  
  1099.  
  1100.  
  1101.  
  1102.             
  1103.           D3SCALE
  1104.             
  1105.           ° Syntax
  1106.             
  1107.             D3SCALE NumPoints, ScaleX, ScaleY, ScaleZ, InArray, OutArray
  1108.             
  1109.           ° Input
  1110.             
  1111.             NumPoints - number of points to scale
  1112.             ScaleX - scale factor along X axis
  1113.             ScaleY - scale factor along Y axis
  1114.             ScaleZ - scale factor along Z axis
  1115.             InArray - P3Dtype array containing points to scale
  1116.             OutArray - P3Dtype array holding scaled values
  1117.             
  1118.           ° Output
  1119.             
  1120.             no value returned
  1121.             
  1122.           ° Usage
  1123.             
  1124.             D3scale multiplies each coordinate in the three dimensional
  1125.             array InArray by the corresponding scale factor ScaleX,
  1126.             ScaleY or ScaleZ.  The results are stored in OutArray which
  1127.             can be the same as InArray.  A scale factor of 256 (100 hex)
  1128.             is considered 100 percent and results in no change.
  1129.             Therefore, 128 (80 hex) reduces values by one half and 512
  1130.             (200 hex) doubles values.
  1131.             
  1132.           ° See Also
  1133.             
  1134.             D3PROJECT, D3ROTATE, D3TRANSLATE
  1135.             
  1136.           ° Example
  1137.             
  1138.             REM SCALE A CUBE AT THE CENTER OF THE SCREEN
  1139.             REM $INCLUDE: 'SVGAQB10.BI'
  1140.             DEFINT A-Z
  1141.             
  1142.             DIM CUBE(1 TO 8) AS P3DType
  1143.             DIM SCUBE(1 TO 8) AS P3DType
  1144.             DIM PLOT(1 TO 8) AS P2DType
  1145.             DIM PROJPARAMS AS PROJType
  1146.             
  1147.             CUBE(1).X =  100 : CUBE(1).Y = -100 : CUBE(1).Z =  100
  1148.             CUBE(2).X =  100 : CUBE(2).Y = -100 : CUBE(2).Z = -100
  1149.             CUBE(3).X =  100 : CUBE(3).Y =  100 : CUBE(3).Z = -100
  1150.             CUBE(4).X =  100 : CUBE(4).Y =  100 : CUBE(4).Z =  100
  1151.             CUBE(5).X = -100 : CUBE(5).Y = -100 : CUBE(5).Z =  100
  1152.             CUBE(6).X = -100 : CUBE(6).Y = -100 : CUBE(6).Z = -100
  1153.             CUBE(7).X = -100 : CUBE(7).Y =  100 : CUBE(7).Z = -100
  1154.             CUBE(8).X = -100 : CUBE(8).Y =  100 : CUBE(8).Z =  100
  1155.             
  1156.             VMODE = VIDEOMODEGET
  1157.           
  1158.  
  1159.  
  1160.  
  1161.  
  1162.   
  1163.             IF WHICHVGA = 0 THEN STOP
  1164.             RES640
  1165.             
  1166.             PROJPARAMS.EYEX = -1040
  1167.             PROJPARAMS.EYEY = -600
  1168.             PROJPARAMS.EYEZ = -1200
  1169.             PROJPARAMS.SCRD = 1700
  1170.             PROJPARAMS.THETA = 30
  1171.             PROJPARAMS.PHI = 45
  1172.             
  1173.             FOR I = 256 TO 128 STEP -4
  1174.             D3SCALE 8, I, I, I, CUBE(1).X, SCUBE(1).X
  1175.             DUMMY = D3PROJECT 8, PROJPARAMS.EYEX, SCUBE(1).X, PLOT(1).X
  1176.             GOSUB DRWCUBE
  1177.             SDELAY 2
  1178.             GOSUB DRWCUBE
  1179.             NEXT I
  1180.             
  1181.             FOR I = 132 TO 256 STEP 4
  1182.             D3SCALE 8, I, I, I, CUBE(1).X, SCUBE(1).X
  1183.             DUMMY = D3PROJECT 8, PROJPARAMS.EYEX, SCUBE(1).X, PLOT(1).X
  1184.             GOSUB DRWCUBE
  1185.             SDELAY 2
  1186.             GOSUB DRWCUBE
  1187.             NEXT I
  1188.             
  1189.             WHILE INKEY$ = ""
  1190.             WEND
  1191.             VIDEOMODESET VMODE
  1192.             END
  1193.             
  1194.             DRWCUBE:
  1195.             FOR J=1 TO 3
  1196.             DRWLINE 2, 10, PLOT(J).X, PLOT(J).Y, PLOT(J+1).X,
  1197.             PLOT(J+1).Y
  1198.             NEXT J
  1199.             DRWLINE 2, 10, PLOT(4).X, PLOT(4).Y, PLOT(1).X, PLOT(1).Y
  1200.             FOR J=5 TO 7
  1201.             DRWLINE 2, 10, PLOT(J).X, PLOT(J).Y, PLOT(J+1).X,
  1202.             PLOT(J+1).Y
  1203.             NEXT J
  1204.             DRWLINE 2, 10, PLOT(8).X, PLOT(8).Y, PLOT(5).X, PLOT(5).Y
  1205.             FOR J=1 TO 4
  1206.             DRWLINE 2, 10, PLOT(J).X, PLOT(J).Y, PLOT(J+4).X,
  1207.             PLOT(J+4).Y
  1208.             NEXT J
  1209.             RETURN
  1210.           
  1211.  
  1212.  
  1213.  
  1214.  
  1215.             
  1216.           D3TRANSLATE
  1217.             
  1218.           ° Syntax
  1219.             
  1220.             D3TRANSLATE NumPoints, TransX, TransY, TransZ, InArray,
  1221.             OutArray
  1222.             
  1223.           ° Input
  1224.             
  1225.             NumPoints - number of points to translate
  1226.             TransX - distance to translate along X axis
  1227.             TransY - distance to translate along Y axis
  1228.             TransZ - distance to translate along Z axis
  1229.             InArray - P3Dtype array containing points to translate
  1230.             OutArray - P3Dtype array holding translated points
  1231.             
  1232.           ° Output
  1233.             
  1234.             no value returned
  1235.             
  1236.           ° Usage
  1237.             
  1238.             D3translate takes the three dimensional points given in
  1239.             InArray and translates them by the specified number of
  1240.             pixels along each axis.  The results are returned in
  1241.             OutArray which can be the same as InArray.
  1242.             
  1243.           ° See Also
  1244.             
  1245.             D3PROJECT, D3ROTATE, D3SCALE
  1246.             
  1247.           ° Example
  1248.             
  1249.             REM TRANSLATE A CUBE NEAR THE CENTER OF THE SCREEN
  1250.             REM $INCLUDE: 'SVGAQB10.BI'
  1251.             DEFINT A-Z
  1252.             
  1253.             DIM CUBE(1 TO 8) AS P3DType
  1254.             DIM TCUBE(1 TO 8) AS P3DType
  1255.             DIM PLOT(1 TO 8) AS P2DType
  1256.             DIM PROJPARAMS AS PROJType
  1257.             
  1258.             CUBE(1).X =  100 : CUBE(1).Y = -100 : CUBE(1).Z =  100
  1259.             CUBE(2).X =  100 : CUBE(2).Y = -100 : CUBE(2).Z = -100
  1260.             CUBE(3).X =  100 : CUBE(3).Y =  100 : CUBE(3).Z = -100
  1261.             CUBE(4).X =  100 : CUBE(4).Y =  100 : CUBE(4).Z =  100
  1262.             CUBE(5).X = -100 : CUBE(5).Y = -100 : CUBE(5).Z =  100
  1263.             CUBE(6).X = -100 : CUBE(6).Y = -100 : CUBE(6).Z = -100
  1264.             CUBE(7).X = -100 : CUBE(7).Y =  100 : CUBE(7).Z = -100
  1265.             CUBE(8).X = -100 : CUBE(8).Y =  100 : CUBE(8).Z =  100
  1266.             
  1267.             VMODE = VIDEOMODEGET
  1268.             IF WHICHVGA = 0 THEN STOP
  1269.             RES640
  1270.           
  1271.  
  1272.  
  1273.  
  1274.  
  1275.   
  1276.             
  1277.             PROJPARAMS.EYEX = -1040
  1278.             PROJPARAMS.EYEY = -600
  1279.             PROJPARAMS.EYEZ = -1200
  1280.             PROJPARAMS.SCRD = 1700
  1281.             PROJPARAMS.THETA = 30
  1282.             PROJPARAMS.PHI = 45
  1283.             
  1284.             FOR I = 0 TO 100 STEP 2
  1285.             D3TRANSLATE 8, I, I, I, CUBE(1).X, TCUBE(1).X
  1286.             DUMMY = D3PROJECT 8, PROJPARAMS.EYEX, TCUBE(1).X, PLOT(1).X
  1287.             GOSUB DRWCUBE
  1288.             SDELAY 2
  1289.             GOSUB DRWCUBE
  1290.             NEXT I
  1291.             
  1292.             FOR I = 98 TO 0 STEP -2
  1293.             D3TRANSLATE 8, I, I, I, CUBE(1).X, TCUBE(1).X
  1294.             DUMMY = D3PROJECT 8, PROJPARAMS.EYEX, TCUBE(1).X, PLOT(1).X
  1295.             GOSUB DRWCUBE
  1296.             SDELAY 2
  1297.             GOSUB DRWCUBE
  1298.             NEXT I
  1299.             
  1300.             WHILE INKEY$ = ""
  1301.             WEND
  1302.             VIDEOMODESET VMODE
  1303.             END
  1304.             
  1305.             DRWCUBE:
  1306.             FOR J=1 TO 3
  1307.             DRWLINE 2, 10, PLOT(J).X, PLOT(J).Y, PLOT(J+1).X,
  1308.             PLOT(J+1).Y
  1309.             NEXT J
  1310.             DRWLINE 2, 10, PLOT(4).X, PLOT(4).Y, PLOT(1).X, PLOT(1).Y
  1311.             FOR J=5 TO 7
  1312.             DRWLINE 2, 10, PLOT(J).X, PLOT(J).Y, PLOT(J+1).X,
  1313.             PLOT(J+1).Y
  1314.             NEXT J
  1315.             DRWLINE 2, 10, PLOT(8).X, PLOT(8).Y, PLOT(5).X, PLOT(5).Y
  1316.             FOR J=1 TO 4
  1317.             DRWLINE 2, 10, PLOT(J).X, PLOT(J).Y, PLOT(J+4).X,
  1318.             PLOT(J+4).Y
  1319.             NEXT J
  1320.             RETURN
  1321.           
  1322.  
  1323.  
  1324.  
  1325.  
  1326.             
  1327.           DRWBOX
  1328.             
  1329.           ° Syntax
  1330.             
  1331.             DRWBOX Mode, Color, X1, Y1, X2, Y2
  1332.           
  1333.           ° Input
  1334.             
  1335.             Mode - pixel write mode (set=1, xor=2, or=3, and=4)
  1336.             Color - index to color in current palette
  1337.             X1, Y1 - location of top left corner
  1338.             X2, Y2 - location of bottom right corner
  1339.             
  1340.           ° Output
  1341.             
  1342.             no value returned
  1343.             
  1344.           ° Usage
  1345.             
  1346.             Drwbox draws a rectangle of the color specified using Mode
  1347.             with opposite vertices defined by (X1, Y1) and (X2, Y2).
  1348.             The vertices given do not need to be exactly the top left
  1349.             and bottom right.  They only have to reference opposite
  1350.             sides of the rectangle.  Any portion of the rectangle that
  1351.             lies outside of the currently defined viewport will not be
  1352.             drawn.
  1353.             
  1354.           ° See Also
  1355.             
  1356.             DRWLINE, SETVIEW
  1357.             
  1358.           ° Example
  1359.             
  1360.             REM DRAWS A BOX AROUND THE WHOLE SCREEN
  1361.             REM $INCLUDE: 'SVGAQB10.BI'
  1362.             DEFINT A-Z
  1363.             
  1364.             VMODE=GETVIDEOMODE
  1365.             IF WHICHVGA = 0 THEN STOP
  1366.             RES640
  1367.             
  1368.             DRWBOX 1, 10, 0, 0, 639, 479
  1369.             
  1370.             WHILE INKEY$ = ""
  1371.             WEND
  1372.             VIDEOMODESET VMODE
  1373.             END
  1374.           
  1375.  
  1376.  
  1377.  
  1378.  
  1379.               
  1380.           DRWCIRCLE
  1381.             
  1382.           ° Syntax
  1383.             
  1384.             DRWCIRCLE Mode, Color, Xcenter, Ycenter, Radius
  1385.           
  1386.           ° Input
  1387.             
  1388.             Mode - pixel write mode (set=1, xor=2, or=3, and=4)
  1389.             Color - index to color in current palette
  1390.             Xcenter, Ycenter - location of center of circle
  1391.             Radius - distance from center to edge of circle
  1392.             
  1393.           ° Output
  1394.             
  1395.             no value returned
  1396.             
  1397.           ° Usage
  1398.             
  1399.             Drwcircle draws a circle of the specified color using Mode
  1400.             with the center located at (Xcenter, Ycenter) and a radius
  1401.             of Radius.  All values of Xcenter, Ycenter and Radius are
  1402.             valid.  Any portion of the circle that lies outside of the
  1403.             currently defined viewport will not be drawn.
  1404.             
  1405.           ° See Also
  1406.             
  1407.             DRWELLIPSE, SETVIEW
  1408.             
  1409.           ° Example
  1410.             
  1411.             REM DRAWS A CIRCLE AT THE CENTER OF THE SCREEN
  1412.             REM $INCLUDE: 'SVGAQB10.BI'
  1413.             DEFINT A-Z
  1414.             
  1415.             VMODE=GETVIDEOMODE
  1416.             IF WHICHVGA = 0 THEN STOP
  1417.             RES640
  1418.             
  1419.             DRWCIRCLE 1, 10, 320, 240, 200
  1420.             
  1421.             WHILE INKEY$ = ""
  1422.             WEND
  1423.             VIDEOMODESET VMODE
  1424.             END
  1425.           
  1426.  
  1427.  
  1428.  
  1429.  
  1430.               
  1431.           DRWELLIPSE
  1432.             
  1433.           ° Syntax
  1434.             
  1435.             DRWELLIPSE Mode, Color, Xcenter, Ycenter, RadiusX, RadiusY
  1436.             
  1437.           ° Input
  1438.             
  1439.             Mode - pixel write mode (set=1, xor=2, or=3, and=4)
  1440.             Color - index to color in current palette
  1441.             Xcenter, Ycenter - location of center of ellipse
  1442.             RadiusX - radius parallel to X axis
  1443.             RadiusY - radius parallel to Y axis
  1444.             
  1445.           ° Output
  1446.             
  1447.             no value returned
  1448.             
  1449.           ° Usage
  1450.             
  1451.             Drwellipse draws an ellipse of the specified color using
  1452.             Mode with the center defined by (Xcenter, Ycenter).  The
  1453.             radius in the horizontal direction is RaduisX and the radius
  1454.             in the vertical direction is RadiusY.  All values of
  1455.             Xcenter, Ycenter, RadiusX and RadiusY are valid.  Any
  1456.             portion of the ellipse that lies outside of the currently
  1457.             defined viewport will not be drawn.
  1458.             
  1459.           ° See Also
  1460.             
  1461.             DRWCIRCLE, SETVIEW
  1462.             
  1463.           ° Example
  1464.             
  1465.             REM DRAWS AN ELLIPSE AT THE CENTER OF THE SCREEN
  1466.             REM $INCLUDE: 'SVGAQB10.BI'
  1467.             DEFINT A-Z
  1468.             
  1469.             VMODE=GETVIDEOMODE
  1470.             IF WHICHVGA = 0 THEN STOP
  1471.             RES640
  1472.             
  1473.             DRWELLIPSE 1, 10, 320, 240, 318, 238
  1474.             
  1475.             WHILE INKEY$ = ""
  1476.             WEND
  1477.             VIDEOMODESET VMODE
  1478.             END
  1479.           
  1480.  
  1481.  
  1482.  
  1483.  
  1484.               
  1485.           DRWLINE
  1486.             
  1487.           ° Syntax
  1488.             
  1489.             DRWLINE Mode, Color, X1, Y1, X2, Y2
  1490.             
  1491.           ° Input
  1492.             
  1493.             Mode - pixel write mode (set=1, xor=2, or=3, and=4)
  1494.             Color - index to color in current Palette
  1495.             X1, Y1 - location of one endpoint of line
  1496.             X2, Y2 - location of other endpoint of line
  1497.             
  1498.           ° Output
  1499.             
  1500.             no value returned
  1501.             
  1502.           ° Usage
  1503.             
  1504.             Drwline draws a line of the specified color using Mode with
  1505.             endpoints located at (X1, Y1) and (X2, Y2).  All values of
  1506.             X1, Y1, X2 and Y2 are valid.  Any portion of the line that
  1507.             lies outside of the currently defined viewport will not be
  1508.             drawn.
  1509.             
  1510.           ° See Also
  1511.             
  1512.             DRWBOX, SETVIEW
  1513.             
  1514.           ° Example
  1515.             
  1516.             REM DRAWS A LINE FROM 0,0 TO THE CENTER OF THE SCREEN
  1517.             REM $INCLUDE: 'SVGAQB10.BI'
  1518.             DEFINT A-Z
  1519.             
  1520.             VMODE=GETVIDEOMODE
  1521.             IF WHICHVGA = 0 THEN STOP
  1522.             RES640
  1523.             
  1524.             DRWLINE 1, 10, 0, 0, 320, 240
  1525.             
  1526.             WHILE INKEY$ = ""
  1527.             WEND
  1528.             VIDEOMODESET VMODE
  1529.             END
  1530.           
  1531.  
  1532.  
  1533.  
  1534.  
  1535.               
  1536.           DRWPOINT
  1537.             
  1538.           ° Syntax
  1539.             
  1540.             DRWPOINT Mode, Color, X, Y
  1541.             
  1542.           ° Input
  1543.             
  1544.             Mode - pixel write mode (set=1, xor=2, or=3, and=4)
  1545.             Color - index to color in current palette
  1546.             X, Y - location of pixel to write
  1547.             
  1548.           ° Output
  1549.             
  1550.             no value returned
  1551.             
  1552.           ° Usage
  1553.             
  1554.             Drwpoint draws a single point of the specified color using
  1555.             Mode at (X, Y).  All values of X and Y are valid.  If the
  1556.             point (X, Y) lies outside of the currently defined viewport,
  1557.             no drawing will take place.
  1558.             
  1559.           ° See Also
  1560.             
  1561.             GETPOINT, SETVIEW
  1562.             
  1563.           ° Example
  1564.             
  1565.             REM DRAWS A POINT AT THE CENTER OF THE SCREEN
  1566.             REM $INCLUDE: 'SVGAQB10.BI'
  1567.             DEFINT A-Z
  1568.             
  1569.             VMODE=GETVIDEOMODE
  1570.             IF WHICHVGA = 0 THEN STOP
  1571.             RES640
  1572.             
  1573.             DRWPOINT 1, 10, 320, 240
  1574.             
  1575.             WHILE INKEY$ = ""
  1576.             WEND
  1577.             VIDEOMODESET VMODE
  1578.             END
  1579.           
  1580.  
  1581.  
  1582.  
  1583.  
  1584.               
  1585.           DRWSTRING
  1586.             
  1587.           ° Syntax
  1588.             
  1589.             DRWSTRING Mode, FColor, BColor, Strng$, X, Y
  1590.             
  1591.           ° Input
  1592.             
  1593.             Mode - pixel write mode (no action=0, set=1, xor=2, or=3,
  1594.             and=4)
  1595.             FColor - foreground index to color in current palette
  1596.             BColor - background index to color in current palette
  1597.             Strng$ - string of ASCII characters to be drawn
  1598.             X, Y - location of upper, left corner of block
  1599.             
  1600.           ° Output
  1601.             
  1602.             no value returned
  1603.             
  1604.           ° Usage
  1605.             
  1606.             Drwstring takes the ASCII characters contained in Strng$ and
  1607.             creates a graphics block similar to the blocks used by
  1608.             Blkget and Blkput and places this block on the screen at the
  1609.             specified coordinates.  The characters are drawn with color
  1610.             FColor using the current font and the background is color
  1611.             BColor.  When mode 0, no action, is used, the graphics block
  1612.             is created in memory retrievable by getlaststring, but no
  1613.             text is actually drawn on the screen.  (Note: the system
  1614.             font is automatically installed when Whichvga is called.)
  1615.             
  1616.           ° See Also
  1617.             
  1618.             FONTSET, FONTGETINFO, FONTSYSTEM, DRWSTRINGDN, DRWSTRINGLT,
  1619.             DRWSTRINGRT, GETLASTSTRING
  1620.             
  1621.           ° Example
  1622.             
  1623.             REM DRAWS SOME NORMAL TEXT AT THE CENTER OF THE SCREEN
  1624.             REM $INCLUDE: 'SVGAQB10.BI'
  1625.             DEFINT A-Z
  1626.             
  1627.             VMODE=GETVIDEOMODE
  1628.             IF WHICHVGA = 0 THEN STOP
  1629.             RES640
  1630.             
  1631.             A$ = "HELLO WORLD"
  1632.             DRWSTRING 1, 10, 0, A$, 320, 240
  1633.             
  1634.             WHILE INKEY$ = ""
  1635.             WEND
  1636.             VIDEOMODESET VMODE
  1637.             END
  1638.           
  1639.  
  1640.  
  1641.  
  1642.  
  1643.               
  1644.           DRWSTRINGDN
  1645.             
  1646.           ° Syntax
  1647.             
  1648.             DRWSTRINGDN Mode, FColor, BColor, Strng$, X, Y
  1649.             
  1650.           ° Input
  1651.             
  1652.             Mode - pixel write mode (no action=0, set=1, xor=2, or=3,
  1653.                    and=4)
  1654.             FColor - foreground index to color in current palette
  1655.             BColor - background index to color in current palette
  1656.             Strng$ - string of ASCII characters to be drawn
  1657.             X, Y - location of lower, right corner of block
  1658.             
  1659.           ° Output
  1660.             
  1661.             no value returned
  1662.             
  1663.           ° Usage
  1664.             
  1665.             Drwstringdn takes the ASCII characters contained in Strng$
  1666.             and creates a graphics block similar to the blocks used by
  1667.             Blkget and Blkput.  The characters are drawn with color
  1668.             FColor using the current font and the background is color
  1669.             BColor.  When mode 0, no action, is used, the graphics block
  1670.             is created in memory retrievable by getlaststring, but no
  1671.             text is actually drawn on the screen.  (Note: the system
  1672.             font is automatically installed when Whichvga is called.)
  1673.             The text is drawn upside down with X, Y specifying the
  1674.             lower, right corner.  This corner corresponds to the upper,
  1675.             left corner when the text is oriented upright.
  1676.             
  1677.           ° See Also
  1678.             
  1679.             FONTSET, FONTGETINFO, FONTSYSTEM, DRWSTRING, DRWSTRINGLT,
  1680.             DRWSTRINGRT, GETLASTSTRING
  1681.             
  1682.           ° Example
  1683.             
  1684.             REM DRAWS SOME UP-SIDE-DOWN TEXT AT THE CENTER OF THE SCREEN
  1685.             REM $INCLUDE: 'SVGAQB10.BI'
  1686.             DEFINT A-Z
  1687.             
  1688.             VMODE=GETVIDEOMODE
  1689.             IF WHICHVGA = 0 THEN STOP
  1690.             RES640
  1691.             
  1692.             A$ = "HELLO WORLD"
  1693.             DRWSTRINGDN 1, 10, 0, A$, 320, 240
  1694.             
  1695.             WHILE INKEY$ = ""
  1696.             WEND
  1697.             VIDEOMODESET VMODE
  1698.           
  1699.  
  1700.  
  1701.  
  1702.  
  1703.   
  1704.             END
  1705.           
  1706.  
  1707.  
  1708.  
  1709.  
  1710.               
  1711.           DRWSTRINGLT
  1712.             
  1713.           ° Syntax
  1714.             
  1715.             DRWSTRINGLT Mode, FColor, BColor, Strng$, X, Y
  1716.             
  1717.           ° Input
  1718.             
  1719.             Mode - pixel write mode (no action=0, set=1, xor=2, or=3,
  1720.                    and=4)
  1721.             FColor - foreground index to color in current palette
  1722.             BColor - background index to color in current palette
  1723.             Strng$ - string of ASCII characters to be drawn
  1724.             X, Y - location of lower, left corner of block
  1725.             
  1726.           ° Output
  1727.             
  1728.             no value returned
  1729.             
  1730.           ° Usage
  1731.             
  1732.             Drwstringlt takes the ASCII characters contained in Strng$
  1733.             and creates a graphics block similar to the blocks used by
  1734.             Blkget and Blkput.  The characters are drawn with color
  1735.             FColor using the current font and the background is color
  1736.             BColor.  When mode 0, no action, is used, the graphics block
  1737.             is created in memory retrievable by getlaststring, but no
  1738.             text is actually drawn on the screen.  (Note: the system
  1739.             font is automatically installed when Whichvga is called.)
  1740.             The text block is rotated 90 to the left with X, Y
  1741.             specifying the lower, left corner.  This corner corresponds
  1742.             to the upper, left corner when the text is oriented upright.
  1743.             
  1744.             
  1745.           ° See Also
  1746.             
  1747.             FONTSET, FONTGETINFO, FONTSYSTEM, DRWSTRING, DRWSTRINGDN,
  1748.             DRWSTRINGRT, GETLASTSTRING
  1749.             
  1750.           ° Example
  1751.             
  1752.             REM DRAWS SOME TEXT ROTATED BY 90 DEGREES TO THE LEFT AT THE
  1753.             REM CENTER OF THE SCREEN
  1754.             REM $INCLUDE: 'SVGAQB10.BI'
  1755.             DEFINT A-Z
  1756.             
  1757.             VMODE=GETVIDEOMODE
  1758.             IF WHICHVGA = 0 THEN STOP
  1759.             RES640
  1760.             
  1761.             A$ = "HELLO WORLD"
  1762.             DRWSTRINGLT 1, 10, 0, A$, 320, 240
  1763.             
  1764.             WHILE INKEY$ = ""
  1765.           
  1766.  
  1767.  
  1768.  
  1769.  
  1770.   
  1771.             WEND
  1772.             VIDEOMODESET VMODE
  1773.             END
  1774.           
  1775.  
  1776.  
  1777.  
  1778.  
  1779.               
  1780.           DRWSTRINGRT
  1781.             
  1782.           ° Syntax
  1783.             
  1784.             DRWSTRINGRT Mode, FColor, BColor, Strng$, X, Y
  1785.             
  1786.           ° Input
  1787.             
  1788.             Mode - pixel write mode (no action=0, set=1, xor=2, or=3,
  1789.                    and=4)
  1790.             FColor - foreground index to color in current palette
  1791.             BColor - background index to color in current palette
  1792.             Strng$ - string of ASCII characters to be drawn
  1793.             X, Y - location of upper, right corner of block
  1794.             
  1795.           ° Output
  1796.             
  1797.             no value returned
  1798.             
  1799.           ° Usage
  1800.             
  1801.             Drwstringrt takes the ASCII characters contained in Strng$
  1802.             and creates a graphics block similar to the blocks used by
  1803.             Blkget and Blkput.  The characters are drawn with color
  1804.             FColor using the current font and the background is color
  1805.             BColor.  When mode 0, no action, is used, the graphics block
  1806.             is created in memory retrievable by getlaststring, but no
  1807.             text is actually drawn on the screen.  (Note: the system
  1808.             font is automatically installed when Whichvga is called.)
  1809.             The text block is rotated 90 to the right with X, Y
  1810.             specifying the upper, right corner.  This corner corresponds
  1811.             to the upper, left corner if the text is oriented upright.
  1812.             
  1813.             
  1814.           ° See Also
  1815.             
  1816.             FONTSET, FONTGETINFO, FONTSYSTEM, DRWSTRING, DRWSTRINGDN,
  1817.             DRWSTRINGLT, GETLASTSTRING
  1818.             
  1819.           ° Example
  1820.             
  1821.             REM DRAWS SOME TEXT ROTATED BY 90 DEGREES TO THE RIGHT AT
  1822.             THE
  1823.             REM CENTER OF THE SCREEN
  1824.             REM $INCLUDE: 'SVGAQB10.BI'
  1825.             DEFINT A-Z
  1826.             
  1827.             VMODE=GETVIDEOMODE
  1828.             IF WHICHVGA = 0 THEN STOP
  1829.             RES640
  1830.             
  1831.             A$ = "HELLO WORLD"
  1832.             DRWSTRINGRT 1, 10, 0, A$, 320, 240
  1833.             
  1834.           
  1835.  
  1836.  
  1837.  
  1838.  
  1839.   
  1840.             WHILE INKEY$ = ""
  1841.             WEND
  1842.             VIDEOMODESET VMODE
  1843.             END
  1844.           
  1845.  
  1846.  
  1847.  
  1848.  
  1849.               
  1850.           FILLAREA
  1851.             
  1852.           ° Syntax
  1853.             
  1854.             FILLAREA XSeed, YSeed, BorderColor, FillColor
  1855.             
  1856.           ° Input
  1857.             
  1858.             XSeed, YSeed - seed location to start fill
  1859.             BorderColor - color index at which filling stops
  1860.             FillColor - color index to fill within the border
  1861.             
  1862.           ° Output
  1863.             
  1864.             no value returned
  1865.             
  1866.           ° Usage
  1867.             
  1868.             Fillarea fills a region with a new color specified by
  1869.             FillColor.  The region is defined by any line or curve of
  1870.             the color BorderColor or by the edge of the viewport.  All
  1871.             graphics within the region are lost and covered with the
  1872.             FillColor.  The border is not effected.
  1873.             
  1874.           ° See Also
  1875.             
  1876.             FILLAREA, FILLSCREEN, FILLVIEW, SETVIEW
  1877.             
  1878.           ° Example
  1879.             
  1880.             REM FILLS A BOX WITH A COLOR
  1881.             REM $INCLUDE: 'SVGAQB10.BI'
  1882.             DEFINT A-Z
  1883.             
  1884.             VMODE=GETVIDEOMODE
  1885.             IF WHICHVGA = 0 THEN STOP
  1886.             RES640
  1887.             
  1888.             DRWBOX 1, 10, 0, 0, 100, 100
  1889.             FILLAREA 1, 1, 10, 7
  1890.             
  1891.             WHILE INKEY$ = ""
  1892.             WEND
  1893.             VIDEOMODESET VMODE
  1894.             END
  1895.           
  1896.  
  1897.  
  1898.  
  1899.  
  1900.               
  1901.           FILLCOLOR
  1902.             
  1903.           ° Syntax
  1904.             
  1905.             FILLCOLOR XSeed, YSeed, OldColor, NewColor
  1906.             
  1907.           ° Input
  1908.             
  1909.             XSeed, YSeed - seed location to start fill
  1910.             OldColor - color index to change
  1911.             NewColor - color index to replace OldColor
  1912.             
  1913.           ° Output
  1914.             
  1915.             no value returned
  1916.             
  1917.           ° Usage
  1918.             
  1919.             THIS NEEDS TO BE REWORDED TO REFLECT A PATH!
  1920.             Fillcolor replaces every existence of OldColor with NewColor
  1921.             within a region.  The region is defined by any line or curve
  1922.             this not of OldColor or NewColor.  Therefore, only OldColor
  1923.             is modified and no other information is changed.
  1924.             
  1925.           ° See Also
  1926.             
  1927.             FILLCOLOR, FILLSCREEN, FILLVIEW, SETVIEW
  1928.             
  1929.           ° Example
  1930.             
  1931.             REM REPLACES THE BLACK COLOR WITH A NEW COLOR
  1932.             REM $INCLUDE: 'SVGAQB10.BI'
  1933.             DEFINT A-Z
  1934.             
  1935.             VMODE=GETVIDEOMODE
  1936.             IF WHICHVGA = 0 THEN STOP
  1937.             RES640
  1938.             
  1939.             DRWBOX 1, 10, 0, 0, 100, 100
  1940.             DRWBOX 1, 12, 20, 20, 80, 80
  1941.             FILLCOLOR 1, 1, 0, 7
  1942.             
  1943.             WHILE INKEY$ = ""
  1944.             WEND
  1945.             VIDEOMODESET VMODE
  1946.             END
  1947.           
  1948.  
  1949.  
  1950.  
  1951.  
  1952.               
  1953.           FILLSCREEN
  1954.             
  1955.           ° Syntax
  1956.             
  1957.             FILLSCREEN Color
  1958.             
  1959.           ° Input
  1960.             
  1961.             Color - index to color in current palette
  1962.             
  1963.           ° Output
  1964.             
  1965.             no value is returned
  1966.             
  1967.           ° Usage
  1968.             
  1969.             Fillscreen clears the entire screen with the specified
  1970.             color.  All information on the screen is lost.  (Note, a
  1971.             faster method to clear the screen is to call any of the
  1972.             'res###' functions.  These reset the graphics screen and
  1973.             automatically clear it to color index zero as well as reset
  1974.             the default palette.)
  1975.             
  1976.           ° See Also
  1977.             
  1978.             FILLCOLOR, FILLAREA, FILLVIEW
  1979.             
  1980.           ° Example
  1981.             
  1982.             REM FILLS THE SCREEN WITH A COLOR
  1983.             REM $INCLUDE: 'SVGAQB10.BI'
  1984.             DEFINT A-Z
  1985.             
  1986.             VMODE=GETVIDEOMODE
  1987.             IF WHICHVGA = 0 THEN STOP
  1988.             RES640
  1989.             
  1990.             FILLSCREEN 10
  1991.             
  1992.             WHILE INKEY$ = ""
  1993.             WEND
  1994.             VIDEOMODESET VMODE
  1995.             END
  1996.           
  1997.  
  1998.  
  1999.  
  2000.  
  2001.               
  2002.           FILLVIEW
  2003.             
  2004.           ° Syntax
  2005.             
  2006.             FILLVIEW Color
  2007.             
  2008.           ° Input
  2009.             
  2010.             Color - index to color in current palette
  2011.             
  2012.           ° Output
  2013.             
  2014.             no value is returned
  2015.             
  2016.           ° Usage
  2017.             
  2018.             Fillview fills the currently defined viewport with the
  2019.             specified color.  All information in the viewport is lost.
  2020.             
  2021.           ° See Also
  2022.             
  2023.             FILLCOLOR, FILLAREA, FILLSCREEN
  2024.             
  2025.           ° Example
  2026.             
  2027.             REM FILLS THE VIEWPORT WITH A COLOR
  2028.             REM $INCLUDE: 'SVGAQB10.BI'
  2029.             DEFINT A-Z
  2030.             
  2031.             VMODE=GETVIDEOMODE
  2032.             IF WHICHVGA = 0 THEN STOP
  2033.             RES640
  2034.             
  2035.             SETVIEW 100, 100, 539, 379
  2036.             FILLVIEW 10
  2037.             
  2038.             WHILE INKEY$ = ""
  2039.             WEND
  2040.             VIDEOMODESET VMODE
  2041.             END
  2042.           
  2043.  
  2044.  
  2045.  
  2046.  
  2047.               
  2048.           FONTGETINFO
  2049.             
  2050.           ° Syntax
  2051.             
  2052.             FONTGETINFO Width, Height
  2053.             
  2054.           ° Input
  2055.             
  2056.             no input parameters
  2057.             
  2058.           ° Output
  2059.             
  2060.             Width - width in pixels of current font
  2061.             Height - height in pixels of current font
  2062.             
  2063.           ° Usage
  2064.             
  2065.             Fontgetinfo returns in Width and Height the dimensions of
  2066.             the currently loaded font.
  2067.             
  2068.           ° See Also
  2069.             
  2070.             FONTSET, FONTSYSTEM
  2071.             
  2072.           ° Example
  2073.             
  2074.             REM GET INFO ON THE SYSTEM FONT
  2075.             REM $INCLUDE: 'SVGAQB10.BI'
  2076.             DEFINT A-Z
  2077.             
  2078.             VMODE=GETVIDEOMODE
  2079.             IF WHICHVGA = 0 THEN STOP
  2080.             RES640
  2081.             
  2082.             FONTGETINFO WDTH, HGTH
  2083.             A$ = "SYSTEM FONT WIDTH =" + STR$(WDTH)
  2084.             B$ = "SYSTEM FONT HEIGHT =" + STR$(HGTH)
  2085.             DRWSTRING 1, 7, 0, A$, 0, 0
  2086.             DRWSTRING 1, 7, 0, B$, 0, 20
  2087.             
  2088.             WHILE INKEY$ = ""
  2089.             WEND
  2090.             VIDEOMODESET VMODE
  2091.             END
  2092.           
  2093.  
  2094.  
  2095.  
  2096.  
  2097.               
  2098.           FONTSET
  2099.             
  2100.           ° Syntax
  2101.             
  2102.             FONTSET
  2103.             
  2104.           ° Input
  2105.             
  2106.             Font$ = string * 4098 containing font data
  2107.             
  2108.           ° Output
  2109.             
  2110.             no value returned
  2111.             
  2112.           ° Usage
  2113.             
  2114.             Fontset loads the current font with the data found in Font$.
  2115.             The string must have at least 4098 members.
  2116.             
  2117.           ° See Also
  2118.             
  2119.             FONTGETINFO, FONTSYSTEM
  2120.             
  2121.           ° Example
  2122.             
  2123.             REM LOAD A FONT FROM DISK AND ENABLE IT
  2124.             REM $INCLUDE: 'SVGAQB10.BI'
  2125.             DEFINT A-Z
  2126.             
  2127.             DIM NEWFONT AS STRING * 4098
  2128.             
  2129.             VMODE = VIDEOMODEGET
  2130.             IF WHICHVGA = 0 THEN STOP
  2131.             RES640
  2132.             
  2133.             OPEN "DRAGON.FNT" FOR BINARY AS #1
  2134.             GET #1, , NEWFONT
  2135.             CLOSE #1
  2136.             FONTSET NEWFONT
  2137.             DRWSTRING 1, 7, 0, "The Dragon Font!", 0, 0
  2138.             
  2139.             WHILE INKEY$ = ""
  2140.             WEND
  2141.             VIDEOMODESET VMODE
  2142.             END
  2143.           
  2144.  
  2145.  
  2146.  
  2147.  
  2148.               
  2149.           FONTSYSTEM
  2150.             
  2151.           ° Syntax
  2152.             
  2153.             FONTSYSTEM
  2154.             
  2155.           ° Input
  2156.             
  2157.             no input parameters
  2158.             
  2159.           ° Output
  2160.             
  2161.             no value returned
  2162.             
  2163.           ° Usage
  2164.             
  2165.             Fontsystem sets the current font to the standard system
  2166.             font.  This font is automatically set when whichvga is
  2167.             called.
  2168.             
  2169.           ° See Also
  2170.             
  2171.             WHICHVGA, FONTGETINFO, FONTSET
  2172.             
  2173.           ° Example
  2174.             
  2175.             REM LOAD A FONT FROM DISK AND ENABLE IT
  2176.             REM THEN GO BACK TO THE SYSTEM FONT
  2177.             REM $INCLUDE: 'SVGAQB10.BI'
  2178.             DEFINT A-Z
  2179.             
  2180.             DIM NEWFONT AS STRING * 4098
  2181.             
  2182.             VMODE = VIDEOMODEGET
  2183.             IF WHICHVGA = 0 THEN STOP
  2184.             RES640
  2185.             
  2186.             OPEN "DRAGON.FNT" FOR BINARY AS #1
  2187.             GET #1, , NEWFONT
  2188.             CLOSE #1
  2189.             FONTSET NEWFONT
  2190.             DRWSTRING 1, 7, 0, "The Dragon Font!", 0, 0
  2191.             FONTSYSTEM
  2192.             DRWSTRING 1, 7, 0, "The System Font!", 0, 20
  2193.             
  2194.             WHILE INKEY$ = ""
  2195.             WEND
  2196.             VIDEOMODESET VMODE
  2197.             END
  2198.           
  2199.  
  2200.  
  2201.  
  2202.  
  2203.               
  2204.           GETLASTSTRING
  2205.             
  2206.           ° Syntax
  2207.             
  2208.             GETLASTSTRING GfxBlk
  2209.             
  2210.           ° Input
  2211.             
  2212.             GfxBlk = integer destination array
  2213.             
  2214.           ° Output
  2215.             
  2216.             no value returned
  2217.             
  2218.           ° Usage
  2219.             
  2220.             Getlaststring returns the text drawn on the screen by the
  2221.             last called drwstring function.  The text is returned in
  2222.             GfxBlk which may be used with blkput or the sprite
  2223.             functions.  The text in GfxBlk is oriented in the same
  2224.             manner as the last called drwstring function.  A common
  2225.             practice is to call the drwstring function using mode 0
  2226.             which does not actually draw text on the screen.
  2227.             Getlaststring should be called immediately after the desired
  2228.             drwstring function to prevent possible loss of data caused
  2229.             by other functions.
  2230.             
  2231.             GfxBlk must be dimensioned as a short integer array with a
  2232.             size in integers equal to
  2233.             
  2234.                   [(fontwidth*stringlength)*(fontheight)] / 2+3.
  2235.                                          
  2236.             The font's dimensions can be obtained by calling fontgetinfo
  2237.             and the string's length can be obtained using QuickBasic's
  2238.             len function.  Note, however, that GfxBlk can be quite
  2239.             large.  If the size of GfxBlk is insufficient, getlaststring
  2240.             will overwrite any data in memory contained beyond GfxBlk
  2241.             and may possibly cause the system to crash.
  2242.             
  2243.           ° See Also
  2244.             
  2245.             DRWSTRING, DRWSTRINGDN, DRWSTRINGLT, DRWSTRINGRT,
  2246.             FONTGETINFO
  2247.             
  2248.           ° Example
  2249.             
  2250.             REM USES GETLASTSTRING TO DRAW SOME TEXT AT THE CENTER OF
  2251.             THE SCREEN
  2252.             REM $INCLUDE: 'SVGAQB10.BI'
  2253.             DEFINT A-Z
  2254.             
  2255.             VMODE=GETVIDEOMODE
  2256.             IF WHICHVGA = 0 THEN STOP
  2257.             RES640
  2258.           
  2259.  
  2260.  
  2261.  
  2262.  
  2263.   
  2264.             
  2265.             A$ = "HELLO WORLD"
  2266.             DRWSTRING 0, 10, 0, A$, 0, 0
  2267.             FONTGETINFO W, H
  2268.             L = LEN(A$)
  2269.             BLKSIZE = ( (W*L)*H )\2 + 3
  2270.             DIM BLK(0 TO BLKSIZE)
  2271.             GETLASTSTRING BLK(0)
  2272.             BLKPUT 1, 320, 240, BLK(0)
  2273.             
  2274.             WHILE INKEY$ = ""
  2275.             WEND
  2276.             VIDEOMODESET VMODE
  2277.             END
  2278.           
  2279.  
  2280.  
  2281.  
  2282.  
  2283.             
  2284.           GETPOINT
  2285.             
  2286.           ° Syntax
  2287.             
  2288.             Color = GETPOINT (X, Y)
  2289.             
  2290.           ° Input
  2291.             
  2292.             X, Y = location of pixel to read
  2293.             
  2294.           ° Output
  2295.             
  2296.             Color = color index of pixel at X, Y
  2297.             
  2298.           ° Usage
  2299.             
  2300.             Getpoint returns the value of the pixel at location X, Y.
  2301.             This value is a color index into the current palette.
  2302.             
  2303.           ° See Also
  2304.             
  2305.             DRWPOINT
  2306.             
  2307.           ° Example
  2308.             
  2309.             REM DRAW A POINT AND CHECK TO MAKE SURE IT IS THERE
  2310.             REM $INCLUDE: 'SVGAQB10.BI'
  2311.             
  2312.             DEFINT A-Z
  2313.             IF WHICHVGA = 0 THEN STOP
  2314.             IF WHICHMEM < 512 THEN STOP
  2315.             VMODE = VIDEOMODEGET
  2316.             RES640
  2317.             
  2318.             DRWPOINT 1, 10, 320, 240
  2319.             POINTVALUE = GETPOINT(320, 240)
  2320.             
  2321.             A$ = "THE POINT VALUE IS:" + STR$(POINTVALUE)
  2322.             DRWSTRING 1, 7, 0, A$, 0, 0
  2323.             
  2324.             WHILE INKEY$ = ""
  2325.             WEND
  2326.             VIDEOMODESET VMODE
  2327.             
  2328.             END
  2329.           
  2330.  
  2331.  
  2332.  
  2333.  
  2334.               
  2335.           GIFGETINFO
  2336.             
  2337.           ° Syntax
  2338.             
  2339.             ret = GIFGETINFO (Filename$, Width, Height, NumColors,
  2340.             Palette$)
  2341.           ° Input
  2342.             
  2343.             Filename$ = the filename of the gif image to read
  2344.             
  2345.           ° Output
  2346.             
  2347.             ret = return status of function (1 = success)
  2348.             Width = the width in pixels of the image
  2349.             Height = the height in pixels of the image
  2350.             NumColors = the number of colors in the image palette
  2351.             Palette$ = string*768 containing the image palette
  2352.             
  2353.           ° Usage
  2354.             
  2355.             Gifgetinfo reads Filename$ and returns the characteristics
  2356.             of the image.  The dimensions of the image are returned in
  2357.             Width, Height.  The number of colors in the image's palette
  2358.             is returned in NumColors and the palette is returned in
  2359.             Palette$.  Although the image's palette may contain less
  2360.             than 256 colors, Palette$ must be 768 characters in length.
  2361.             The image's palette will begin with the first character of
  2362.             Palette$.
  2363.             
  2364.             For ease of programming the gif decoder requires that the
  2365.             image be non-interlaced, use only a global color map and be
  2366.             compressed according to GIF87A specifications.
  2367.             
  2368.             If gifgetinfo determines that Filename$ is a satisfactory
  2369.             file, the function will return a one.  Otherwise, the
  2370.             function will return one of several error codes concerning
  2371.             Filename$ as listed below:
  2372.             
  2373.             0 =  does not exist or there is some disk I/O problem
  2374.             -1 = does not have the GIF87A signature
  2375.             -2 = image is interlaced
  2376.             -3 = does not use a global color map
  2377.             -4 = has some general error
  2378.             
  2379.           ° See Also
  2380.             
  2381.             GIFPUT
  2382.             
  2383.           ° Example
  2384.             
  2385.             REM DRAW A POINT AND CHECK TO MAKE SURE IT IS THERE
  2386.             REM $INCLUDE: 'SVGAQB10.BI'
  2387.             
  2388.             DEFINT A-Z
  2389.           
  2390.  
  2391.  
  2392.  
  2393.  
  2394.   
  2395.             DIM GIFPAL AS STRING * 768
  2396.             
  2397.             CLS
  2398.             INPUT "GIF FILE NAME"; GIFFILENAME$
  2399.             PRINT
  2400.             OK = GIFGETINFO(GIFFILENAME$, XSIZE, YSIZE, NUMCOL, GIFPAL)
  2401.             IF OK = 1 THEN
  2402.                 A$ = "'" + GIFFILENAME$ + "' is identified as a 'Non-
  2403.             Interlaced' type"
  2404.                 A$ = A$ + "'GIF87a' GIF."
  2405.                 PRINT A$
  2406.                 A$ = "Dimensions are:" + STR$(XSIZE) + " pixels wide
  2407.             and" + STR$(YSIZE)
  2408.                 A$ = A$ + " pixels high"
  2409.                 PRINT A$
  2410.                 A$ = "Number of colors:" + STR$(NUMCOL)
  2411.                 PRINT A$
  2412.             END IF
  2413.             
  2414.             WHILE INKEY$ = ""
  2415.             WEND
  2416.             
  2417.             END
  2418.           
  2419.  
  2420.  
  2421.  
  2422.  
  2423.               
  2424.           GIFPUT
  2425.             
  2426.           ° Syntax
  2427.             
  2428.             ret = GIFPUT (Mode, X, Y, Filename$)
  2429.             
  2430.           ° Input
  2431.             
  2432.             Mode = pixel write mode (set=1, xor=2, or=3, and=4)
  2433.             X, Y = the location of the top, left corner of the gif image
  2434.             Filename$ = filename of the gif image to read
  2435.             
  2436.           ° Output
  2437.             
  2438.             ret = return status of function (1 = success)
  2439.             
  2440.           ° Usage
  2441.             
  2442.             Gifput reads the gif image from Filename$ and places it on
  2443.             the screen with the top, left corner at X, Y.  The image is
  2444.             automatically clipped to the currently defined viewport.
  2445.             The image's palette should be previously obtained by using
  2446.             gifgetinfo.
  2447.             
  2448.             For ease of programming the gif decoder requires that the
  2449.             image be non-interlaced, use only a global color map and be
  2450.             compressed according to GIF87A specifications.
  2451.             
  2452.             If gifput encounters no problems, the function will return a
  2453.             one.  Otherwise, the function will return one of several
  2454.             error codes concerning Filename$ as listed below:
  2455.             
  2456.             0 =  does not exist or there is some disk I/O problem
  2457.             -1 = does not have the GIF87A signature
  2458.             -2 = image is interlaced
  2459.             -3 = does not use a global color map
  2460.             -4 = has some general error
  2461.             
  2462.           ° See Also
  2463.             
  2464.             GIFGETINFO, SETVIEW
  2465.             
  2466.           ° Example
  2467.             
  2468.             REM DRAW A POINT AND CHECK TO MAKE SURE IT IS THERE
  2469.             REM $INCLUDE: 'SVGAQB10.BI'
  2470.             
  2471.             DEFINT A-Z
  2472.             DIM GIFPAL AS STRING * 768
  2473.             
  2474.             IF WHICHVGA = 0 THEN STOP
  2475.             IF WHICHMEM < 512 THEN STOP
  2476.             INPUT "GIF FILE NAME"; GIFFILENAME$
  2477.             
  2478.           
  2479.  
  2480.  
  2481.  
  2482.  
  2483.   
  2484.             VMODE = VIDEOMODEGET
  2485.             RES640
  2486.             
  2487.             OK = GIFGETINFO(GIFFILENAME$, XSIZE, YSIZE, NUMCOL, GIFPAL)
  2488.             IF OK = 1 THEN
  2489.                 FIXIT = 0
  2490.                 FOR A = 1 TO NUMCOL * 3 STEP 3
  2491.                     R = ASC(MID$(GIFPAL, A, 1))
  2492.                     G = ASC(MID$(GIFPAL, A + 1, 1))
  2493.                     B = ASC(MID$(GIFPAL, A + 2, 1))
  2494.                     IF R > 63 THEN
  2495.                         FIXIT = 1
  2496.                         EXIT FOR
  2497.                     END IF
  2498.                     IF G > 63 THEN
  2499.                         FIXIT = 1
  2500.                         EXIT FOR
  2501.                     END IF
  2502.                     IF B > 63 THEN
  2503.                         FIXIT = 1
  2504.                         EXIT FOR
  2505.                     END IF
  2506.                 NEXT A
  2507.                 IF FIXIT = 1 THEN
  2508.                     FOR A = 1 TO NUMCOL * 3
  2509.                         C = ASC(MID$(GIFPAL, A, 1))
  2510.                         MID$(GIFPAL, A, 1) = CHR$(C \ 4)
  2511.                     NEXT A
  2512.                 END IF
  2513.                 PALSET GIFPAL, 0, 255
  2514.                 OK = GIFPUT(1, 0, 0, GIFFILENAME$)
  2515.                 IF OK <> 1 THEN
  2516.                     SOUND 100, 5
  2517.                 END IF
  2518.             END IF
  2519.             
  2520.             WHILE INKEY$ = ""
  2521.             WEND
  2522.             VIDEOMODESET VMODE
  2523.             
  2524.             END
  2525.           
  2526.  
  2527.  
  2528.  
  2529.  
  2530.               
  2531.           JOYSTICKINFO
  2532.             
  2533.           ° Syntax
  2534.             
  2535.             JOYSTICKINFO JAX, JAY, JAButs, JBX, JBY, JBButs
  2536.             
  2537.           ° Input
  2538.             
  2539.             no input parameters
  2540.             
  2541.           ° Output
  2542.             
  2543.             JAX, JAY = horizontal and vertical values of joystick A
  2544.             JAButs = button status of joystick A
  2545.             JBX, JBY = horizontal and vertical values of joystick B
  2546.             JBBtus = button status of joystick B
  2547.             
  2548.           ° Usage
  2549.             
  2550.             Joystickinfo returns the current status of the two
  2551.             joysticks' position and buttons.  The position is returned
  2552.             in JAX, JAY for joystick A and JBX, JBY for joystick B.  The
  2553.             buttons' status is held in JAButs and JBButs.  For each
  2554.             joystick, button A - usually the fire button - is held in
  2555.             bit zero and button B is in bit one.  Button status is most
  2556.             easily checked with a bitwise and of JAButs (or JBButs) and
  2557.             the desired bit.
  2558.             
  2559.             Not all joysticks are constructed the same.  Therefore, it
  2560.             is recommended that any program using the joystick for more
  2561.             than just directional control complete a calibration of the
  2562.             joystick prior to usage.  For an example of joystick
  2563.             calibration, see the svgademo.exe source code.
  2564.             
  2565.           ° See Also
  2566.             
  2567.             WHICHJOYSTICK
  2568.             
  2569.           ° Example
  2570.             
  2571.             REM DISPLAY THE STATUS OF THE JOYSTICK PORT
  2572.             REM $INCLUDE: 'SVGAQB10.BI'
  2573.             DEFINT A-Z
  2574.             
  2575.             CLS
  2576.             WHILE INKEY$ = ""
  2577.                 JOYSTICKINFO JAX, JAY, JAButs, JBX, JBY, JBButs
  2578.                 LOCATE 1, 1
  2579.                 PRINT STRING$(40, 32)
  2580.                 LOCATE 1, 1
  2581.                 PRINT JAX; JAY; JAButs, JBX; JBY; JBButs;
  2582.                 SDELAY 4
  2583.             WEND
  2584.             END
  2585.           
  2586.  
  2587.  
  2588.  
  2589.  
  2590.               
  2591.           MOUSEBUTPRESS
  2592.             
  2593.           ° Syntax
  2594.             
  2595.             MOUSEBUTPRESS ReqButton, X, Y, Num, MouseButs
  2596.             
  2597.           ° Input
  2598.             
  2599.             ReqButton = button for which information is requested
  2600.             
  2601.           ° Output
  2602.             
  2603.             X, Y = current location of mouse cursor
  2604.             Num = number of times button has been pressed since last
  2605.             request
  2606.             MouseButs = current status of mouse buttons
  2607.             
  2608.           ° Usage
  2609.             
  2610.             Mousebutpress returns in Num the number of times a mouse
  2611.             button has been pressed since the last call to
  2612.             mousebutpress.  In addition the current status of the mouse
  2613.             cursor and buttons is returned.  The position is returned in
  2614.             X, Y.  The buttons' status is held in MouseButs.  The left
  2615.             button is held in bit zero, right button in bit one and
  2616.             center button - for three button mice - in bit two.  Button
  2617.             status is most easily checked with a bitwise and of
  2618.             MouseButs and the desired bit.  The button for which a
  2619.             history is desired is identified by the bits in ReqBut.
  2620.             However, only one bit may be set.  Therefore, only the
  2621.             values of 1, 2 and 4 are permitted.  If more than one bit in
  2622.             ReqBut is set, the function will exit and no information
  2623.             will be returned.
  2624.             
  2625.           ° See Also
  2626.             
  2627.             MOUSEBUTRELEASE, MOUSESTATUS
  2628.             
  2629.           ° Example
  2630.             
  2631.             REM ENABLE, SHOW, MOUSE / DISPLAY LEFT BUTTON PRESS HISTORY
  2632.             REM FOR THE LAST 2 SECONDS
  2633.             REM $INCLUDE: 'SVGAQB10.BI'
  2634.             DEFINT A-Z
  2635.             
  2636.             VMODE = VIDEOMODEGET
  2637.             IF WHICHVGA = 0 THEN STOP
  2638.             IF WHICHMOUSE = 0 THEN STOP
  2639.             RES640
  2640.             
  2641.             MOUSEENTER
  2642.             MOUSESHOW
  2643.             WHILE INKEY$ = ""
  2644.                 MOUSEBUTPRESS 1, X, Y, N, MBUTS
  2645.           
  2646.  
  2647.  
  2648.  
  2649.  
  2650.   
  2651.                 D$ = "MX=" + STR$(X)
  2652.                 L = LEN(D$)
  2653.                 IF L < 10 THEN
  2654.                     D$ = D$ + STRING$(8 - L, 32)
  2655.                 END IF
  2656.                 D$ = D$ + "MY=" + STR$(Y)
  2657.                 L = LEN(D$)
  2658.                 IF L < 20 THEN
  2659.                     D$ = D$ + STRING$(16 - L, 32)
  2660.                 END IF
  2661.                 D$ = D$ + "Number Of Times=" + STR$(N)
  2662.                 DRWSTRING 1, 15, 8, D$, 0, 0
  2663.                 SDELAY 80
  2664.             WEND
  2665.             MOUSEEXIT
  2666.             VIDEOMODESET VMODE
  2667.             
  2668.             END
  2669.           
  2670.  
  2671.  
  2672.  
  2673.  
  2674.             
  2675.           MOUSEBUTRELEASE
  2676.             
  2677.           ° Syntax
  2678.             
  2679.             MOUSEBUTRELEASE ReqButton, X, Y, Num, MouseButs
  2680.             
  2681.           ° Input
  2682.             
  2683.             ReqButton = button for which information is requested
  2684.             
  2685.           ° Output
  2686.             
  2687.             X, Y = current location of mouse cursor
  2688.             Num = number of times button has been released since last
  2689.             request
  2690.             MouseButs = current status of mouse buttons
  2691.             
  2692.           ° Usage
  2693.             
  2694.             Mousebutrelease returns in Num the number of times a mouse
  2695.             button has been released since the last call to
  2696.             mousebutrelease.  In addition the current status of the
  2697.             mouse cursor and buttons is returned.  The position is
  2698.             returned in X, Y.  The buttons' status is held in MouseButs.
  2699.             The left button is held in bit zero, right button in bit one
  2700.             and center button - for three button mice - in bit two.
  2701.             Button status is most easily checked with a bitwise and of
  2702.             MouseButs and the desired bit.  The button for which a
  2703.             history is desired is identified by the bits in ReqBut.
  2704.             However, only one bit may be set.  Therefore, only the
  2705.             values of 1, 2 and 4 are permitted.  If more than one bit in
  2706.             ReqBut is set, the function will exit and no information
  2707.             will be returned.
  2708.             
  2709.           ° See Also
  2710.             
  2711.             MOUSEBUTPRESS, MOUSESTATUS
  2712.             
  2713.           ° Example
  2714.             
  2715.             REM ENABLE, SHOW, MOUSE / DISPLAY LEFT BUTTON RELEASE
  2716.             HISTORY
  2717.             REM FOR THE LAST 2 SECONDS
  2718.             REM $INCLUDE: 'SVGAQB10.BI'
  2719.             DEFINT A-Z
  2720.             
  2721.             VMODE = VIDEOMODEGET
  2722.             IF WHICHVGA = 0 THEN STOP
  2723.             IF WHICHMOUSE = 0 THEN STOP
  2724.             RES640
  2725.             
  2726.             MOUSEENTER
  2727.             MOUSESHOW
  2728.             WHILE INKEY$ = ""
  2729.           
  2730.  
  2731.  
  2732.  
  2733.  
  2734.   
  2735.                 MOUSEBUTRELEASE 1, X, Y, N, MBUTS
  2736.                 D$ = "MX=" + STR$(X)
  2737.                 L = LEN(D$)
  2738.                 IF L < 10 THEN
  2739.                     D$ = D$ + STRING$(8 - L, 32)
  2740.                 END IF
  2741.                 D$ = D$ + "MY=" + STR$(Y)
  2742.                 L = LEN(D$)
  2743.                 IF L < 20 THEN
  2744.                     D$ = D$ + STRING$(16 - L, 32)
  2745.                 END IF
  2746.                 D$ = D$ + "Number Of Times=" + STR$(N)
  2747.                 DRWSTRING 1, 15, 8, D$, 0, 0
  2748.                 SDELAY 80
  2749.             WEND
  2750.             MOUSEEXIT
  2751.             VIDEOMODESET VMODE
  2752.             
  2753.             END
  2754.           
  2755.  
  2756.  
  2757.  
  2758.  
  2759.             
  2760.           MOUSECURSORSET
  2761.             
  2762.           ° Syntax
  2763.             
  2764.             MOUSECURSORSET HotSpotX, HotSpotY, MouseCursor$
  2765.             
  2766.           ° Input
  2767.             
  2768.             HotSpotX, HotSpotY = location within mouse cursor of hotspot
  2769.             MouseCursor$ = string * 384 containing mouse cursor data
  2770.             
  2771.           ° Output
  2772.             
  2773.             no value returned
  2774.             
  2775.           ° Usage
  2776.             
  2777.             Mousecursorset defines the cursor according to the data in
  2778.             MouseCursor$.  The hot spot for the cursor is set by
  2779.             HotSpotX, HotSpotY.  The values for HotSpotX and HotSpotY
  2780.             must be within the cursor.  Valid HotSpotX values are from 0
  2781.             to 15 and HotSpotY ranges from 0 to 23.
  2782.             
  2783.           ° See Also
  2784.             
  2785.             MOUSECURSORDEFAULT, MOUSEENTER, MOUSESHOW
  2786.             
  2787.           ° Example
  2788.             
  2789.             REM MAKE A BIG CURSOR, THEN RESTORE IT BACK TO THE DEFAULT
  2790.             REM $INCLUDE: 'SVGAQB10.BI'
  2791.             DEFINT A-Z
  2792.             
  2793.             VMODE = VIDEOMODEGET
  2794.             IF WHICHVGA = 0 THEN STOP
  2795.             IF WHICHMEM < 512 THEN STOP
  2796.             IF WHICHMOUSE = 0 THEN STOP
  2797.             RES640
  2798.             
  2799.             MOUSEENTER
  2800.             DIM BIGMOUSECURSOR AS STRING * 384
  2801.             FOR I = 1 TO 384
  2802.                 READ A
  2803.                 MID$(BIGMOUSECURSOR, I, 1) = CHR$(A)
  2804.             NEXT I
  2805.             MOUSECURSORSET 2, 2, BIGMOUSECURSOR
  2806.             MOUSERANGESET 0, 0, 639, 400
  2807.             MOUSESHOW
  2808.             A$ = "Press A Key To Return To The Default Cursor"
  2809.             DRWSTRING 1, 7, 0, A$, 0, 420
  2810.             WHILE INKEY$ = ""
  2811.             WEND
  2812.             MOUSECURSORDEFAULT
  2813.             A$ = "Press A Key To End                         "
  2814.           
  2815.  
  2816.  
  2817.  
  2818.  
  2819.   
  2820.             DRWSTRING 1, 7, 0, A$, 0, 420
  2821.             
  2822.             WHILE INKEY$ = ""
  2823.             WEND
  2824.             MOUSEEXIT
  2825.             VIDEOMODESET VMODE
  2826.             
  2827.             END
  2828.             
  2829.             REM *BIG ARROW MOUSE CURSOR DATA
  2830.             DATA
  2831.             0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255
  2832.             DATA 0,15,15,0,0,255,255,255,255,255,255,255,255,255,255,255
  2833.             DATA 0,15,15,15,15,0,0,0,255,255,255,255,255,255,255,255
  2834.             DATA 0,15,15,15,15,15,15,15,0,0,255,255,255,255,255,255
  2835.             DATA 0,15,15,15,15,15,15,15,15,15,0,0,0,255,255,255
  2836.             DATA 0,15,15,15,15,15,15,15,15,15,15,15,15,0,0,255
  2837.             DATA 0,15,15,15,15,15,15,15,15,15,15,15,15,15,0,255
  2838.             DATA 0,15,15,15,15,15,15,15,15,15,15,15,0,0,255,255
  2839.             DATA 0,15,15,15,15,15,15,15,15,15,15,0,255,255,255,255
  2840.             DATA 0,15,15,15,15,15,15,15,15,0,0,255,255,255,255,255
  2841.             DATA 0,15,15,15,15,15,15,15,15,0,255,255,255,255,255,255
  2842.             DATA 0,15,15,15,15,15,0,15,15,15,0,255,255,255,255,255
  2843.             DATA 0,15,15,15,15,0,0,15,15,15,0,255,255,255,255,255
  2844.             DATA 0,15,15,0,0,255,255,0,15,15,15,0,255,255,255,255
  2845.             DATA 0,15,0,255,255,255,255,0,15,15,15,0,255,255,255,255
  2846.             DATA 0,0,255,255,255,255,255,255,0,15,15,15,0,255,255,255
  2847.             DATA
  2848.             255,255,255,255,255,255,255,255,255,0,15,15,15,0,255,255
  2849.             DATA
  2850.             255,255,255,255,255,255,255,255,255,0,15,15,15,0,255,255
  2851.             DATA
  2852.             255,255,255,255,255,255,255,255,255,255,0,15,15,15,0,255
  2853.             DATA
  2854.             255,255,255,255,255,255,255,255,255,255,255,0,15,15,15,0
  2855.             DATA
  2856.             255,255,255,255,255,255,255,255,255,255,255,0,15,15,15,0
  2857.             DATA
  2858.             255,255,255,255,255,255,255,255,255,255,255,255,0,15,15,0
  2859.             DATA
  2860.             255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0
  2861.             DATA
  2862.             255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
  2863.             255
  2864.           
  2865.  
  2866.  
  2867.  
  2868.  
  2869.               
  2870.           MOUSECURSORDEFAULT
  2871.             
  2872.           ° Syntax
  2873.             
  2874.             MOUSECURSORDEFAULT
  2875.             
  2876.           ° Input
  2877.             
  2878.             no input parameters
  2879.             
  2880.           ° Output
  2881.             
  2882.             no value returned
  2883.             
  2884.           ° Usage
  2885.             
  2886.             Mousecursordefault defines the cursor to be a small arrow
  2887.             with the hot spot in the upper, left corner.  This is the
  2888.             cursor set when mouseenter is called.
  2889.             
  2890.           ° See Also
  2891.             
  2892.             MOUSECURSORSET, MOUSEENTER
  2893.             
  2894.           ° Example
  2895.             
  2896.             REM MAKE A BIG CURSOR, THEN RESTORE IT BACK TO THE DEFAULT
  2897.             REM $INCLUDE: 'SVGAQB10.BI'
  2898.             DEFINT A-Z
  2899.             
  2900.             VMODE = VIDEOMODEGET
  2901.             IF WHICHVGA = 0 THEN STOP
  2902.             IF WHICHMEM < 512 THEN STOP
  2903.             IF WHICHMOUSE = 0 THEN STOP
  2904.             RES640
  2905.             
  2906.             MOUSEENTER
  2907.             DIM BIGMOUSECURSOR AS STRING * 384
  2908.             FOR I = 1 TO 384
  2909.                 READ A
  2910.                 MID$(BIGMOUSECURSOR, I, 1) = CHR$(A)
  2911.             NEXT I
  2912.             MOUSECURSORSET 2, 2, BIGMOUSECURSOR
  2913.             MOUSERANGESET 0, 0, 639, 400
  2914.             MOUSESHOW
  2915.             A$ = "Press A Key To Return To The Default Cursor"
  2916.             DRWSTRING 1, 7, 0, A$, 0, 420
  2917.             WHILE INKEY$ = ""
  2918.             WEND
  2919.             MOUSECURSORDEFAULT
  2920.             A$ = "Press A Key To End                         "
  2921.             DRWSTRING 1, 7, 0, A$, 0, 420
  2922.             
  2923.             WHILE INKEY$ = ""
  2924.           
  2925.  
  2926.  
  2927.  
  2928.  
  2929.   
  2930.             WEND
  2931.             MOUSEEXIT
  2932.             VIDEOMODESET VMODE
  2933.             
  2934.             END
  2935.             
  2936.             REM *BIG ARROW MOUSE CURSOR DATA
  2937.             DATA
  2938.             0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255
  2939.             DATA 0,15,15,0,0,255,255,255,255,255,255,255,255,255,255,255
  2940.             DATA 0,15,15,15,15,0,0,0,255,255,255,255,255,255,255,255
  2941.             DATA 0,15,15,15,15,15,15,15,0,0,255,255,255,255,255,255
  2942.             DATA 0,15,15,15,15,15,15,15,15,15,0,0,0,255,255,255
  2943.             DATA 0,15,15,15,15,15,15,15,15,15,15,15,15,0,0,255
  2944.             DATA 0,15,15,15,15,15,15,15,15,15,15,15,15,15,0,255
  2945.             DATA 0,15,15,15,15,15,15,15,15,15,15,15,0,0,255,255
  2946.             DATA 0,15,15,15,15,15,15,15,15,15,15,0,255,255,255,255
  2947.             DATA 0,15,15,15,15,15,15,15,15,0,0,255,255,255,255,255
  2948.             DATA 0,15,15,15,15,15,15,15,15,0,255,255,255,255,255,255
  2949.             DATA 0,15,15,15,15,15,0,15,15,15,0,255,255,255,255,255
  2950.             DATA 0,15,15,15,15,0,0,15,15,15,0,255,255,255,255,255
  2951.             DATA 0,15,15,0,0,255,255,0,15,15,15,0,255,255,255,255
  2952.             DATA 0,15,0,255,255,255,255,0,15,15,15,0,255,255,255,255
  2953.             DATA 0,0,255,255,255,255,255,255,0,15,15,15,0,255,255,255
  2954.             DATA
  2955.             255,255,255,255,255,255,255,255,255,0,15,15,15,0,255,255
  2956.             DATA
  2957.             255,255,255,255,255,255,255,255,255,0,15,15,15,0,255,255
  2958.             DATA
  2959.             255,255,255,255,255,255,255,255,255,255,0,15,15,15,0,255
  2960.             DATA
  2961.             255,255,255,255,255,255,255,255,255,255,255,0,15,15,15,0
  2962.             DATA
  2963.             255,255,255,255,255,255,255,255,255,255,255,0,15,15,15,0
  2964.             DATA
  2965.             255,255,255,255,255,255,255,255,255,255,255,255,0,15,15,0
  2966.             DATA
  2967.             255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0
  2968.             DATA
  2969.             255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
  2970.             255
  2971.           
  2972.  
  2973.  
  2974.  
  2975.  
  2976.               
  2977.           MOUSEENTER
  2978.             
  2979.           ° Syntax
  2980.             
  2981.             MOUSEENTER
  2982.             
  2983.           ° Input
  2984.             
  2985.             no input parameters
  2986.             
  2987.           ° Output
  2988.             
  2989.             no value returned
  2990.             
  2991.           ° Usage
  2992.             
  2993.             Mouseenter must be called before any other mouse functions.
  2994.             It initializes all of the mouse abilities including
  2995.             installing the SVGAQB10 mouse display driver.  Mouseenter
  2996.             initializes the default mouse cursor, the default
  2997.             sensitivity and sets the range to the current screen
  2998.             resolution.  The mouse cursor location is set to the middle
  2999.             of the screen.
  3000.             
  3001.           ° See Also
  3002.             
  3003.             MOUSEEXIT, MOUSEHIDE, MOUSESHOW
  3004.             
  3005.           ° Example
  3006.             
  3007.             REM ENABLE AND SHOW THE MOUSE
  3008.             REM $INCLUDE: 'SVGAQB10.BI'
  3009.             DEFINT A-Z
  3010.             
  3011.             VMODE = VIDEOMODEGET
  3012.             IF WHICHVGA = 0 THEN STOP
  3013.             IF WHICHMOUSE = 0 THEN STOP
  3014.             RES640
  3015.             
  3016.             MOUSEENTER
  3017.             MOUSESHOW
  3018.             
  3019.             WHILE INKEY$ = ""
  3020.             WEND
  3021.             MOUSEEXIT
  3022.             VIDEOMODESET VMODE
  3023.             
  3024.             END
  3025.           
  3026.  
  3027.  
  3028.  
  3029.  
  3030.               
  3031.           MOUSEEXIT
  3032.             
  3033.           ° Syntax
  3034.             
  3035.             MOUSEEXIT
  3036.             
  3037.           ° Input
  3038.             
  3039.             no input parameters
  3040.             
  3041.           ° Output
  3042.             
  3043.             no value returned
  3044.             
  3045.           ° Usage
  3046.             
  3047.             Mouseexit properly disables all of the mouse abilities.
  3048.             This function also removes the SVGAQB10 mouse display
  3049.             driver.
  3050.             
  3051.           ° See Also
  3052.             
  3053.             MOUSEENTER, MOUSEHIDE, MOUSESHOW
  3054.             
  3055.           ° Example
  3056.             
  3057.             REM ENABLE AND SHOW THE MOUSE,THEN DISABLE IT
  3058.             REM $INCLUDE: 'SVGAQB10.BI'
  3059.             DEFINT A-Z
  3060.             
  3061.             VMODE = VIDEOMODEGET
  3062.             IF WHICHVGA = 0 THEN STOP
  3063.             IF WHICHMOUSE = 0 THEN STOP
  3064.             RES640
  3065.             
  3066.             MOUSEENTER
  3067.             MOUSESHOW
  3068.             
  3069.             WHILE INKEY$ = ""
  3070.             WEND
  3071.             MOUSEEXIT
  3072.             VIDEOMODESET VMODE
  3073.             
  3074.             END
  3075.           
  3076.  
  3077.  
  3078.  
  3079.  
  3080.               
  3081.           MOUSEHIDE
  3082.             
  3083.           ° Syntax
  3084.             
  3085.             MOUSEHIDE
  3086.             
  3087.           ° Input
  3088.             
  3089.             no input parameters
  3090.             
  3091.           ° Output
  3092.             
  3093.             no value returned
  3094.             
  3095.           ° Usage
  3096.             
  3097.             Mousehide turns off the mouse display driver and removes the
  3098.             cursor from the display.  It is recommended to hide the
  3099.             mouse any time something will be drawn in its general
  3100.             vicinity.  Note, however, that although the cursor is not
  3101.             visible, all other mouse abilities remain active.
  3102.             
  3103.           ° See Also
  3104.             
  3105.             MOUSEENTER, MOUSEEXIT, MOUSESHOW
  3106.             
  3107.           ° Example
  3108.             
  3109.             REM ENABLE, SHOW, AND THE HIDE THE MOUSE
  3110.             REM $INCLUDE: 'SVGAQB10.BI'
  3111.             DEFINT A-Z
  3112.             
  3113.             VMODE = VIDEOMODEGET
  3114.             IF WHICHVGA = 0 THEN STOP
  3115.             IF WHICHMOUSE = 0 THEN STOP
  3116.             RES640
  3117.             
  3118.             MOUSEENTER
  3119.             MOUSESHOW
  3120.             WHILE INKEY$ = ""
  3121.             WEND
  3122.             MOUSEHIDE
  3123.             
  3124.             WHILE INKEY$ = ""
  3125.             WEND
  3126.             MOUSEEXIT
  3127.             VIDEOMODESET VMODE
  3128.             
  3129.             END
  3130.           
  3131.  
  3132.  
  3133.  
  3134.  
  3135.               
  3136.           MOUSEINFO
  3137.             
  3138.           ° Syntax
  3139.             
  3140.             MOUSEINFO MajorVersion, MinorVersion, MouseType, IRQ
  3141.             
  3142.           ° Input
  3143.             
  3144.             no input parameters
  3145.             
  3146.           ° Output
  3147.             
  3148.             MajorVersion = Microsoft compatible mouse driver major
  3149.             version number
  3150.             MinorVersion = Microsoft compatible mouse driver minor
  3151.             version number
  3152.             MouseType = type of mouse installed
  3153.             IRQ = the interrupt used by the mouse
  3154.             
  3155.           ° Usage
  3156.             
  3157.             Mouseinfo returns information about the mouse and its
  3158.             installed driver.  The driver must be Microsoft compatible.
  3159.             This information can be used to determine whether the mouse
  3160.             functions in this library will operate correctly.  For
  3161.             proper operation the driver version number must be greater
  3162.             than X.XX.  IRQ gives the interrupt number of the mouse -
  3163.             probably 3 or 4.  MouseType returns information about the
  3164.             type of hardware installed according to the following table:
  3165.             
  3166.             0 =  unknown type
  3167.             1 =  bus mouse
  3168.             2 =  serial mouse
  3169.             3 =  Inport mouse
  3170.             4 =  PS/2 mouse
  3171.             5 =  HP mouse
  3172.             
  3173.           ° See Also
  3174.             
  3175.             WHICHMOUSE
  3176.             
  3177.           ° Example
  3178.             
  3179.             REM RETURN INFORMATION ABOUT THE MOUSE
  3180.             REM $INCLUDE: 'SVGAQB10.BI'
  3181.             DEFINT A-Z
  3182.             
  3183.             CLS
  3184.             MOUSE = WHICHMOUSE
  3185.             IF MOUSE > 0 THEN
  3186.                 MOUSEINFO MJV, MNV, TP, I
  3187.                 VER$ = STR$(MNV)
  3188.                 L = LEN(VER$)
  3189.                 VER$ = STR$(MJV) + "." + RIGHT$(VER$, L - 1)
  3190.           
  3191.  
  3192.  
  3193.  
  3194.  
  3195.   
  3196.                 VER$ = "Software driver version is" + VER$
  3197.                 VER$ = VER$ + " (Microsoft equalvalent version)."
  3198.                 SELECT CASE TP
  3199.                     CASE IS = 1
  3200.                         TYPE$ = "bus mouse"
  3201.                     CASE IS = 2
  3202.                         TYPE$ = "serial mouse"
  3203.                     CASE IS = 3
  3204.                         TYPE$ = "Inport mouse"
  3205.                     CASE IS = 4
  3206.                         TYPE$ = "PS/2 mouse"
  3207.                     CASE IS = 5
  3208.                         TYPE$ = "HP mouse"
  3209.                     CASE ELSE
  3210.                         TYPE$ = "unknown type"
  3211.                 END SELECT
  3212.                 PRINT "Microsoft compatable " + TYPE$ + " detected
  3213.             with";
  3214.                 PRINT STR$(MOUSE) + " buttons on IRQ" + STR$(I) + "."
  3215.                 PRINT VER$
  3216.             ELSE
  3217.                 PRINT "No Microsoft compatable mouse detected."
  3218.             END IF
  3219.             PRINT
  3220.             
  3221.             WHILE INKEY$ = ""
  3222.             WEND
  3223.             
  3224.             END
  3225.           
  3226.  
  3227.  
  3228.  
  3229.  
  3230.               
  3231.           MOUSELOCSET
  3232.             
  3233.           ° Syntax
  3234.             
  3235.             MOUSELOCSET X, Y
  3236.             
  3237.           ° Input
  3238.             
  3239.             X, Y = location on screen
  3240.             
  3241.           ° Output
  3242.             
  3243.             no value returned
  3244.             
  3245.           ° Usage
  3246.             
  3247.             Mouselocset moves the mouse cursor the location on the
  3248.             screen specified by X, Y.  If either X or Y is outside of
  3249.             the currently permitted mouse range, it is set to the
  3250.             closest border.  The currently permitted mouse range is the
  3251.             current screen resolution or the last called mouserangeset.
  3252.             
  3253.           ° See Also
  3254.             
  3255.             MOUSEENTER, MOUSERANGESET
  3256.             
  3257.           ° Example
  3258.             
  3259.             REM ENABLE AND SHOW THE MOUSE THEN MOVE IT TO THE ORIGIN
  3260.             REM $INCLUDE: 'SVGAQB10.BI'
  3261.             DEFINT A-Z
  3262.             
  3263.             VMODE = VIDEOMODEGET
  3264.             IF WHICHVGA = 0 THEN STOP
  3265.             IF WHICHMOUSE = 0 THEN STOP
  3266.             RES640
  3267.             
  3268.             MOUSEENTER
  3269.             MOUSESHOW
  3270.             WHILE INKEY$ = ""
  3271.             WEND
  3272.             MOUSELOCSET 0, 0
  3273.             
  3274.             WHILE INKEY$ = ""
  3275.             WEND
  3276.             MOUSEEXIT
  3277.             VIDEOMODESET VMODE
  3278.             
  3279.             END
  3280.           
  3281.  
  3282.  
  3283.  
  3284.  
  3285.               
  3286.           MOUSERANGESET
  3287.             
  3288.           ° Syntax
  3289.             
  3290.             MOUSERANGESET X1, Y1, X2, Y2
  3291.             
  3292.           ° Input
  3293.             
  3294.             X1, Y1 = location on screen of top, left corner of range
  3295.             X2, Y2 = location on screen of bottom, right corner of range
  3296.             
  3297.           ° Output
  3298.             
  3299.             no value returned
  3300.             
  3301.           ° Usage
  3302.             
  3303.             Mouserangset defines a permissible range on the screen for
  3304.             mouse movement.  The mouse is automatically positioned in
  3305.             the center of this range.
  3306.             
  3307.           ° See Also
  3308.             
  3309.             MOUSESTATUS
  3310.             
  3311.           ° Example
  3312.             
  3313.             REM ENABLE, SHOW, AND SET A RANGE FOR THE MOUSE
  3314.             REM $INCLUDE: 'SVGAQB10.BI'
  3315.             DEFINT A-Z
  3316.             
  3317.             VMODE = VIDEOMODEGET
  3318.             IF WHICHVGA = 0 THEN STOP
  3319.             IF WHICHMOUSE = 0 THEN STOP
  3320.             RES640
  3321.             
  3322.             MOUSEENTER
  3323.             DRWBOX 1, 10, 100, 100, 539, 379
  3324.             MOUSERANGESET 100, 100, 539, 379
  3325.             MOUSESHOW
  3326.             
  3327.             WHILE INKEY$ = ""
  3328.             WEND
  3329.             MOUSEEXIT
  3330.             VIDEOMODESET VMODE
  3331.             
  3332.             END
  3333.           
  3334.  
  3335.  
  3336.  
  3337.  
  3338.               
  3339.           MOUSERESTORESTATE
  3340.             
  3341.           ° Syntax
  3342.             
  3343.             MOUSERESTORESTATE MouseBuf
  3344.             
  3345.           ° Input
  3346.             
  3347.             MouseBuf = buffer holding complete mouse status information
  3348.             
  3349.           ° Output
  3350.             
  3351.             no value returned
  3352.             
  3353.           ° Usage
  3354.             
  3355.             Mouserestorestate completely restores a previously saved
  3356.             mouse status as contained in MouseBuf.  The mouse status
  3357.             must have been already stored in MouseBuf by mousesavestate.
  3358.             
  3359.           ° See Also
  3360.             
  3361.             MOUSESAVESTATE, MOUSESTORAGESIZE
  3362.             
  3363.           ° Example
  3364.             
  3365.             REM SAVE THE CURRENT MOUSE DRIVER STATUS,SHELL OUT, RESTORE
  3366.             IT
  3367.             REM $INCLUDE: 'SVGAQB10.BI'
  3368.             DEFINT A-Z
  3369.             
  3370.             IF WHICHMOUSE = 0 THEN STOP
  3371.             BUFSIZE = MOUSESTORAGESIZE \ 2 + 1
  3372.             DIM MBUFFER(0 TO BUFSIZE) AS INTEGER
  3373.             MOUSESAVESTATE MBUFFER(0)
  3374.             
  3375.             PRINT "TYPE 'EXIT' TO RETURN TO THE PROGRAM"
  3376.             SHELL
  3377.             
  3378.             CLS
  3379.             MOUSERESTORESTATE MBUFFER(0)
  3380.             PRINT "DRIVER RESTORED..."
  3381.             
  3382.             WHILE INKEY$ = ""
  3383.             WEND
  3384.             
  3385.             END
  3386.           
  3387.  
  3388.  
  3389.  
  3390.  
  3391.               
  3392.           MOUSESAVESTATE
  3393.             
  3394.           ° Syntax
  3395.             
  3396.             MOUSESAVESTATE MouseBuf
  3397.             
  3398.           ° Input
  3399.             
  3400.             MouseBuf = buffer holding complete mouse status information
  3401.             
  3402.           ° Output
  3403.             
  3404.             no value returned
  3405.             
  3406.           ° Usage
  3407.             
  3408.             Mousesavestate saves the complete mouse status in MouseBuf.
  3409.             The size of MouseBuf in bytes is defined by mousestoragesize
  3410.             which should called first.
  3411.             
  3412.           ° See Also
  3413.             
  3414.             MOUSERESTORESTATE, MOUSESTORAGESIZE
  3415.             
  3416.           ° Example
  3417.             
  3418.             REM SAVE THE CURRENT MOUSE DRIVER STATUS
  3419.             REM $INCLUDE: 'SVGAQB10.BI'
  3420.             DEFINT A-Z
  3421.             
  3422.             IF WHICHMOUSE = 0 THEN STOP
  3423.             BUFSIZE = MOUSESTORAGESIZE \ 2 + 1
  3424.             DIM MBUFFER(0 TO BUFSIZE) AS INTEGER
  3425.             MOUSESAVESTATE MBUFFER(0)
  3426.             
  3427.             WHILE INKEY$ = ""
  3428.             WEND
  3429.             
  3430.             END
  3431.           
  3432.  
  3433.  
  3434.  
  3435.  
  3436.               
  3437.           MOUSESENSSET
  3438.             
  3439.           ° Syntax
  3440.             
  3441.             MOUSESENSSET XSens, YSens
  3442.             
  3443.           ° Input
  3444.             
  3445.             XSens = number of mickeys per pixel horizontally (default =
  3446.             8)
  3447.             YSens = number of mickeys per pixel vertically (default =
  3448.             16)
  3449.             
  3450.           ° Output
  3451.             
  3452.             no value returned
  3453.             
  3454.           ° Usage
  3455.             
  3456.             Mousesensset defines the relationship between mouse movement
  3457.             and cursor movement on the screen.  A mickey is defined as
  3458.             1/200th of an inch.  The ratio between mickeys and pixels is
  3459.             specified by XSens and YSens in the horizontal and vertical
  3460.             directions respectively.  The default values are assigned
  3461.             whenever mouseenter or mouseexit are called.
  3462.             
  3463.           ° See Also
  3464.             
  3465.             MOUSEENTER, MOUSEEXIT, MOUSESTATUS
  3466.             
  3467.           ° Example
  3468.             
  3469.             REM ENABLE, SHOW THE MOUSE AND MAKE IT VERY SENSITIVE
  3470.             REM $INCLUDE: 'SVGAQB10.BI'
  3471.             DEFINT A-Z
  3472.             
  3473.             VMODE = VIDEOMODEGET
  3474.             IF WHICHVGA = 0 THEN STOP
  3475.             IF WHICHMOUSE = 0 THEN STOP
  3476.             RES640
  3477.             
  3478.             MOUSEENTER
  3479.             MOUSESHOW
  3480.             MOUSESENSSET 100, 100, 5
  3481.             
  3482.             
  3483.             WHILE INKEY$ = ""
  3484.             WEND
  3485.             MOUSEEXIT
  3486.             VIDEOMODESET VMODE
  3487.             
  3488.             END
  3489.           
  3490.  
  3491.  
  3492.  
  3493.  
  3494.               
  3495.           MOUSESHOW
  3496.             
  3497.           ° Syntax
  3498.             
  3499.             MOUSESHOW
  3500.             
  3501.           ° Input
  3502.             
  3503.             no input parameters
  3504.             
  3505.           ° Output
  3506.             
  3507.             no value returned
  3508.             
  3509.           ° Usage
  3510.             
  3511.             Mouseshow enables the mouse display driver and places the
  3512.             cursor on the screen.  The cursor is only updated when the
  3513.             mouse is moved.  Therefore, it is recommended to hide the
  3514.             cursor when drawing on the screen to avoid unexpected
  3515.             results.
  3516.             
  3517.           ° See Also
  3518.             
  3519.             MOUSEENTER, MOUSEEXIT, MOUSEHIDE
  3520.             
  3521.           ° Example
  3522.             
  3523.             REM ENABLE AND SHOW THE MOUSE
  3524.             REM $INCLUDE: 'SVGAQB10.BI'
  3525.             DEFINT A-Z
  3526.             
  3527.             VMODE = VIDEOMODEGET
  3528.             IF WHICHVGA = 0 THEN STOP
  3529.             IF WHICHMOUSE = 0 THEN STOP
  3530.             RES640
  3531.             
  3532.             MOUSEENTER
  3533.             MOUSESHOW
  3534.             
  3535.             WHILE INKEY$ = ""
  3536.             WEND
  3537.             MOUSEEXIT
  3538.             VIDEOMODESET VMODE
  3539.             
  3540.             END
  3541.           
  3542.  
  3543.  
  3544.  
  3545.  
  3546.               
  3547.           MOUSESTATUS
  3548.             
  3549.           ° Syntax
  3550.             
  3551.             MOUSESTATUS X, Y, MouseButs
  3552.             
  3553.           ° Input
  3554.             
  3555.             no input parameters
  3556.             
  3557.           ° Output
  3558.             
  3559.             X, Y = mouse position on screen
  3560.             MouseButs = status of mouse buttons
  3561.             
  3562.           ° Usage
  3563.             
  3564.             Mousestatus returns the current status of the mouse position
  3565.             and buttons.  The position is returned in X, Y.  The
  3566.             buttons' status is held in MouseButs.  The left button is
  3567.             held in bit zero, right button in bit one and center button
  3568.             - for three button mice - in bit two.  Button status is most
  3569.             easily checked with a bitwise and of MouseButs and the
  3570.             desired bit.
  3571.             
  3572.           ° See Also
  3573.             
  3574.             MOUSERANGESET, MOUSESENSSET
  3575.             
  3576.           ° Example
  3577.             
  3578.             REM ENABLE, SHOW, DISPLAY MOUSE STATUS
  3579.             REM $INCLUDE: 'SVGAQB10.BI'
  3580.             DEFINT A-Z
  3581.             
  3582.             VMODE = VIDEOMODEGET
  3583.             IF WHICHVGA = 0 THEN STOP
  3584.             IF WHICHMOUSE = 0 THEN STOP
  3585.             RES640
  3586.             MOUSEENTER
  3587.             MOUSESHOW
  3588.             WHILE INKEY$ = ""
  3589.                 MOUSESTATUS X, Y, MButs
  3590.                 D$ = "MX=" + STR$(X)
  3591.                 L = LEN(D$)
  3592.                 IF L < 10 THEN
  3593.                     D$ = D$ + STRING$(8 - L, 32)
  3594.                 END IF
  3595.                 D$ = D$ + "MY=" + STR$(Y)
  3596.                 L = LEN(D$)
  3597.                 IF L < 20 THEN
  3598.                     D$ = D$ + STRING$(16 - L, 32)
  3599.                 END IF
  3600.                 D$ = D$ + "MBUTS=" + STR$(MButs)
  3601.           
  3602.  
  3603.  
  3604.  
  3605.  
  3606.   
  3607.                 DRWSTRING 1, 15, 8, D$, 0, 0
  3608.             WEND
  3609.             MOUSEEXIT
  3610.             VIDEOMODESET VMODE
  3611.             END
  3612.           
  3613.  
  3614.  
  3615.  
  3616.  
  3617.             
  3618.           MOUSESTORAGESIZE
  3619.             
  3620.           ° Syntax
  3621.             
  3622.             bufsize = MOUSESTORAGESIZE
  3623.             
  3624.           ° Input
  3625.             
  3626.             no input parameters
  3627.             
  3628.           ° Output
  3629.             
  3630.             bufsize = size of buffer in bytes to store complete mouse
  3631.             status
  3632.             
  3633.           ° Usage
  3634.             
  3635.             Mousestoragesize determines the proper size buffer to hold
  3636.             the complete mouse status information.  This buffer should
  3637.             be created before calling Mousesavestate.
  3638.             
  3639.           ° See Also
  3640.             
  3641.             MOUSERESTORESTATE, MOUSESAVESTATE
  3642.             
  3643.           ° Example
  3644.             
  3645.             REM RETURN THE SIZE IN BYTES NEEDED TO SAVE THE MOUSE STATUS
  3646.             REM $INCLUDE: 'SVGAQB10.BI'
  3647.             DEFINT A-Z
  3648.             
  3649.             CLS
  3650.             IF WHICHMOUSE = 0 THEN STOP
  3651.             A$ = "The Mouse Driver Requires A" + STR$(MOUSESTORAGESIZE)
  3652.             + " Byte Buffer "
  3653.             A$ = A$ + "To Save Current Status."
  3654.             PRINT A$
  3655.             PRINT
  3656.             
  3657.             WHILE INKEY$ = ""
  3658.             WEND
  3659.             
  3660.             END
  3661.           
  3662.  
  3663.  
  3664.  
  3665.  
  3666.               
  3667.           OVERSCANSET
  3668.             
  3669.           ° Syntax
  3670.             
  3671.             OVERSCAN Color
  3672.             
  3673.           ° Input
  3674.             
  3675.             Color = index to color in current palette
  3676.             
  3677.           ° Output
  3678.             
  3679.             no value returned
  3680.             
  3681.           ° Usage
  3682.             
  3683.             Overscanset sets the overscan region to the specified color.
  3684.             The overscan region is the area between the usable pixel
  3685.             screen and the region not scanned by the monitor.  Normally,
  3686.             the overscan is color zero which is defined as black the
  3687.             majority of the time.  The overscan color is reset to zero
  3688.             anytime a res### function is called.
  3689.             
  3690.           ° See Also
  3691.             
  3692.             RES320, RES640, RES800, RES1024
  3693.             
  3694.           ° Example
  3695.             
  3696.             REM SET THE OVERSCAN COLOR TO GREEN
  3697.             REM $INCLUDE: 'SVGAQB10.BI'
  3698.             DEFINT A-Z
  3699.             
  3700.             VMODE = VIDEOMODEGET
  3701.             IF WHICHVGA = 0 THEN STOP
  3702.             RES320
  3703.             
  3704.             OVERSCANSET 10
  3705.             
  3706.             WHILE INKEY$ = ""
  3707.             WEND
  3708.             VIDEOMODESET VMODE
  3709.             
  3710.             END
  3711.           
  3712.  
  3713.  
  3714.  
  3715.  
  3716.               
  3717.           PALCHGAUTO
  3718.             
  3719.           ° Syntax
  3720.             
  3721.             PALCHGAUTO Pal$, NewPal$, FirstColor, LastColor, Speed
  3722.             
  3723.           ° Input
  3724.             
  3725.             Pal$ = string * 768 containing initial palette
  3726.             NewPal$ = string *768 containing new palette
  3727.             FirstColor = index into palette where change will begin
  3728.             LastColor = index into palette where change will end
  3729.             Speed = speed of change
  3730.             
  3731.           ° Output
  3732.             
  3733.             no value returned
  3734.             
  3735.           ° Usage
  3736.             
  3737.             Palchgauto smoothly fades the colors between FirstColor and
  3738.             LastColor from the palette Pal$ to NewPal$.  The speed of
  3739.             the fade is set by Speed which is percentage change between
  3740.             each step of the fade.  Only values between 1 and 128 are
  3741.             valid where 1 represents a one percent change between steps
  3742.             and 128 (80 hex) represents fifty percent change between
  3743.             steps.  A Speed of 128 would then have only two steps.  A
  3744.             Speed outside of the valid range causes the function to
  3745.             immediately return without making any changes.  The time
  3746.             required to accomplish the entire fade is approximately
  3747.             equal to 0.033 seconds times 256 divided by Speed.
  3748.             Palchgauto does not modify either Pal$ or NewPal$.
  3749.             
  3750.           ° See Also
  3751.             
  3752.             PALCHGSTEP, PALDIMSTEP, PALIOAUTO
  3753.             
  3754.           ° Example
  3755.             
  3756.             REM AUTOFADE FROM ONE PALETTE TO ANOTHER AND BACK AGAIN
  3757.             REM $INCLUDE: 'SVGAQB10.BI'
  3758.             DEFINT A-Z
  3759.             DIM PAL AS STRING * 768
  3760.             DIM NEWPAL AS STRING * 768
  3761.             
  3762.             VMODE = VIDEOMODEGET
  3763.             IF WHICHVGA = 0 THEN STOP
  3764.             IF WHICHMEM < 512 THEN STOP
  3765.             RES640
  3766.             
  3767.             PALGET PAL, 0, 255
  3768.             FOR I = 1 TO 768
  3769.                 MID$(NEWPAL, I, 1) = MID$(PAL, 769 - I, 1)
  3770.             NEXT I
  3771.           
  3772.  
  3773.  
  3774.  
  3775.  
  3776.   
  3777.             COLR = 0
  3778.             FOR I = 0 TO 639
  3779.                 DRWLINE 1, COLR, I, 0, I, 479
  3780.                 COLR = COLR + 1
  3781.                 IF COLR > 255 THEN
  3782.                     COLR = 0
  3783.                 END IF
  3784.             NEXT I
  3785.             
  3786.             PALCHGAUTO PAL, NEWPAL, 0, 255, 2
  3787.             PALCHGAUTO NEWPAL, PAL, 0, 255, 2
  3788.             
  3789.             
  3790.             WHILE INKEY$ = ""
  3791.             WEND
  3792.             VIDEOMODESET VMODE
  3793.             
  3794.             END
  3795.           
  3796.  
  3797.  
  3798.  
  3799.  
  3800.               
  3801.           PALCHGSTEP
  3802.             
  3803.           ° Syntax
  3804.             
  3805.             PALCHGSTEP Pal$, NewPal$, FirstColor, LastColor, Percent
  3806.             
  3807.           ° Input
  3808.             
  3809.             Pal$ = string * 768 containing initial palette
  3810.             NewPal$ = string * 768 containing new palette
  3811.             FirstColor = index into palette where change will begin
  3812.             LastColor = index into palette where change will end
  3813.             Percent = percent step from current palette to new palette
  3814.             
  3815.           ° Output
  3816.             
  3817.             no value returned
  3818.             
  3819.           ° Usage
  3820.             
  3821.             Palchgstep changes the palette colors between FirstColor and
  3822.             LastColor by Percent from Pal$ to NewPal$.  This function
  3823.             works very much like palchgauto except it only takes a
  3824.             single step and returns.  The step taken is a percentage
  3825.             specified by Percent where 256 (100 hex) is a 100 percent
  3826.             change.  The valid range for Percent is 0 to 256.  Values
  3827.             beyond this range cause the function to immediately return
  3828.             without making any changes.  A loop from 4 to 256 by fours
  3829.             using palchgstep would have similar results as palchgauto
  3830.             with a speed of 4.  Neither Pal$, nor NewPal$ are modified.
  3831.             
  3832.           ° See Also
  3833.             
  3834.             PALCHGAUTO, PALDIMSTEP, PALIOAUTO
  3835.             
  3836.           ° Example
  3837.             
  3838.             REM STEP FADE FROM ONE PALETTE TO ANOTHER AND BACK AGAIN
  3839.             FAST
  3840.             REM $INCLUDE: 'SVGAQB10.BI'
  3841.             DEFINT A-Z
  3842.             DIM PAL AS STRING * 768
  3843.             DIM NEWPAL AS STRING * 768
  3844.             
  3845.             VMODE = VIDEOMODEGET
  3846.             IF WHICHVGA = 0 THEN STOP
  3847.             IF WHICHMEM < 512 THEN STOP
  3848.             RES640
  3849.             
  3850.             PALGET PAL, 0, 255
  3851.             FOR I = 1 TO 768
  3852.                 MID$(NEWPAL, I, 1) = MID$(PAL, 769 - I, 1)
  3853.             NEXT I
  3854.             COLR = 0
  3855.           
  3856.  
  3857.  
  3858.  
  3859.  
  3860.   
  3861.             FOR I = 0 TO 639
  3862.                 DRWLINE 1, COLR, I, 0, I, 479
  3863.                 COLR = COLR + 1
  3864.                 IF COLR > 255 THEN
  3865.                     COLR = 0
  3866.                 END IF
  3867.             NEXT I
  3868.             
  3869.             FOR I = 1 TO 255 STEP 2
  3870.                 PALCHGSTEP PAL, NEWPAL, 0, 255, I
  3871.             NEXT I
  3872.             
  3873.             FOR I = 1 TO 255 STEP 16
  3874.                 PALCHGSTEP NEWPAL, PAL, 0, 255, I
  3875.             NEXT I
  3876.             
  3877.             WHILE INKEY$ = ""
  3878.             WEND
  3879.             VIDEOMODESET VMODE
  3880.             
  3881.             END
  3882.           
  3883.  
  3884.  
  3885.  
  3886.  
  3887.               
  3888.           PALDIMSTEP
  3889.             
  3890.           ° Syntax
  3891.             
  3892.             PALDIMSTEP Pal$, FirstColor, LastColor, Percent
  3893.             
  3894.           ° Input
  3895.             
  3896.             Pal$ = string * 768 containing initial palette
  3897.             FirstColor = index into palette where dim will begin
  3898.             LastColor = index into palette where dim will end
  3899.             Percent = percent step from current palette to black
  3900.             
  3901.           ° Output
  3902.             
  3903.             no value returned
  3904.             
  3905.           ° Usage
  3906.             
  3907.             Paldimstep fades the specified palette to black by the given
  3908.             percentage between FirstColor and LastColor.  The percentage
  3909.             step from Pal$ to black is specified by Percent where 256
  3910.             (100 hex) is full black.  The valid range for Percent is 0
  3911.             to 256.  Values beyond this range cause the function to
  3912.             immediately return without making any changes.  Pal$ is not
  3913.             modified.
  3914.             
  3915.           ° See Also
  3916.             
  3917.             PALCHGAUTO, PALCHGSTEP, PALIOAUTO
  3918.             
  3919.           ° Example
  3920.             
  3921.             REM STEP FADE OUT AND BACK IN FAST
  3922.             REM $INCLUDE: 'SVGAQB10.BI'
  3923.             DEFINT A-Z
  3924.             DIM PAL AS STRING * 768
  3925.             
  3926.             VMODE = VIDEOMODEGET
  3927.             IF WHICHVGA = 0 THEN STOP
  3928.             IF WHICHMEM < 512 THEN STOP
  3929.             RES640
  3930.             
  3931.             PALGET PAL, 0, 255
  3932.             COLR = 0
  3933.             FOR I = 0 TO 639
  3934.                 DRWLINE 1, COLR, I, 0, I, 479
  3935.                 COLR = COLR + 1
  3936.                 IF COLR > 255 THEN
  3937.                     COLR = 0
  3938.                 END IF
  3939.             NEXT I
  3940.             
  3941.             FOR I = 255 TO 0 STEP -2
  3942.           
  3943.  
  3944.  
  3945.  
  3946.  
  3947.   
  3948.                 PALDIMSTEP PAL, 0, 255, I
  3949.             NEXT I
  3950.             
  3951.             FOR I = 1 TO 255 STEP 16
  3952.                 PALDIMSTEP PAL, 0, 255, I
  3953.             NEXT I
  3954.             
  3955.             WHILE INKEY$ = ""
  3956.             WEND
  3957.             VIDEOMODESET VMODE
  3958.             
  3959.             END
  3960.           
  3961.  
  3962.  
  3963.  
  3964.  
  3965.               
  3966.           PALGET
  3967.             
  3968.           ° Syntax
  3969.             
  3970.             PALGET Pal$, FirstColor, LastColor
  3971.             
  3972.           ° Input
  3973.             
  3974.             Pal$ = string * 768 to hold current palette
  3975.             FirstColor = index into palette where get will begin
  3976.             LastColor = index into palette where get will end
  3977.             
  3978.           ° Output
  3979.             
  3980.             Pal$ = string * 768 containing the current palette in the
  3981.             specified range
  3982.             
  3983.           ° Usage
  3984.             
  3985.             Palget returns in Pal$ the colors from the current palette
  3986.             between FirstColor and LastColor.  Only colors in the
  3987.             specified range are returned and all others in Pal$ are
  3988.             unchanged.  Pal$ must have a length of 768 characters
  3989.             despite the number of colors retrieved.
  3990.             
  3991.           ° See Also
  3992.             
  3993.             PALROTATE, PALSET
  3994.             
  3995.           ° Example
  3996.             
  3997.             REM GET THE CURRENT PALETTE IN THE VARABLE 'PAL'
  3998.             REM $INCLUDE: 'SVGAQB10.BI'
  3999.             DEFINT A-Z
  4000.             DIM PAL AS STRING * 768
  4001.             
  4002.             VMODE = VIDEOMODEGET
  4003.             IF WHICHVGA = 0 THEN STOP
  4004.             IF WHICHMEM < 512 THEN STOP
  4005.             RES640
  4006.             
  4007.             PALGET PAL, 0, 255
  4008.             VIDEOMODESET VMODE
  4009.             CLS
  4010.             PRINT "GOT IT IN 'PAL'..."
  4011.             
  4012.             WHILE INKEY$ = ""
  4013.             WEND
  4014.             
  4015.             END
  4016.           
  4017.  
  4018.  
  4019.  
  4020.  
  4021.               
  4022.           PALIOAUTO
  4023.             
  4024.           ° Syntax
  4025.             
  4026.             PALIOAUTO Pal$, FirstColor, LastColor, Speed
  4027.             
  4028.           ° Input
  4029.             
  4030.             Pal$ = string *768 containing initial palette
  4031.             FirstColor = index into palette where fade will begin
  4032.             LastColor = index into palette where fade will end
  4033.             Speed = speed of fade
  4034.             
  4035.           ° Output
  4036.             
  4037.             no value returned
  4038.             
  4039.           ° Usage
  4040.             
  4041.             Palioauto smoothly fades the colors between FirstColor and
  4042.             LastColor of Pal$ to or from solid black.  The speed of the
  4043.             fade is set by Speed which is the percentage change between
  4044.             each step of the fade.  A positive Speed corresponds to
  4045.             fading from Pal$ to black and a negative Speed fades from
  4046.             black to Pal$.  Only values between -128 and +128 are valid
  4047.             where 1 represents a one percent change between steps and
  4048.             128 (80 hex) represents fifty percent change between steps.
  4049.             A Speed of 128 would then have only two steps.  A Speed
  4050.             outside of the valid range causes the function to
  4051.             immediately return without making any changes.  The time
  4052.             required to accomplish the entire fade is approximately
  4053.             equal to 0.033 seconds times 256 divided by Speed.
  4054.             Palioauto does not modify Pal$.
  4055.             
  4056.           ° See Also
  4057.             
  4058.             PALCHGAUTO, PALCHGSTEP, PALDIMSTEP
  4059.             
  4060.           ° Example
  4061.             
  4062.             REM FADE OUT AND BACK IN FAST
  4063.             REM $INCLUDE: 'SVGAQB10.BI'
  4064.             DEFINT A-Z
  4065.             DIM PAL AS STRING * 768
  4066.             
  4067.             VMODE = VIDEOMODEGET
  4068.             IF WHICHVGA = 0 THEN STOP
  4069.             IF WHICHMEM < 512 THEN STOP
  4070.             RES640
  4071.             
  4072.             PALGET PAL, 0, 255
  4073.             COLR = 0
  4074.             FOR I = 0 TO 639
  4075.                 DRWLINE 1, COLR, I, 0, I, 479
  4076.           
  4077.  
  4078.  
  4079.  
  4080.  
  4081.   
  4082.                 COLR = COLR + 1
  4083.                 IF COLR > 255 THEN
  4084.                     COLR = 0
  4085.                 END IF
  4086.             NEXT I
  4087.             
  4088.             PALIOAUTO PAL, 0, 255, -2
  4089.             PALIOAUTO PAL, 0, 255, 16
  4090.             
  4091.             WHILE INKEY$ = ""
  4092.             WEND
  4093.             VIDEOMODESET VMODE
  4094.             
  4095.             END
  4096.           
  4097.  
  4098.  
  4099.  
  4100.  
  4101.               
  4102.           PALROTATE
  4103.             
  4104.           ° Syntax
  4105.             
  4106.             PALROTATE Pal$, FirstColor, LastColor, Shift
  4107.             
  4108.           ° Input
  4109.             
  4110.             Pal$ = string * 768 containing current palette
  4111.             FirstColor = index into palette where shift will begin
  4112.             LastColor = index into palette where shift will end
  4113.             Shift = number of locations to shift colors
  4114.             
  4115.           ° Output
  4116.             
  4117.             no value returned
  4118.             
  4119.           ° Usage
  4120.             
  4121.             Palrotate shifts the colors between FirstColor and LastColor
  4122.             by a given number of locations.  The number of locations the
  4123.             colors are moved is specified by Shift which is between 1
  4124.             and 256.
  4125.             
  4126.           ° See Also
  4127.             
  4128.             PALGET, PALSET
  4129.             
  4130.           ° Example
  4131.             
  4132.             REM ROTATE A FEW PALETTE ENTRIES AROUND
  4133.             REM $INCLUDE: 'SVGAQB10.BI'
  4134.             DEFINT A-Z
  4135.             DIM PAL AS STRING * 768
  4136.             
  4137.             VMODE = VIDEOMODEGET
  4138.             IF WHICHVGA = 0 THEN STOP
  4139.             IF WHICHMEM < 512 THEN STOP
  4140.             RES640
  4141.             
  4142.             PALGET PAL, 0, 255
  4143.             COLR = 0
  4144.             FOR I = 0 TO 639
  4145.                 DRWLINE 1, COLR, I, 0, I, 479
  4146.                 COLR = COLR + 1
  4147.                 IF COLR > 255 THEN COLR = 0
  4148.             NEXT I
  4149.             
  4150.             FOR I = 0 TO 100
  4151.                 PALROTATE PAL, 0, 127, 1
  4152.                 PALGET PAL, 0, 255
  4153.             NEXT I
  4154.             
  4155.             WHILE INKEY$ = ""
  4156.           
  4157.  
  4158.  
  4159.  
  4160.  
  4161.   
  4162.             WEND
  4163.             VIDEOMODESET VMODE
  4164.             
  4165.             END
  4166.           
  4167.  
  4168.  
  4169.  
  4170.  
  4171.             
  4172.           PALSET
  4173.             
  4174.           ° Syntax
  4175.             
  4176.             PALSEP Pal$, FirstColor, LastColor
  4177.             
  4178.           ° Input
  4179.             
  4180.             Pal$ = string * 768 containing the palette to set
  4181.             FirstColor = index into palette where set will begin
  4182.             LastColor = index into palette where set will end
  4183.             
  4184.           ° Output
  4185.             
  4186.             no value returned
  4187.             
  4188.           ° Usage
  4189.             
  4190.             Palset sets the specified range of colors in the current
  4191.             palette with the corresponding range in the palette Pal$.
  4192.             
  4193.           ° See Also
  4194.             
  4195.             PALGET, PALROTATE
  4196.             
  4197.           ° Example
  4198.             
  4199.             REM SET A NEW PALETTE
  4200.             REM $INCLUDE: 'SVGAQB10.BI'
  4201.             DEFINT A-Z
  4202.             DIM PAL AS STRING * 768
  4203.             DIM NEWPAL AS STRING * 768
  4204.             
  4205.             VMODE = VIDEOMODEGET
  4206.             IF WHICHVGA = 0 THEN STOP
  4207.             IF WHICHMEM < 512 THEN STOP
  4208.             RES640
  4209.             
  4210.             PALGET PAL, 0, 255
  4211.             FOR I = 1 TO 768
  4212.                 MID$(NEWPAL, I, 1) = MID$(PAL, 769 - I, 1)
  4213.             NEXT I
  4214.             COLR = 0
  4215.             FOR I = 0 TO 639
  4216.                 DRWLINE 1, COLR, I, 0, I, 479
  4217.                 COLR = COLR + 1
  4218.                 IF COLR > 255 THEN COLR = 0
  4219.             NEXT I
  4220.             
  4221.             PALSET NEWPAL, 0, 255
  4222.             
  4223.             WHILE INKEY$ = ""
  4224.             WEND
  4225.             VIDEOMODESET VMODE
  4226.           
  4227.  
  4228.  
  4229.  
  4230.  
  4231.   
  4232.             
  4233.             END
  4234.           
  4235.  
  4236.  
  4237.  
  4238.  
  4239.             
  4240.           RES320
  4241.             
  4242.           ° Syntax
  4243.             
  4244.             RES320
  4245.             
  4246.           ° Input
  4247.             
  4248.             no input parameters
  4249.             
  4250.           ° Output
  4251.             
  4252.             no value returned
  4253.             
  4254.           ° Usage
  4255.             
  4256.             Res320 sets video mode 0x13 which is the industry standard
  4257.             320x200 graphics mode with 256 colors.  This function can be
  4258.             called without calling whichvga first as this function
  4259.             requires only that a VGA card is present, not a Super VGA
  4260.             card.
  4261.             
  4262.           ° See Also
  4263.             
  4264.             RES640, RES800, RES1024, WHICHVGA
  4265.             
  4266.           ° Example
  4267.             
  4268.             REM SET THE VIDEO MODE TO 320x200X256
  4269.             REM $INCLUDE: 'SVGAQB10.BI'
  4270.             DEFINT A-Z
  4271.             
  4272.             VMODE = VIDEOMODEGET
  4273.             IF WHICHVGA = 0 THEN STOP
  4274.             
  4275.             RES320
  4276.             DRWSTRING 1, 7, 0, "THIS IS THE 320x200x256 VIDEO MODE...",
  4277.             0, 0
  4278.             
  4279.             WHILE INKEY$ = ""
  4280.             WEND
  4281.             VIDEOMODESET VMODE
  4282.             
  4283.             END
  4284.           
  4285.  
  4286.  
  4287.  
  4288.  
  4289.               
  4290.           RES640
  4291.             
  4292.           ° Syntax
  4293.             
  4294.             RES640
  4295.             
  4296.           ° Input
  4297.             
  4298.             no input parameters
  4299.             
  4300.           ° Output
  4301.             
  4302.             no value returned
  4303.             
  4304.           ° Usage
  4305.             
  4306.             Res640 sets the video mode to 640x480 graphics mode with 256
  4307.             colors.  This function requires that a Super VGA card with
  4308.             at least 512K of video memory be present.  Also, whichvga
  4309.             must be called first or the function will fail without
  4310.             changing the video mode.  If video card does not have
  4311.             sufficient memory, res640 will return without changing the
  4312.             video mode.
  4313.             
  4314.           ° See Also
  4315.             
  4316.             RES320, RES800, RES1024, WHICHVGA
  4317.             
  4318.           ° Example
  4319.             
  4320.             REM SET THE VIDEO MODE TO 640x480X256
  4321.             REM $INCLUDE: 'SVGAQB10.BI'
  4322.             DEFINT A-Z
  4323.             
  4324.             VMODE = VIDEOMODEGET
  4325.             IF WHICHVGA = 0 THEN STOP
  4326.             IF WHICHMEM < 512 THEN STOP
  4327.             
  4328.             RES620
  4329.             DRWSTRING 1, 7, 0, "THIS IS THE 620x480x256 VIDEO MODE...",
  4330.             0, 0
  4331.             
  4332.             WHILE INKEY$ = ""
  4333.             WEND
  4334.             VIDEOMODESET VMODE
  4335.             
  4336.             END
  4337.           
  4338.  
  4339.  
  4340.  
  4341.  
  4342.               
  4343.           RES800
  4344.             
  4345.           ° Syntax
  4346.             
  4347.             RES800
  4348.             
  4349.           ° Input
  4350.             
  4351.             no input parameters
  4352.             
  4353.           ° Output
  4354.             
  4355.             no value returned
  4356.             
  4357.           ° Usage
  4358.             
  4359.             Res800 sets the video mode to 800x600 graphics mode with 256
  4360.             colors.  This function requires that a Super VGA card with
  4361.             at least 512K of video memory be present.  Also, whichvga
  4362.             must be called first or the function will fail without
  4363.             changing the video mode.  If video card does not have
  4364.             sufficient memory, res800 will return without changing the
  4365.             video mode.
  4366.             
  4367.           ° See Also
  4368.             
  4369.             RES320, RES640, RES1024, WHICHVGA
  4370.             
  4371.           ° Example
  4372.             
  4373.             REM SET THE VIDEO MODE TO 800x600X256
  4374.             REM $INCLUDE: 'SVGAQB10.BI'
  4375.             DEFINT A-Z
  4376.             
  4377.             VMODE = VIDEOMODEGET
  4378.             IF WHICHVGA = 0 THEN STOP
  4379.             IF WHICHMEM < 512 THEN STOP
  4380.             
  4381.             RES800
  4382.             DRWSTRING 1, 7, 0, "THIS IS THE 800x600x256 VIDEO MODE...",
  4383.             0, 0
  4384.             
  4385.             WHILE INKEY$ = ""
  4386.             WEND
  4387.             VIDEOMODESET VMODE
  4388.             
  4389.             END
  4390.           
  4391.  
  4392.  
  4393.  
  4394.  
  4395.               
  4396.           RES1024
  4397.             
  4398.           ° Syntax
  4399.             
  4400.             RES1024
  4401.             
  4402.           ° Input
  4403.             
  4404.             no input parameters
  4405.             
  4406.           ° Output
  4407.             
  4408.             no value returned
  4409.             
  4410.           ° Usage
  4411.             
  4412.             Res1024 sets the video mode to 1024x768 graphics mode with
  4413.             256 colors.  This function requires that a Super VGA card
  4414.             with at least 1 Megabyte of video memory be present.  Also,
  4415.             whichvga must be called first or the function will fail
  4416.             without changing the video mode.  If video card does not
  4417.             have sufficient memory, res1024 will return without changing
  4418.             the video mode.
  4419.             
  4420.           ° See Also
  4421.             
  4422.             RES320, RES800, RES1024, WHICHVGA
  4423.             
  4424.           ° Example
  4425.             
  4426.             REM SET THE VIDEO MODE TO 1024x768X256
  4427.             REM $INCLUDE: 'SVGAQB10.BI'
  4428.             DEFINT A-Z
  4429.             
  4430.             VMODE = VIDEOMODEGET
  4431.             IF WHICHVGA = 0 THEN STOP
  4432.             IF WHICHMEM < 1024 THEN STOP
  4433.             
  4434.             RES620
  4435.             DRWSTRING 1, 7, 0, "THIS IS THE 1024x768x256 VIDEO MODE...",
  4436.             0, 0
  4437.             
  4438.             WHILE INKEY$ = ""
  4439.             WEND
  4440.             VIDEOMODESET VMODE
  4441.             
  4442.             END
  4443.           
  4444.  
  4445.  
  4446.  
  4447.  
  4448.               
  4449.           RESTEXT
  4450.             
  4451.           ° Syntax
  4452.             
  4453.             RESTEXT
  4454.             
  4455.           ° Input
  4456.             
  4457.             no input parameters
  4458.             
  4459.           ° Output
  4460.             
  4461.             no value returned
  4462.             
  4463.           ° Usage
  4464.             
  4465.             Restext sets video mode three which is the industry standard
  4466.             80x25 text mode.  Note, however, that since some users set
  4467.             their normal text mode to 43 or 50 lines, it is not
  4468.             recommended to use restext to restore a program to text mode
  4469.             upon completion.
  4470.             
  4471.           ° See Also
  4472.             
  4473.             VIDEOMODEGET, VIDEOMODESET
  4474.             
  4475.           ° Example
  4476.             
  4477.             REM SET THE VIDEO MODE TO STANDARD DOS TEXT MODE 3
  4478.             REM $INCLUDE: 'SVGAQB10.BI'
  4479.             DEFINT A-Z
  4480.             
  4481.             VMODE = VIDEOMODEGET
  4482.             
  4483.             RES620
  4484.             PRINT "THIS IS THE TEXT VIDEO MODE (DOS VIDEO MODE 3)...
  4485.             
  4486.             WHILE INKEY$ = ""
  4487.             WEND
  4488.             VIDEOMODESET VMODE
  4489.             
  4490.             END
  4491.           
  4492.  
  4493.  
  4494.  
  4495.  
  4496.               
  4497.           SCROLLDN
  4498.             
  4499.           ° Syntax
  4500.             
  4501.             SCROLLDN X1, Y1, X2, Y2, Num, Color
  4502.             
  4503.           ° Input
  4504.             
  4505.             X1, Y1 - top left corner of block
  4506.             X2, Y2 - bottom right corner of block
  4507.             Num - number of pixels to shift
  4508.             Color - index to color in current palette
  4509.             
  4510.           ° Output
  4511.             
  4512.             no value returned
  4513.             
  4514.           ° Usage
  4515.             
  4516.             Scrolldn shifts the contents of the box described by (X1,
  4517.             Y1) - (X2, Y2) down by the number of pixels specified by
  4518.             Num.  The empty pixels created at the top of the box are
  4519.             filled with Color.  The pixels that are shifted out of the
  4520.             box are lost.  Scrolldn enforces X2X1 and Y2Y1.  When placed
  4521.             within a loop, scrolldn will create a scrolling effect.
  4522.             
  4523.           ° See Also
  4524.             
  4525.             SCROLLLT, SCROLLRT, SCROLLUP
  4526.             
  4527.           ° Example
  4528.             
  4529.             REM SCROLL SOME TEXT DOWN
  4530.             REM $INCLUDE: 'SVGAQB10.BI'
  4531.             DEFINT A-Z
  4532.             
  4533.             VMODE = VIDEOMODEGET
  4534.             IF WHICHVGA = 0 THEN STOP
  4535.             IF WHICHMEM < 512 THEN STOP
  4536.             
  4537.             RES640
  4538.             DRWBOX 1, 10, 0, 0, 100, 100
  4539.             DRWSTRING 1, 7, 0, "TEXT TEXT", 20, 43
  4540.             
  4541.             FOR I = 0 TO 40
  4542.                 SCROLLDN 1, 1, 99, 99, 1, 0
  4543.                 SDELAY 2
  4544.             NEXT I
  4545.             
  4546.             WHILE INKEY$ = ""
  4547.             WEND
  4548.             VIDEOMODESET VMODE
  4549.             
  4550.             END
  4551.           
  4552.  
  4553.  
  4554.  
  4555.  
  4556.   
  4557.           
  4558.  
  4559.  
  4560.  
  4561.  
  4562.               
  4563.           SCROLLLT
  4564.             
  4565.           ° Syntax
  4566.             
  4567.             SCROLLLT X1, Y1, X2, Y2, Num, Color
  4568.             
  4569.           ° Input
  4570.             
  4571.             X1, Y1 - top left corner of block
  4572.             X2, Y2 - bottom right corner of block
  4573.             Num - number of pixels to shift
  4574.             Color - index to color in current palette
  4575.             
  4576.           ° Output
  4577.             
  4578.             no value returned
  4579.             
  4580.           ° Usage
  4581.             
  4582.             Scrolllt shifts the contents of the box described by (X1,
  4583.             Y1) - (X2, Y2) down by the number of pixels specified by
  4584.             Num.  The empty pixels created at the right of the box are
  4585.             filled with Color.  The pixels that are shifted out of the
  4586.             box are lost.  Scrolllt enforces X2X1 and Y2Y1.  When placed
  4587.             within a loop, scrollrt will create a scrolling effect.
  4588.             
  4589.           ° See Also
  4590.             
  4591.             SCROLLDN, SCROLLRT, SCROLLUP
  4592.             
  4593.           ° Example
  4594.             
  4595.             REM SCROLL SOME TEXT LEFT
  4596.             REM $INCLUDE: 'SVGAQB10.BI'
  4597.             DEFINT A-Z
  4598.             
  4599.             VMODE = VIDEOMODEGET
  4600.             IF WHICHVGA = 0 THEN STOP
  4601.             IF WHICHMEM < 512 THEN STOP
  4602.             
  4603.             RES640
  4604.             DRWBOX 1, 10, 0, 0, 100, 100
  4605.             DRWSTRING 1, 7, 0, "TEXT TEXT", 20, 43
  4606.             
  4607.             FOR I = 0 TO 40
  4608.                 SCROLLLT 1, 1, 99, 99, 1, 0
  4609.                 SDELAY 2
  4610.             NEXT I
  4611.             
  4612.             WHILE INKEY$ = ""
  4613.             WEND
  4614.             VIDEOMODESET VMODE
  4615.             
  4616.             END
  4617.           
  4618.  
  4619.  
  4620.  
  4621.  
  4622.   
  4623.           
  4624.  
  4625.  
  4626.  
  4627.  
  4628.               
  4629.           SCROLLRT
  4630.             
  4631.           ° Syntax
  4632.             
  4633.             SCROLLRT X1, Y1, X2, Y2, Num, Color
  4634.             
  4635.           ° Input
  4636.             
  4637.             X1, Y1 - top left corner of block
  4638.             X2, Y2 - bottom right corner of block
  4639.             Num - number of pixels to shift
  4640.             Color - index to color in current palette
  4641.             
  4642.           ° Output
  4643.             
  4644.             no value returned
  4645.             
  4646.           ° Usage
  4647.             
  4648.             Scrollrt shifts the contents of the box described by (X1,
  4649.             Y1) - (X2, Y2) down by the number of pixels specified by
  4650.             Num.  The empty pixels created at the left of the box are
  4651.             filled with Color.  The pixels that are shifted out of the
  4652.             box are lost.  Scrollrt enforces X2X1 and Y2Y1.  When placed
  4653.             within a loop, scrollrt will create a scrolling effect.
  4654.             
  4655.           ° See Also
  4656.             
  4657.             SCROLLDN, SCROLLLT, SCROLLUP
  4658.             
  4659.           ° Example
  4660.             
  4661.             REM SCROLL SOME TEXT RIGHT
  4662.             REM $INCLUDE: 'SVGAQB10.BI'
  4663.             DEFINT A-Z
  4664.             
  4665.             VMODE = VIDEOMODEGET
  4666.             IF WHICHVGA = 0 THEN STOP
  4667.             IF WHICHMEM < 512 THEN STOP
  4668.             
  4669.             RES640
  4670.             DRWBOX 1, 10, 0, 0, 100, 100
  4671.             DRWSTRING 1, 7, 0, "TEXT TEXT", 20, 43
  4672.             
  4673.             FOR I = 0 TO 40
  4674.                 SCROLLRT 1, 1, 99, 99, 1, 0
  4675.                 SDELAY 2
  4676.             NEXT I
  4677.             
  4678.             WHILE INKEY$ = ""
  4679.             WEND
  4680.             VIDEOMODESET VMODE
  4681.             
  4682.             END
  4683.           
  4684.  
  4685.  
  4686.  
  4687.  
  4688.   
  4689.           
  4690.  
  4691.  
  4692.  
  4693.  
  4694.               
  4695.           SCROLLUP
  4696.             
  4697.           ° Syntax
  4698.             
  4699.             SCROLLUP X1, Y1, X2, Y2, Num, Color
  4700.             
  4701.           ° Input
  4702.             
  4703.             X1, Y1 - top left corner of block
  4704.             X2, Y2 - bottom right corner of block
  4705.             Num - number of pixels to shift
  4706.             Color - index to color in current palette
  4707.             
  4708.           ° Output
  4709.             
  4710.             no value returned
  4711.             
  4712.           ° Usage
  4713.             
  4714.             Scrollup shifts the contents of the box described by (X1,
  4715.             Y1) - (X2, Y2) down by the number of pixels specified by
  4716.             Num.  The empty pixels created at the bottom of the box are
  4717.             filled with Color.  The pixels that are shifted out of the
  4718.             box are lost.  Scrollup enforces X2X1 and Y2Y1.  When placed
  4719.             within a loop, scrollup will create a scrolling effect.
  4720.             
  4721.           ° See Also
  4722.             
  4723.             SCROLLDN, SCROLLLT, SCROLLRT
  4724.             
  4725.           ° Example
  4726.             
  4727.             REM SCROLL SOME TEXT UP
  4728.             REM $INCLUDE: 'SVGAQB10.BI'
  4729.             DEFINT A-Z
  4730.             
  4731.             VMODE = VIDEOMODEGET
  4732.             IF WHICHVGA = 0 THEN STOP
  4733.             IF WHICHMEM < 512 THEN STOP
  4734.             
  4735.             RES640
  4736.             DRWBOX 1, 10, 0, 0, 100, 100
  4737.             DRWSTRING 1, 7, 0, "TEXT TEXT", 20, 43
  4738.             
  4739.             FOR I = 0 TO 40
  4740.                 SCROLLUP 1, 1, 99, 99, 1, 0
  4741.                 SDELAY 2
  4742.             NEXT I
  4743.             
  4744.             WHILE INKEY$ = ""
  4745.             WEND
  4746.             VIDEOMODESET VMODE
  4747.             
  4748.             END
  4749.           
  4750.  
  4751.  
  4752.  
  4753.  
  4754.   
  4755.           
  4756.  
  4757.  
  4758.  
  4759.  
  4760.               
  4761.           SDELAY
  4762.             
  4763.           ° Syntax
  4764.             
  4765.             SDELAY Count
  4766.             
  4767.           ° Input
  4768.             
  4769.             Count - number of vertical syncs to wait
  4770.             
  4771.           ° Output
  4772.             
  4773.             no value returned
  4774.             
  4775.           ° Usage
  4776.             
  4777.             Sdelay pauses execution of the program for a period of time
  4778.             specified by Count.  This delay remains approximately
  4779.             constant on all machines by using the vertical sync timer of
  4780.             the VGA graphics card which is about 60 - 70 Hz.
  4781.             
  4782.           ° Example
  4783.             
  4784.             REM MAKE A DELAY ABOUT 3 SECONDS LONG
  4785.             REM $INCLUDE: 'SVGAQB10.BI'
  4786.             DEFINT A-Z
  4787.             
  4788.             CLS
  4789.             PRINT "OK...STARTING DELAY NOW..."
  4790.             PRINT "SHOULD BE ABOUT 3 SECONDS..."
  4791.             PRINT
  4792.             TIM! = TIMER
  4793.             
  4794.             SDELAY 195
  4795.             
  4796.             TOT! = TIMER - TIM!
  4797.             
  4798.             PRINT "ACTUAL TIME WAS:"; TOT!
  4799.             
  4800.             WHILE INKEY$ = ""
  4801.             WEND
  4802.             
  4803.             END
  4804.           
  4805.  
  4806.  
  4807.  
  4808.  
  4809.               
  4810.           SETCARD
  4811.             
  4812.           ° Syntax
  4813.             
  4814.             SETCARD Chip, Mem
  4815.             
  4816.           ° Input
  4817.             
  4818.             Chip - code for certain SVGA chip type
  4819.             Mem - amount of video memory installed
  4820.             
  4821.           ° Output
  4822.             
  4823.             no value returned
  4824.             
  4825.           ° Usage
  4826.             
  4827.             WARNING:  USING SETCARD IMPROPERLY MAY CAUSE A SYSTEM
  4828.             FAILURE OR DAMAGE.
  4829.             Setcard sets the card type and installed video memory.  It
  4830.             can be used instead of the whichvga function.  However,
  4831.             specifying an incorrect chip type or installed video memory
  4832.             may cause unpredictable results not excluding damage to the
  4833.             SVGA card and/or monitor.  Extreme caution is advised when
  4834.             using this function.  It is recommended that this function
  4835.             only be used when it is suspected that the identification
  4836.             process in whichvga failed.  Be absolutely certain that the
  4837.             chip type specified is the actual chip type installed in the
  4838.             computer.  Mem should be a value of 256, 512 or 1024
  4839.             representing the kilobytes of video memory installed.  Use
  4840.             the following table for chip types:
  4841.             
  4842.           ° See Also
  4843.             
  4844.             WHICHVGA
  4845.             
  4846.           ° Example
  4847.             
  4848.             REM
  4849.             !WARNING!WARNING!WARNING!WARNING!WARNING!WARNING!WARNING!WAR
  4850.             NING!
  4851.             
  4852.             REM USE THIS FUNCTION CAREFULLY. IT WORKS AROUND THE
  4853.             "WHICHVGA FUNCTION"
  4854.             REM IMPROPER USE (IE SETTING THE CARD ID AND MEMORY TO
  4855.             SOMTHING THAT
  4856.             REM THAT IS NOT VAILD) MIGHT DAMAGE YOUR VIDEO CARD/VIDEO
  4857.             MONITOR OR CAUSE
  4858.             REM UNPRECITABLE RESULTS. IT IS PROVIDED AS A METHOD TO FIND
  4859.             FAULTS IN THE
  4860.             REM VIDEO CARD/CHIP ID PROCESS.
  4861.             
  4862.             REM
  4863.             !WARNING!WARNING!WARNING!WARNING!WARNING!WARNING!WARNING!WAR
  4864.           
  4865.  
  4866.  
  4867.  
  4868.  
  4869.   
  4870.             NING!
  4871.             
  4872.             END
  4873.           
  4874.  
  4875.  
  4876.  
  4877.  
  4878.               
  4879.           SETVIEW
  4880.             
  4881.           ° Syntax
  4882.             
  4883.             SETVIEW X1, Y1, X2, Y2
  4884.             
  4885.           ° Input
  4886.             
  4887.             X1, Y1 - top, left corner of view port
  4888.             X2, Y2 - bottom, right corner of view port
  4889.             
  4890.           ° Output
  4891.             
  4892.             no value returned
  4893.             
  4894.           ° Usage
  4895.             
  4896.             Setview defines a view port for clipping output on the
  4897.             screen.  Nothing can be drawn outside of the currently
  4898.             defined view port.  The res### functions set the view port
  4899.             to the full screen.
  4900.             
  4901.           ° See Also
  4902.             
  4903.             RES320, RES640, RES800, RES1024
  4904.             
  4905.           ° Example
  4906.             
  4907.             REM DRAW SOME LINES CLIPED TO A VIEWPORT
  4908.             REM $INCLUDE: 'SVGAQB10.BI'
  4909.             DEFINT A-Z
  4910.             
  4911.             VMODE = VIDEOMODEGET
  4912.             IF WHICHVGA = 0 THEN STOP
  4913.             IF WHICHMEM < 512 THEN STOP
  4914.             RES640
  4915.             
  4916.             DRWBOX 1, 15, 100, 100, 539, 379
  4917.             SETVIEW 101, 101, 538, 378
  4918.             FOR I = 0 TO 300
  4919.                 X1 = RND * 640
  4920.                 Y1 = RND * 480
  4921.                 X2 = RND * 640
  4922.                 Y2 = RND * 480
  4923.                 DRWLINE 1, 10, X1, Y1, X2, Y2
  4924.             NEXT I
  4925.             
  4926.             
  4927.             WHILE INKEY$ = ""
  4928.             WEND
  4929.             VIDEOMODESET VMODE
  4930.             
  4931.             END
  4932.           
  4933.  
  4934.  
  4935.  
  4936.  
  4937.               
  4938.           SPRITEGAP
  4939.             
  4940.           ° Syntax
  4941.             
  4942.             SPRITEGAP TransColor, X, Y, GfxBlk, BkGndGfxBlk
  4943.             
  4944.           ° Input
  4945.             
  4946.             TransColor - index to color in current palette
  4947.             X, Y - top, left corner of block
  4948.             GfxBlk - predefined integer array containing the sprite
  4949.             BkGndGfxBlk - empty integer array to hold sprite background
  4950.             
  4951.           ° Output
  4952.             
  4953.             no value returned
  4954.             
  4955.           ° Usage
  4956.             
  4957.             Spritegap is used in sprite graphics or animation to
  4958.             retrieve a sprite's background and then display the sprite.
  4959.             GfxBlk, a short integer array, contains the sprite which
  4960.             should have been previously defined by blkget or similar
  4961.             function such as getlaststring.  TransColor is the
  4962.             transparent color assumed in GfxBlk.  BkGndBlk, an empty
  4963.             short integer array of the same size as GfxBlk, will receive
  4964.             the sprite's background.  The top, left corner of the
  4965.             sprite's location is specified by X, Y.
  4966.             
  4967.           ° See Also
  4968.             
  4969.             BLKGET, BLKPUT, GETLASTSTRING, SPRITEPUT
  4970.             
  4971.           ° Example
  4972.               
  4973.             REM MOV A SPRITE ON A COMPLEX BACKGROUND
  4974.             REM $INCLUDE: 'SVGAQB10.BI'
  4975.             DEFINT A-Z
  4976.              
  4977.             DIM SPRITEDATA(0 TO 1040) AS INTEGER
  4978.             DIM SPRITEBKGND(0 TO 130) AS INTEGER
  4979.           
  4980.             IF WHICHCPU < 386 THEN
  4981.                 PRINT "SORRY...386 REQUIRED"
  4982.                 END
  4983.             END IF
  4984.             IF WHICHVGA = 0 THEN
  4985.                 PRINT "SORRY...UNABLE TO ID VIDEO CARD"
  4986.                 END
  4987.             END IF
  4988.             ORIGMODE = VIDEOMODEGET
  4989.             IF WHICHMEM < 512 THEN
  4990.                 MAXX = 320
  4991.                 MAXY = 200
  4992.           
  4993.  
  4994.  
  4995.  
  4996.  
  4997.   
  4998.                 RES320
  4999.             ELSE
  5000.                 MAXX = 640
  5001.                 MAXY = 480
  5002.                 RES640
  5003.             END IF
  5004.             
  5005.             FOR I = 0 TO 7
  5006.                 FOR J = 0 TO 129
  5007.                     READ SPRITEDATA(I * 130 + J)
  5008.                 NEXT J
  5009.             NEXT I
  5010.            
  5011.             MYPI! = ATN(1) * 4
  5012.             
  5013.             Colr = 16
  5014.             X1 = 0
  5015.             X2 = MAXX
  5016.             Y1 = 0
  5017.             Y2 = MAXY
  5018.             I = 0
  5019.             WHILE Y1 + I <= Y2 - I
  5020.                 DRWBOX 1, Colr, X1 + I, Y1 + I, X2 - I, Y2 - I
  5021.                 Colr = Colr + 1
  5022.                 IF Colr > 255 THEN
  5023.                     Colr = 16
  5024.                 END IF
  5025.                 I = I + 1
  5026.             WEND
  5027.            
  5028.             CNTX = (MAXX \ 2) - 8
  5029.             CNTY = ((MAXY - 9) \ 2) - 8
  5030.             J = 0
  5031.            
  5032.             FOR DEG = 0 TO 360 STEP 2
  5033.                 RAD! = (DEG * MYPI! / 180)
  5034.                 X = CNTX + SIN(RAD!) * MAXY \ 4
  5035.                 Y = CNTY + COS(RAD!) * MAXY \ 4
  5036.                 SPRITEGAP 0, X, Y, SPRITEDATA(J), SPRITEBKGND(0)
  5037.                 SDELAY 3
  5038.                 SPRITEPUT 0, X, Y, SPRITEBKGND(0)
  5039.                 J = J + 130
  5040.                 IF J > 910 THEN
  5041.                     J = 0
  5042.                 END IF
  5043.             NEXT DEG
  5044.             
  5045.             WHILE INKEY$ = ""
  5046.             WEND
  5047.           
  5048.             VIDEOMODESET ORGMODE
  5049.             END
  5050.           
  5051.           
  5052.             REM *SPRITE DATA
  5053.           
  5054.  
  5055.  
  5056.  
  5057.  
  5058.   
  5059.             DATA  15, 15, 0, 0, 0, 2304, 0, 0, 0, 0
  5060.             DATA  0, 0, 0, 265, 9, 0, 0, 0, 0, 0
  5061.             DATA  2304, 2305, 2305, 0, 0, 0, 0, 0, 0, 2304
  5062.             DATA  0, 0, 0, 0, 0, 0, 0, 2304, 0, 0
  5063.             DATA  0, 0, 0, 0, 0, 2570, 10, 0, 0, 0
  5064.             DATA  0, 0, 2560, 3588, 2564, 0, 0, 0, 0, 0
  5065.             DATA  2560, 1038, 2574, 0, 0, 0, 0, 0, 2560, 3588
  5066.             DATA  2564, 0, 0, 0, 0, 0, 1280, 2570, 1290, 0
  5067.             DATA  0, 0, 0, 0, 5, 2304, 0, 5, 0, 0
  5068.             DATA  0, 0, 5, 2304, 0, 5, 0, 0, 0, 1280
  5069.             DATA  0, 265, 9, 1280, 0, 0, 0, 1280, 2304, 2049
  5070.             DATA  2305, 1280, 0, 0, 0, 5, 2304, 2049, 2305, 0
  5071.             DATA  5, 0, 0, 0, 0, 0, 0, 0, 0, 0
  5072.           
  5073.             DATA  15, 15, 0, 0, 0, 0, 0, 0, 0, 0
  5074.             DATA  0, 0, 0, 0, 0, 2313, 2313, 0, 0, 0
  5075.             DATA  0, 0, 0, 256, 2305, 0, 0, 0, 0, 0
  5076.             DATA  0, 2304, 2305, 0, 0, 0, 0, 0, 0, 9
  5077.             DATA  2304, 0, 0, 0, 0, 2570, 2314, 0, 0, 0
  5078.             DATA  0, 0, 2560, 1038, 2574, 0, 0, 0, 0, 1280
  5079.             DATA  2565, 1028, 2564, 0, 0, 0, 1280, 5, 2560, 1038
  5080.             DATA  2574, 0, 0, 0, 5, 0, 2304, 2570, 10, 0
  5081.             DATA  0, 0, 0, 2313, 9, 1280, 0, 0, 0, 0
  5082.             DATA  2304, 257, 9, 1280, 0, 0, 0, 0, 265, 264
  5083.             DATA  9, 5, 0, 0, 0, 0, 2048, 2305, 0, 5
  5084.             DATA  0, 0, 0, 0, 0, 9, 1280, 0, 0, 0
  5085.             DATA  0, 0, 0, 0, 0, 0, 0, 0, 0, 0
  5086.           
  5087.             DATA  15, 15, 0, 0, 0, 0, 0, 0, 0, 0
  5088.             DATA  0, 0, 0, 0, 0, 0, 0, 0, 5, 0
  5089.             DATA  0, 0, 0, 0, 0, 0, 1280, 5, 0, 0
  5090.             DATA  0, 0, 0, 0, 0, 1280, 5, 0, 0, 0
  5091.             DATA  0, 0, 2313, 0, 1280, 2570, 10, 0, 9, 0
  5092.             DATA  257, 9, 2560, 3588, 2564, 0, 2305, 0, 2056, 2305
  5093.             DATA  2569, 1038, 2574, 2313, 265, 9, 257, 9, 2560, 3588
  5094.             DATA  2564, 0, 2305, 0, 2313, 0, 1280, 2570, 10, 0
  5095.             DATA  9, 0, 0, 1280, 5, 0, 0, 0, 0, 0
  5096.             DATA  1280, 5, 0, 0, 0, 0, 0, 0, 5, 0
  5097.             DATA  0, 0, 0, 0, 0, 0, 0, 0, 0, 0
  5098.             DATA  0, 0, 0, 0, 0, 0, 0, 0, 0, 0
  5099.             DATA  0, 0, 0, 0, 0, 0, 0, 0, 0, 0
  5100.           
  5101.             DATA  15, 15, 0, 9, 1280, 0, 0, 0, 0, 0
  5102.             DATA  2048, 2305, 0, 5, 0, 0, 0, 0, 265, 264
  5103.             DATA  9, 5, 0, 0, 0, 0, 2304, 257, 9, 1280
  5104.             DATA  0, 0, 0, 0, 0, 2313, 9, 1280, 0, 0
  5105.             DATA  0, 0, 5, 0, 2304, 2570, 10, 0, 0, 0
  5106.             DATA  1280, 5, 2560, 1038, 2574, 0, 0, 0, 0, 1280
  5107.             DATA  2565, 1028, 2564, 0, 0, 0, 0, 0, 2560, 1038
  5108.             DATA  2574, 0, 0, 0, 0, 0, 0, 2570, 2314, 0
  5109.             DATA  0, 0, 0, 0, 0, 0, 0, 9, 2304, 0
  5110.             DATA  0, 0, 0, 0, 0, 2304, 2305, 0, 0, 0
  5111.             DATA  0, 0, 0, 256, 2305, 0, 0, 0, 0, 0
  5112.             DATA  0, 2313, 2313, 0, 0, 0, 0, 0, 0, 0
  5113.             DATA  0, 0, 0, 0, 0, 0, 0, 0, 0, 0
  5114.           
  5115.  
  5116.  
  5117.  
  5118.  
  5119.   
  5120.           
  5121.             DATA  15, 15, 0, 5, 2304, 2049, 2305, 0, 5, 0
  5122.             DATA  0, 1280, 2304, 2049, 2305, 1280, 0, 0, 0, 1280
  5123.             DATA  0, 265, 9, 1280, 0, 0, 0, 0, 5, 2304
  5124.             DATA  0, 5, 0, 0, 0, 0, 5, 2304, 0, 5
  5125.             DATA  0, 0, 0, 0, 1280, 2570, 1290, 0, 0, 0
  5126.             DATA  0, 0, 2560, 3588, 2564, 0, 0, 0, 0, 0
  5127.             DATA  2560, 1038, 2574, 0, 0, 0, 0, 0, 2560, 3588
  5128.             DATA  2564, 0, 0, 0, 0, 0, 0, 2570, 10, 0
  5129.             DATA  0, 0, 0, 0, 0, 2304, 0, 0, 0, 0
  5130.             DATA  0, 0, 0, 2304, 0, 0, 0, 0, 0, 0
  5131.             DATA  2304, 2305, 2305, 0, 0, 0, 0, 0, 0, 265
  5132.             DATA  9, 0, 0, 0, 0, 0, 0, 2304, 0, 0
  5133.             DATA  0, 0, 0, 0, 0, 0, 0, 0, 0, 0
  5134.           
  5135.             DATA  15, 15, 0, 0, 0, 0, 1280, 0, 9, 0
  5136.             DATA  0, 0, 0, 0, 5, 2304, 2049, 0, 0, 0
  5137.             DATA  0, 0, 5, 265, 264, 9, 0, 0, 0, 1280
  5138.             DATA  0, 265, 2305, 0, 0, 0, 0, 1280, 0, 2313
  5139.             DATA  9, 0, 0, 0, 0, 2570, 2314, 0, 0, 5
  5140.             DATA  0, 0, 2560, 1038, 2574, 0, 1285, 0, 0, 0
  5141.             DATA  2560, 1028, 2564, 1285, 0, 0, 0, 0, 2560, 1038
  5142.             DATA  2574, 0, 0, 0, 0, 0, 2304, 2570, 10, 0
  5143.             DATA  0, 0, 2304, 0, 9, 0, 0, 0, 0, 0
  5144.             DATA  2304, 2305, 0, 0, 0, 0, 0, 0, 2304, 257
  5145.             DATA  0, 0, 0, 0, 0, 0, 2304, 2313, 9, 0
  5146.             DATA  0, 0, 0, 0, 0, 0, 0, 0, 0, 0
  5147.             DATA  0, 0, 0, 0, 0, 0, 0, 0, 0, 0
  5148.           
  5149.             DATA  15, 15, 0, 0, 0, 0, 0, 0, 0, 0
  5150.             DATA  0, 0, 0, 0, 0, 0, 0, 0, 0, 0
  5151.             DATA  0, 0, 0, 0, 0, 5, 0, 0, 0, 0
  5152.             DATA  0, 0, 1285, 0, 0, 0, 0, 0, 0, 1285
  5153.             DATA  0, 0, 0, 9, 0, 2570, 1290, 0, 2304, 9
  5154.             DATA  2304, 1, 2560, 3588, 2564, 0, 265, 1, 265, 2313
  5155.             DATA  2569, 1038, 2574, 2313, 2049, 8, 2304, 1, 2560, 3588
  5156.             DATA  2564, 0, 265, 1, 0, 9, 0, 2570, 1290, 0
  5157.             DATA  2304, 9, 0, 0, 0, 0, 0, 1285, 0, 0
  5158.             DATA  0, 0, 0, 0, 0, 0, 1285, 0, 0, 0
  5159.             DATA  0, 0, 0, 0, 0, 5, 0, 0, 0, 0
  5160.             DATA  0, 0, 0, 0, 0, 0, 0, 0, 0, 0
  5161.             DATA  0, 0, 0, 0, 0, 0, 0, 0, 0, 0
  5162.           
  5163.             DATA  15, 15, 0, 0, 0, 0, 0, 0, 0, 0
  5164.             DATA  2304, 2313, 9, 0, 0, 0, 0, 0, 2304, 257
  5165.             DATA  0, 0, 0, 0, 0, 0, 2304, 2305, 0, 0
  5166.             DATA  0, 0, 0, 0, 2304, 0, 9, 0, 0, 0
  5167.             DATA  0, 0, 0, 0, 2304, 2570, 10, 0, 0, 0
  5168.             DATA  0, 0, 2560, 1038, 2574, 0, 0, 0, 0, 0
  5169.             DATA  2560, 1028, 2564, 1285, 0, 0, 0, 0, 2560, 1038
  5170.             DATA  2574, 0, 1285, 0, 0, 0, 0, 2570, 2314, 0
  5171.             DATA  0, 5, 0, 0, 0, 1280, 0, 2313, 9, 0
  5172.             DATA  0, 0, 0, 1280, 0, 265, 2305, 0, 0, 0
  5173.             DATA  0, 0, 5, 265, 264, 9, 0, 0, 0, 0
  5174.             DATA  5, 2304, 2049, 0, 0, 0, 0, 0, 1280, 0
  5175.           
  5176.  
  5177.  
  5178.  
  5179.  
  5180.   
  5181.             DATA  9, 0, 0, 0, 0, 0, 0, 0, 0, 0
  5182.           
  5183.  
  5184.  
  5185.  
  5186.  
  5187.               
  5188.           SPRITEPUT
  5189.             
  5190.           ° Syntax
  5191.             
  5192.             SPRITEPUT TransColor, X, Y, GfxBlk
  5193.             
  5194.           ° Input
  5195.             
  5196.             TransColor - index to color in current palette
  5197.             X, Y - top, left corner of block
  5198.             GfxBlk - predefined integer array containing the sprite
  5199.             
  5200.           ° Output
  5201.             
  5202.             no value returned
  5203.             
  5204.           ° Usage
  5205.             
  5206.             Spriteput is used in sprite graphics or animation to display
  5207.             a sprite or, more commonly, its background.  GfxBlk, a short
  5208.             integer array, contains the sprite which should have been
  5209.             previously defined by blkget or spritegap.  TransColor is
  5210.             the transparent color assumed in GfxBlk.  The top, left
  5211.             corner of the sprite's location is specified by X, Y.
  5212.             
  5213.           ° See Also
  5214.             
  5215.             BLKGET, BLKPUT, GETLASTSTRING, SPRITEGAP
  5216.             
  5217.           ° Example
  5218.               
  5219.             REM MOV A SPRITE ON A COMPLEX BACKGROUND
  5220.             REM $INCLUDE: 'SVGAQB10.BI'
  5221.             DEFINT A-Z
  5222.              
  5223.             DIM SPRITEDATA(0 TO 1040) AS INTEGER
  5224.             DIM SPRITEBKGND(0 TO 130) AS INTEGER
  5225.           
  5226.             IF WHICHCPU < 386 THEN
  5227.                 PRINT "SORRY...386 REQUIRED"
  5228.                 END
  5229.             END IF
  5230.             IF WHICHVGA = 0 THEN
  5231.                 PRINT "SORRY...UNABLE TO ID VIDEO CARD"
  5232.                 END
  5233.             END IF
  5234.             ORIGMODE = VIDEOMODEGET
  5235.             IF WHICHMEM < 512 THEN
  5236.                 MAXX = 320
  5237.                 MAXY = 200
  5238.                 RES320
  5239.             ELSE
  5240.                 MAXX = 640
  5241.                 MAXY = 480
  5242.           
  5243.  
  5244.  
  5245.  
  5246.  
  5247.   
  5248.                 RES640
  5249.             END IF
  5250.             
  5251.             FOR I = 0 TO 7
  5252.                 FOR J = 0 TO 129
  5253.                     READ SPRITEDATA(I * 130 + J)
  5254.                 NEXT J
  5255.             NEXT I
  5256.            
  5257.             MYPI! = ATN(1) * 4
  5258.             
  5259.             Colr = 16
  5260.             X1 = 0
  5261.             X2 = MAXX
  5262.             Y1 = 0
  5263.             Y2 = MAXY
  5264.             I = 0
  5265.             WHILE Y1 + I <= Y2 - I
  5266.                 DRWBOX 1, Colr, X1 + I, Y1 + I, X2 - I, Y2 - I
  5267.                 Colr = Colr + 1
  5268.                 IF Colr > 255 THEN
  5269.                     Colr = 16
  5270.                 END IF
  5271.                 I = I + 1
  5272.             WEND
  5273.            
  5274.             CNTX = (MAXX \ 2) - 8
  5275.             CNTY = ((MAXY - 9) \ 2) - 8
  5276.             J = 0
  5277.            
  5278.             FOR DEG = 0 TO 360 STEP 2
  5279.                 RAD! = (DEG * MYPI! / 180)
  5280.                 X = CNTX + SIN(RAD!) * MAXY \ 4
  5281.                 Y = CNTY + COS(RAD!) * MAXY \ 4
  5282.                 SPRITEGAP 0, X, Y, SPRITEDATA(J), SPRITEBKGND(0)
  5283.                 SDELAY 3
  5284.                 SPRITEPUT 0, X, Y, SPRITEBKGND(0)
  5285.                 J = J + 130
  5286.                 IF J > 910 THEN
  5287.                     J = 0
  5288.                 END IF
  5289.             NEXT DEG
  5290.             
  5291.             WHILE INKEY$ = ""
  5292.             WEND
  5293.           
  5294.             VIDEOMODESET ORGMODE
  5295.             END
  5296.           
  5297.           
  5298.             REM *SPRITE DATA
  5299.             DATA  15, 15, 0, 0, 0, 2304, 0, 0, 0, 0
  5300.             DATA  0, 0, 0, 265, 9, 0, 0, 0, 0, 0
  5301.             DATA  2304, 2305, 2305, 0, 0, 0, 0, 0, 0, 2304
  5302.             DATA  0, 0, 0, 0, 0, 0, 0, 2304, 0, 0
  5303.           
  5304.  
  5305.  
  5306.  
  5307.  
  5308.   
  5309.             DATA  0, 0, 0, 0, 0, 2570, 10, 0, 0, 0
  5310.             DATA  0, 0, 2560, 3588, 2564, 0, 0, 0, 0, 0
  5311.             DATA  2560, 1038, 2574, 0, 0, 0, 0, 0, 2560, 3588
  5312.             DATA  2564, 0, 0, 0, 0, 0, 1280, 2570, 1290, 0
  5313.             DATA  0, 0, 0, 0, 5, 2304, 0, 5, 0, 0
  5314.             DATA  0, 0, 5, 2304, 0, 5, 0, 0, 0, 1280
  5315.             DATA  0, 265, 9, 1280, 0, 0, 0, 1280, 2304, 2049
  5316.             DATA  2305, 1280, 0, 0, 0, 5, 2304, 2049, 2305, 0
  5317.             DATA  5, 0, 0, 0, 0, 0, 0, 0, 0, 0
  5318.           
  5319.             DATA  15, 15, 0, 0, 0, 0, 0, 0, 0, 0
  5320.             DATA  0, 0, 0, 0, 0, 2313, 2313, 0, 0, 0
  5321.             DATA  0, 0, 0, 256, 2305, 0, 0, 0, 0, 0
  5322.             DATA  0, 2304, 2305, 0, 0, 0, 0, 0, 0, 9
  5323.             DATA  2304, 0, 0, 0, 0, 2570, 2314, 0, 0, 0
  5324.             DATA  0, 0, 2560, 1038, 2574, 0, 0, 0, 0, 1280
  5325.             DATA  2565, 1028, 2564, 0, 0, 0, 1280, 5, 2560, 1038
  5326.             DATA  2574, 0, 0, 0, 5, 0, 2304, 2570, 10, 0
  5327.             DATA  0, 0, 0, 2313, 9, 1280, 0, 0, 0, 0
  5328.             DATA  2304, 257, 9, 1280, 0, 0, 0, 0, 265, 264
  5329.             DATA  9, 5, 0, 0, 0, 0, 2048, 2305, 0, 5
  5330.             DATA  0, 0, 0, 0, 0, 9, 1280, 0, 0, 0
  5331.             DATA  0, 0, 0, 0, 0, 0, 0, 0, 0, 0
  5332.           
  5333.             DATA  15, 15, 0, 0, 0, 0, 0, 0, 0, 0
  5334.             DATA  0, 0, 0, 0, 0, 0, 0, 0, 5, 0
  5335.             DATA  0, 0, 0, 0, 0, 0, 1280, 5, 0, 0
  5336.             DATA  0, 0, 0, 0, 0, 1280, 5, 0, 0, 0
  5337.             DATA  0, 0, 2313, 0, 1280, 2570, 10, 0, 9, 0
  5338.             DATA  257, 9, 2560, 3588, 2564, 0, 2305, 0, 2056, 2305
  5339.             DATA  2569, 1038, 2574, 2313, 265, 9, 257, 9, 2560, 3588
  5340.             DATA  2564, 0, 2305, 0, 2313, 0, 1280, 2570, 10, 0
  5341.             DATA  9, 0, 0, 1280, 5, 0, 0, 0, 0, 0
  5342.             DATA  1280, 5, 0, 0, 0, 0, 0, 0, 5, 0
  5343.             DATA  0, 0, 0, 0, 0, 0, 0, 0, 0, 0
  5344.             DATA  0, 0, 0, 0, 0, 0, 0, 0, 0, 0
  5345.             DATA  0, 0, 0, 0, 0, 0, 0, 0, 0, 0
  5346.           
  5347.             DATA  15, 15, 0, 9, 1280, 0, 0, 0, 0, 0
  5348.             DATA  2048, 2305, 0, 5, 0, 0, 0, 0, 265, 264
  5349.             DATA  9, 5, 0, 0, 0, 0, 2304, 257, 9, 1280
  5350.             DATA  0, 0, 0, 0, 0, 2313, 9, 1280, 0, 0
  5351.             DATA  0, 0, 5, 0, 2304, 2570, 10, 0, 0, 0
  5352.             DATA  1280, 5, 2560, 1038, 2574, 0, 0, 0, 0, 1280
  5353.             DATA  2565, 1028, 2564, 0, 0, 0, 0, 0, 2560, 1038
  5354.             DATA  2574, 0, 0, 0, 0, 0, 0, 2570, 2314, 0
  5355.             DATA  0, 0, 0, 0, 0, 0, 0, 9, 2304, 0
  5356.             DATA  0, 0, 0, 0, 0, 2304, 2305, 0, 0, 0
  5357.             DATA  0, 0, 0, 256, 2305, 0, 0, 0, 0, 0
  5358.             DATA  0, 2313, 2313, 0, 0, 0, 0, 0, 0, 0
  5359.             DATA  0, 0, 0, 0, 0, 0, 0, 0, 0, 0
  5360.           
  5361.             DATA  15, 15, 0, 5, 2304, 2049, 2305, 0, 5, 0
  5362.             DATA  0, 1280, 2304, 2049, 2305, 1280, 0, 0, 0, 1280
  5363.             DATA  0, 265, 9, 1280, 0, 0, 0, 0, 5, 2304
  5364.           
  5365.  
  5366.  
  5367.  
  5368.  
  5369.   
  5370.             DATA  0, 5, 0, 0, 0, 0, 5, 2304, 0, 5
  5371.             DATA  0, 0, 0, 0, 1280, 2570, 1290, 0, 0, 0
  5372.             DATA  0, 0, 2560, 3588, 2564, 0, 0, 0, 0, 0
  5373.             DATA  2560, 1038, 2574, 0, 0, 0, 0, 0, 2560, 3588
  5374.             DATA  2564, 0, 0, 0, 0, 0, 0, 2570, 10, 0
  5375.             DATA  0, 0, 0, 0, 0, 2304, 0, 0, 0, 0
  5376.             DATA  0, 0, 0, 2304, 0, 0, 0, 0, 0, 0
  5377.             DATA  2304, 2305, 2305, 0, 0, 0, 0, 0, 0, 265
  5378.             DATA  9, 0, 0, 0, 0, 0, 0, 2304, 0, 0
  5379.             DATA  0, 0, 0, 0, 0, 0, 0, 0, 0, 0
  5380.           
  5381.             DATA  15, 15, 0, 0, 0, 0, 1280, 0, 9, 0
  5382.             DATA  0, 0, 0, 0, 5, 2304, 2049, 0, 0, 0
  5383.             DATA  0, 0, 5, 265, 264, 9, 0, 0, 0, 1280
  5384.             DATA  0, 265, 2305, 0, 0, 0, 0, 1280, 0, 2313
  5385.             DATA  9, 0, 0, 0, 0, 2570, 2314, 0, 0, 5
  5386.             DATA  0, 0, 2560, 1038, 2574, 0, 1285, 0, 0, 0
  5387.             DATA  2560, 1028, 2564, 1285, 0, 0, 0, 0, 2560, 1038
  5388.             DATA  2574, 0, 0, 0, 0, 0, 2304, 2570, 10, 0
  5389.             DATA  0, 0, 2304, 0, 9, 0, 0, 0, 0, 0
  5390.             DATA  2304, 2305, 0, 0, 0, 0, 0, 0, 2304, 257
  5391.             DATA  0, 0, 0, 0, 0, 0, 2304, 2313, 9, 0
  5392.             DATA  0, 0, 0, 0, 0, 0, 0, 0, 0, 0
  5393.             DATA  0, 0, 0, 0, 0, 0, 0, 0, 0, 0
  5394.           
  5395.             DATA  15, 15, 0, 0, 0, 0, 0, 0, 0, 0
  5396.             DATA  0, 0, 0, 0, 0, 0, 0, 0, 0, 0
  5397.             DATA  0, 0, 0, 0, 0, 5, 0, 0, 0, 0
  5398.             DATA  0, 0, 1285, 0, 0, 0, 0, 0, 0, 1285
  5399.             DATA  0, 0, 0, 9, 0, 2570, 1290, 0, 2304, 9
  5400.             DATA  2304, 1, 2560, 3588, 2564, 0, 265, 1, 265, 2313
  5401.             DATA  2569, 1038, 2574, 2313, 2049, 8, 2304, 1, 2560, 3588
  5402.             DATA  2564, 0, 265, 1, 0, 9, 0, 2570, 1290, 0
  5403.             DATA  2304, 9, 0, 0, 0, 0, 0, 1285, 0, 0
  5404.             DATA  0, 0, 0, 0, 0, 0, 1285, 0, 0, 0
  5405.             DATA  0, 0, 0, 0, 0, 5, 0, 0, 0, 0
  5406.             DATA  0, 0, 0, 0, 0, 0, 0, 0, 0, 0
  5407.             DATA  0, 0, 0, 0, 0, 0, 0, 0, 0, 0
  5408.           
  5409.             DATA  15, 15, 0, 0, 0, 0, 0, 0, 0, 0
  5410.             DATA  2304, 2313, 9, 0, 0, 0, 0, 0, 2304, 257
  5411.             DATA  0, 0, 0, 0, 0, 0, 2304, 2305, 0, 0
  5412.             DATA  0, 0, 0, 0, 2304, 0, 9, 0, 0, 0
  5413.             DATA  0, 0, 0, 0, 2304, 2570, 10, 0, 0, 0
  5414.             DATA  0, 0, 2560, 1038, 2574, 0, 0, 0, 0, 0
  5415.             DATA  2560, 1028, 2564, 1285, 0, 0, 0, 0, 2560, 1038
  5416.             DATA  2574, 0, 1285, 0, 0, 0, 0, 2570, 2314, 0
  5417.             DATA  0, 5, 0, 0, 0, 1280, 0, 2313, 9, 0
  5418.             DATA  0, 0, 0, 1280, 0, 265, 2305, 0, 0, 0
  5419.             DATA  0, 0, 5, 265, 264, 9, 0, 0, 0, 0
  5420.             DATA  5, 2304, 2049, 0, 0, 0, 0, 0, 1280, 0
  5421.             DATA  9, 0, 0, 0, 0, 0, 0, 0, 0, 0
  5422.           
  5423.  
  5424.  
  5425.  
  5426.  
  5427.               
  5428.           VIDEOMODEGET
  5429.             
  5430.           ° Syntax
  5431.             
  5432.             mode = VIDEOMODEGET
  5433.             
  5434.           ° Input
  5435.             
  5436.             no input parameters
  5437.             
  5438.           ° Output
  5439.             
  5440.             mode = the current video mode
  5441.             
  5442.           ° Usage
  5443.             
  5444.             Videomodeget returns the current video mode.  This function
  5445.             is best used to retrieve the video mode being used when a
  5446.             program begins.  When the program ends, this video mode can
  5447.             then be restored using videomodeset.
  5448.             
  5449.           ° See Also
  5450.             
  5451.             RES320, RES640, RES800, RES1024, RESTEXT, VIDEOMODESET
  5452.             
  5453.           ° Example
  5454.             
  5455.             REM SAVE THE VIDEO MODE,SWITCH TO 640X480X256, RESTORE THE
  5456.             ORIGINAL MODE
  5457.             REM $INCLUDE: 'SVGAQB10.BI'
  5458.             DEFINT A-Z
  5459.             
  5460.             VMODE = VIDEOMODEGET
  5461.             IF WHICHVGA = 0 THEN STOP
  5462.             IF WHICHMEM < 512 THEN STOP
  5463.             RES640
  5464.             
  5465.             DRWSTRING 1, 7, 0, "PRESS A KEY...", 0, 0
  5466.             WHILE I2NKEY$ = ""
  5467.             WEND
  5468.             
  5469.             VIDEOMODESET VMODE
  5470.             
  5471.             END
  5472.           
  5473.  
  5474.  
  5475.  
  5476.  
  5477.               
  5478.           VIDEOMODESET
  5479.             
  5480.           ° Syntax
  5481.             
  5482.             VIDEOMODESET Mode
  5483.             
  5484.           ° Input
  5485.             
  5486.             Mode = number of video mode
  5487.             
  5488.           ° Output
  5489.             
  5490.             no value returned
  5491.             
  5492.           ° Usage
  5493.             
  5494.             Videomodeset sets the video mode specified by Mode.  This
  5495.             function is best used at the end of a program to restore the
  5496.             video mode to the mode in use when the program began.  The
  5497.             program should retrieve the video mode at the beginning by
  5498.             using videomodeget.
  5499.             
  5500.           ° See Also
  5501.             
  5502.             RES320, RES640, RES800, RES1024, RESTEXT, VIDEOMODEGET
  5503.             
  5504.           ° Example
  5505.             
  5506.             REM SAVE THE VIDEO MODE,SWITCH TO 640X480X256, RESTORE THE
  5507.             ORIGINAL MODE
  5508.             REM $INCLUDE: 'SVGAQB10.BI'
  5509.             DEFINT A-Z
  5510.             
  5511.             VMODE = VIDEOMODEGET
  5512.             IF WHICHVGA = 0 THEN STOP
  5513.             IF WHICHMEM < 512 THEN STOP
  5514.             RES640
  5515.             
  5516.             DRWSTRING 1, 7, 0, "PRESS A KEY...", 0, 0
  5517.             WHILE I2NKEY$ = ""
  5518.             WEND
  5519.             
  5520.             VIDEOMODESET VMODE
  5521.             
  5522.             END
  5523.           
  5524.  
  5525.  
  5526.  
  5527.  
  5528.               
  5529.           VIDEOOFF
  5530.             
  5531.           ° Syntax
  5532.             
  5533.             VIDEOOFF
  5534.             
  5535.           ° Input
  5536.             
  5537.             no input parameters
  5538.             
  5539.           ° Output
  5540.             
  5541.             no value returned
  5542.             
  5543.           ° Usage
  5544.             
  5545.             Videooff turns the output display off.  Graphics may still
  5546.             be drawn to the screen.  However, the computer's monitor
  5547.             will display nothing and appear black.  This function can be
  5548.             used to hide graphics being drawn by initially using
  5549.             videooff and then later calling videoon.
  5550.             
  5551.           ° See Also
  5552.             
  5553.             VIDEOON
  5554.             
  5555.           ° Example
  5556.             
  5557.             REM DISABLE THE VIDEO FOR ABOUT 3 SEC
  5558.             REM $INCLUDE: 'SVGAQB10.BI'
  5559.             DEFINT A-Z
  5560.             
  5561.             CLS
  5562.             PRINT "PRESS A KEY TO DISABLE THE VIDEO DISPLAY FOR 3
  5563.             SECONDS"
  5564.             WHILE INKEY$ = ""
  5565.             WEND
  5566.             VIDEOOFF
  5567.             SDELAY 195
  5568.             VIDEOON
  5569.             PRINT "OK...WE ARE BACK!"
  5570.             
  5571.             WHILE INKEY$ = ""
  5572.             WEND
  5573.             
  5574.             END
  5575.           
  5576.  
  5577.  
  5578.  
  5579.  
  5580.               
  5581.           VIDEOON
  5582.             
  5583.           ° Syntax
  5584.             
  5585.             VIDEOON
  5586.             
  5587.           ° Input
  5588.             
  5589.             no input parameters
  5590.             
  5591.           ° Output
  5592.             
  5593.             no value returned
  5594.             
  5595.           ° Usage
  5596.             
  5597.             Videoon turns the display back on.  All graphics that were
  5598.             drawn while the display was off are now visible.  This
  5599.             function can be used to hide graphics being drawn by
  5600.             initially using videooff and then later calling videoon.
  5601.             
  5602.           ° See Also
  5603.             
  5604.             VIDEOOFF
  5605.             
  5606.           ° Example
  5607.             
  5608.             REM DISABLE THE VIDEO FOR ABOUT 3 SEC
  5609.             REM $INCLUDE: 'SVGAQB10.BI'
  5610.             DEFINT A-Z
  5611.             
  5612.             CLS
  5613.             PRINT "PRESS A KEY TO DISABLE THE VIDEO DISPLAY FOR 3
  5614.             SECONDS"
  5615.             WHILE INKEY$ = ""
  5616.             WEND
  5617.             VIDEOOFF
  5618.             SDELAY 195
  5619.             VIDEOON
  5620.             PRINT "OK...WE ARE BACK!"
  5621.             
  5622.             WHILE INKEY$ = ""
  5623.             WEND
  5624.             
  5625.             END
  5626.           
  5627.  
  5628.  
  5629.  
  5630.  
  5631.               
  5632.           WHICHCPU
  5633.             
  5634.           ° Syntax
  5635.             
  5636.             cpu = WHICHCPU
  5637.             
  5638.           ° Input
  5639.             
  5640.             no input parameters
  5641.             
  5642.           ° Output
  5643.             
  5644.             cpu = processor type
  5645.             
  5646.           ° Usage
  5647.             
  5648.             Whichcpu returns the computer's processor type as 86, 286,
  5649.             386 or 486.  This function should be called by any program
  5650.             using this library graphic's routines to insure that the
  5651.             computer is at least 386 compatible or better.
  5652.             
  5653.           ° See Also
  5654.             
  5655.             WHICHJOYSTICK, WHICHMOUSE, WHICHVGA
  5656.             
  5657.           ° Example
  5658.             
  5659.             REM FIND OUT WHAT KIND OF MICROPROCESSOR WE HAVE
  5660.             REM $INCLUDE: 'SVGAQB10.BI'
  5661.             DEFINT A-Z
  5662.             
  5663.             CLS
  5664.             CPU = WHICHCPU
  5665.             CPU$ = STR$(CPU)
  5666.             L = LEN(CPU$)
  5667.             CPU$ = RIGHT$(CPU$, L - 1)
  5668.             PRINT "Microprocessor is identified as a 80"; CPU$; "."
  5669.             
  5670.             END
  5671.           
  5672.  
  5673.  
  5674.  
  5675.  
  5676.               
  5677.           WHICHJOYSTICK
  5678.             
  5679.           ° Syntax
  5680.             
  5681.             support = WHICHJOYSTICK
  5682.             
  5683.           ° Input
  5684.             
  5685.             no input parameters
  5686.             
  5687.           ° Output
  5688.             
  5689.             support = available joystick support
  5690.             
  5691.           ° Usage
  5692.             
  5693.             Whichjoystick returns the joystick support available on the
  5694.             computer.  This function should be called prior to use of
  5695.             the joysticks to verify that joysticks are available.  The
  5696.             joystick support is returned in the bits of support.  If the
  5697.             function returns a -1, there is no joystick port present or
  5698.             no BIOS support for a joystick.  Joystick A is bit 1 and B
  5699.             is bit 2.  Therefore, a value of 1 means joystick A is
  5700.             available, a value of 2 means B is available and a value of
  5701.             3 means both are available.  If no bits are set, there are
  5702.             no joysticks present.
  5703.             
  5704.           ° See Also
  5705.             
  5706.             WHICHCPU, WHICHMOUSE, WHICHVGA
  5707.             
  5708.           ° Example
  5709.             
  5710.             REM FIND OUT IF WE HAVE ANY JOYSTICKS AVAILABLE
  5711.             REM $INCLUDE: 'SVGAQB10.BI'
  5712.             DEFINT A-Z
  5713.             
  5714.             CLS
  5715.             JOYSTICK = WHICHJOYSTICK
  5716.             SELECT CASE JOYSTICK
  5717.                 CASE IS = -1
  5718.                     A$ = "No joystick port detected or no joystick BIOS
  5719.             support present."
  5720.                 CASE IS = 0
  5721.                     A$ = "No joystick detected."
  5722.                 CASE IS = 1
  5723.                     A$ = "Joystick A is present and available."
  5724.                 CASE IS = 2
  5725.                     A$ = "Joystick B is present and available."
  5726.                 CASE IS = 3
  5727.                 A$ = "Both Joystick A and Joystick B are present and
  5728.             available."
  5729.             END SELECT
  5730.             PRINT A$
  5731.           
  5732.  
  5733.  
  5734.  
  5735.  
  5736.   
  5737.             
  5738.             END
  5739.           
  5740.  
  5741.  
  5742.  
  5743.  
  5744.               
  5745.           WHICHMEM
  5746.             
  5747.           ° Syntax
  5748.             
  5749.             mem = WHICHMEM
  5750.             
  5751.           ° Input
  5752.             
  5753.             no input parameters
  5754.             
  5755.           ° Output
  5756.             
  5757.             mem = installed video memory in kilobytes
  5758.             
  5759.           ° Usage
  5760.             
  5761.             Whichmem returns the amount of installed video memory as
  5762.             previously determined by whichvga.  Whichvga should be
  5763.             called prior to whichmem.  This function should be called
  5764.             prior to any of the res### functions to verify that there is
  5765.             enough memory to support the resolution.  If setcard was
  5766.             used to set the video card and memory, whichmem will return
  5767.             the amount of memory as defined by setcard.
  5768.             
  5769.           ° See Also
  5770.             
  5771.             RES320, RES640, RES800, RES1024, WHICHVGA
  5772.             
  5773.           ° Example
  5774.             
  5775.             REM FIND OUT HOW MUCH VIDEO MEMORY WE HAVE
  5776.             REM $INCLUDE: 'SVGAQB10.BI'
  5777.             DEFINT A-Z
  5778.             
  5779.             CLS
  5780.             DUMMY = WHICHVGA
  5781.             PRINT "INSTALLED VIDEO MEMORY IS IDENTIFIED AS"; WHICHMEM;
  5782.             "k BYTES"
  5783.             
  5784.             END
  5785.           
  5786.  
  5787.  
  5788.  
  5789.  
  5790.               
  5791.           WHICHMOUSE
  5792.             
  5793.           ° Syntax
  5794.             
  5795.             mse = WHICHMOUSE
  5796.             
  5797.           ° Input
  5798.             
  5799.             no input parameters
  5800.             
  5801.           ° Output
  5802.             
  5803.             mse = number of buttons on mouse
  5804.             
  5805.           ° Usage
  5806.             
  5807.             Whichmouse returns a value indicating whether a Microsoft
  5808.             compatible mouse is available.  If mse is 0, no mouse is
  5809.             available.  A nonzero value indicates a mouse and Microsoft
  5810.             compatible driver is installed and gives the number of
  5811.             buttons available.
  5812.             
  5813.           ° See Also
  5814.             
  5815.             MOUSEINFO, WHICHCPU, WHICHJOYSTICK, WHICHVGA
  5816.             
  5817.           ° Example
  5818.             
  5819.             REM FIND OUT WHAT KIND OF MOUSE WE HAVE
  5820.             REM $INCLUDE: 'SVGAQB10.BI'
  5821.             DEFINT A-Z
  5822.             
  5823.             CLS
  5824.             MOUSE = WHICHMOUSE
  5825.             IF MOUSE > 0 THEN
  5826.                 MOUSEINFO MJV, MNV, TP, I
  5827.                 VER$ = STR$(MNV)
  5828.                 L = LEN(VER$)
  5829.                 VER$ = STR$(MJV) + "." + RIGHT$(VER$, L - 1)
  5830.                 VER$ = "Software driver version is" + VER$
  5831.                 VER$ = VER$ + " (Microsoft equalvalent version)."
  5832.                 A$ = "Microsoft compatable mouse detected with"
  5833.                 A$ = A$ + STR$(MOUSE) + " buttons on IRQ" + STR$(I) +
  5834.             "."
  5835.                 PRINT A$
  5836.                 PRINT VER$
  5837.             ELSE
  5838.                 PRINT "No Microsoft compatable mouse detected."
  5839.             END IF
  5840.             
  5841.             END
  5842.           
  5843.  
  5844.  
  5845.  
  5846.  
  5847.               
  5848.           WHICHVGA
  5849.             
  5850.           ° Syntax
  5851.             
  5852.             chip = WHICHVGA
  5853.             
  5854.           ° Input
  5855.             
  5856.             no input parameters
  5857.             
  5858.           ° Output
  5859.             
  5860.             chip = code indentifying video card
  5861.             
  5862.           ° Usage
  5863.             
  5864.             Whichvga identifies the video card installed and the amount
  5865.             of video memory.  In addition this function sets up the
  5866.             default font and mouse cursor.  This function must be called
  5867.             before any other graphics function.  The code returned
  5868.             identifies the video card according to the following table:
  5869.             
  5870.             1 Acumos SuperVGA
  5871.             2 ATI Technologies SuperVGA
  5872.             3 Ahead V5000 ver A SuperVGA
  5873.             4 Ahead V5000 ver B SuperVGA
  5874.             5 Chips and Technologies SuperVGA
  5875.             6 Cirrus Logic CL-GD 500/600 SuperVGA
  5876.             7 Everex Micro Enhancer SuperVGA
  5877.             8 Genoa SuperVGA
  5878.             9 NCR 77C22E SuperVGA
  5879.             10 Oak Technologies OTI-067/037C SuperVGA
  5880.             11 Paridise/Western Digital SuperVGA
  5881.             12 (intentionally omitted)
  5882.             13 Trident 8800/8900 SuperVGA
  5883.             14 Tseng Labs 3000 SuperVGA
  5884.             15 Tseng Labs 4000 SuperVGA
  5885.             16 VESA compatable SuperVGA
  5886.             17 Video 7 SuperVGA
  5887.             
  5888.             Any value returned not found on this table represents an
  5889.             unidentified video card.  No graphics functions should be
  5890.             called unless the video card is properly identified.
  5891.             
  5892.           ° See Also
  5893.             
  5894.             SETCARD, WHICHCPU, WHICHJOYSTICK, WHICHMOUSE, WHICHMEM
  5895.             
  5896.           ° Example
  5897.             
  5898.             REM FIND OUT WHAT KIND OF VIDEO CARD WE HAVE
  5899.             DEFINT A-Z
  5900.             
  5901.             CLS
  5902.           
  5903.  
  5904.  
  5905.  
  5906.  
  5907.   
  5908.             VGA = WHICHVGA
  5909.             SELECT CASE VGA
  5910.                 CASE IS = 1
  5911.                     VGA$ = "Acumos SuperVGA"
  5912.                 CASE IS = 2
  5913.                     VGA$ = "ATI Technologies SuperVGA"
  5914.                 CASE IS = 3
  5915.                     VGA$ = "Ahead V5000 ver A SuperVGA"
  5916.                 CASE IS = 4
  5917.                     VGA$ = "Ahead V5000 ver B SuperVGA"
  5918.                 CASE IS = 5
  5919.                     VGA$ = "Chips and Technologies SuperVGA"
  5920.                 CASE IS = 6
  5921.                     VGA$ = "Cirrus Logic CL-GD 500/600 SuperVGA"
  5922.                 CASE IS = 7
  5923.                     VGA$ = "Everex Micro Enhancer SuperVGA"
  5924.                 CASE IS = 8
  5925.                     VGA$ = "Genoa SuperVGA"
  5926.                 CASE IS = 9
  5927.                     VGA$ = "NCR 77C22E SuperVGA"
  5928.                 CASE IS = 10
  5929.                     VGA$ = "Oak Technologies OTI-067/037C SuperVGA"
  5930.                 CASE IS = 11
  5931.                     VGA$ = "Paridise/Western Digital SuperVGA"
  5932.                 CASE IS = 13
  5933.                     VGA$ = "Trident 8800/8900 SuperVGA"
  5934.                 CASE IS = 14
  5935.                     VGA$ = "Tseng Labs 3000 SuperVGA"
  5936.                 CASE IS = 15
  5937.                     VGA$ = "Tseng Labs 4000 SuperVGA"
  5938.                 CASE IS = 16
  5939.                     VGA$ = "VESA compatable SuperVGA"
  5940.                 CASE IS = 17
  5941.                     VGA$ = "Video 7 SuperVGA"
  5942.                 CASE ELSE
  5943.                     VGA$ = "Unidentified"
  5944.                     VGA = 0
  5945.             END SELECT
  5946.             PRINT "Video card/chip is identified as a "; VGA$; "."
  5947.             
  5948.             END
  5949.           
  5950.  
  5951.  
  5952.  
  5953.  
  5954.               
  5955.           APPENDIX  SVGAQB10.BI
  5956.           
  5957.           This is the header file containing function declarations and
  5958.           structure definitions for SVGAQB10.LIB.  This file should be
  5959.           included in every program that uses this library.  To properly
  5960.           include the header file, place the following line at the top
  5961.           of the every program module:
  5962.           
  5963.                             REM $INCLUDE: 'SVGAQB10.BI'
  5964.           
  5965.           Without these declarations and definitions, the QuickBasic
  5966.           compiler will be unable to compile any program using the
  5967.           commands found in this library.
  5968.           
  5969.           REM SVGAQB10 GRAPHICS LIBRARY INCLUDE FILE FOR MS QuickBasic
  5970.           REM COPYRIGHT 1993 BY STEPHEN L. BALKUM AND DANIEL A. SILL
  5971.           REM ZEPHYR SOFTWARE, P.O. BOX 7704, AUSTIN, TEXAS  78713-7704
  5972.           REM LAST UPDATE 5/11/93
  5973.           
  5974.           DECLARE SUB BLKGET (BYVAL X1%, BYVAL Y1%, BYVAL X2%, BYVAL
  5975.             Y2%, SEG GFXBLK%)
  5976.           DECLARE SUB BLKPUT (BYVAL Mode%, BYVAL X%, BYVAL Y%, SEG
  5977.             GFXBLK%)
  5978.           DECLARE SUB D2ROTATE (BYVAL Points%, BYVAL XOrigin%, BYVAL
  5979.             YOrigin%, BYVAL ANG%, SEG InAry%, SEG OutAry%)
  5980.           DECLARE SUB D2SCALE (BYVAL Points%, BYVAL XSCALE%, BYVAL
  5981.             YSCALE%, SEG InAry%, SEG OutAry%)
  5982.           DECLARE SUB D2TRANSLATE (BYVAL Points%, BYVAL XTRANS%, BYVAL
  5983.             YTRANS%, SEG InAry%, SEG OutAry%)
  5984.           DECLARE FUNCTION D3PROJECT% (BYVAL Points%, SEG ProjParms%,
  5985.             SEG InAry%, SEG OutAry%)
  5986.           DECLARE SUB D3ROTATE (BYVAL Points%, BYVAL XOrigin%, BYVAL
  5987.             YOrigin%, BYVAL ZOrigin%, BYVAL ZRAng%, BYVAL YRAng%, BYVAL
  5988.             XRAng%, SEG InAry%, SEG OutAry%)
  5989.           DECLARE SUB D3SCALE (BYVAL Points%, BYVAL XSCALE%, BYVAL
  5990.             YSCALE%, BYVAL ZScale%, SEG InAry%, SEG OutAry%)
  5991.           DECLARE SUB D3TRANSLATE (BYVAL Points%, BYVAL XTRANS%, BYVAL
  5992.             YTRANS%, BYVAL ZTrans%, SEG InAry%, SEG OutAry%)
  5993.           DECLARE SUB DRWBOX (BYVAL Mode%, BYVAL Colr%, BYVAL X1%, BYVAL
  5994.             Y1%, BYVAL X2%, BYVAL Y2%)
  5995.           DECLARE SUB DRWCIRCLE (BYVAL Mode%, BYVAL Colr%, BYVAL
  5996.             CenterX%, BYVAL CenterY%, BYVAL Radius%)
  5997.           DECLARE SUB DRWELLIPSE (BYVAL Mode%, BYVAL Colr%, BYVAL
  5998.             CenterX%, BYVAL CenterY%, BYVAL Radiusx%, BYVAL Radiusy%)
  5999.           DECLARE SUB DRWLINE (BYVAL Mode%, BYVAL Colr%, BYVAL X1%,
  6000.             BYVAL Y1%, BYVAL X2%, BYVAL Y2%)
  6001.           DECLARE SUB DRWPOINT (BYVAL Mode%, BYVAL Colr%, BYVAL X%,
  6002.             BYVAL Y%)
  6003.           DECLARE SUB DRWSTRING (BYVAL Mode%, BYVAL FColr%, BYVAL
  6004.             BColr%, Strng$, BYVAL X%, BYVAL Y%)
  6005.           DECLARE SUB DRWSTRINGDN (BYVAL Mode%, BYVAL FColr%, BYVAL
  6006.             BColr%, Strng$, BYVAL X%, BYVAL Y%)
  6007.           DECLARE SUB DRWSTRINGLT (BYVAL Mode%, BYVAL FColr%, BYVAL
  6008.             BColr%, Strng$, BYVAL X%, BYVAL Y%)
  6009.           
  6010.  
  6011.  
  6012.  
  6013.  
  6014.   
  6015.           DECLARE SUB DRWSTRINGRT (BYVAL Mode%, BYVAL FColr%, BYVAL
  6016.             BColr%, Strng$, BYVAL X%, BYVAL Y%)
  6017.           DECLARE SUB FILLAREA (BYVAL Xseed%, BYVAL Yseed%, BYVAL
  6018.             BorderColr%, BYVAL FillColr%)
  6019.           DECLARE SUB FILLCOLOR (BYVAL Xseed%, BYVAL Yseed%, BYVAL
  6020.             OldColr%, BYVAL NewColr%)
  6021.           DECLARE SUB FILLSCREEN (BYVAL Colr%)
  6022.           DECLARE SUB FILLVIEW (BYVAL Colr%)
  6023.           DECLARE SUB FONTGETINFO (WDTH%, HGHT%)
  6024.           DECLARE SUB FONTSET (FONT$)
  6025.           DECLARE SUB FONTSYSTEM ()
  6026.           DECLARE SUB GETLASTSTRING (SEG StrngGfxBlk%)
  6027.           DECLARE FUNCTION GETPOINT% (BYVAL X%, BYVAL Y%)
  6028.           DECLARE FUNCTION GIFGETINFO% (Name$, GifXSize%, GifYSize%,
  6029.             NumColors%, PAL$)
  6030.           DECLARE FUNCTION GIFPUT% (BYVAL Mode%, BYVAL Xloc%, BYVAL
  6031.             Yloc%, Name$)
  6032.           DECLARE SUB JOYSTICKINFO (JAX%, JAY%, JAButs%, JBX%, JBY%,
  6033.             JBButs%)
  6034.           DECLARE SUB MOUSEBUTPRESS (ReqBut%, Xloc%, Yloc%, Num%,
  6035.             Mbuts%)
  6036.           DECLARE SUB MOUSEBUTRELEASE (ReqBut%, Xloc%, Yloc%, Num%,
  6037.             Mbuts%)
  6038.           DECLARE SUB MOUSECURSORDEFAULT ()
  6039.           DECLARE SUB MOUSECURSORSET (MouseCursor$)
  6040.           DECLARE SUB MOUSEENTER ()
  6041.           DECLARE SUB MOUSEEXIT ()
  6042.           DECLARE SUB MOUSEHIDE ()
  6043.           DECLARE SUB MOUSEINFO (DrvMajorVer%, DrvMinorVer%, MouseType%,
  6044.             IRQnumber%)
  6045.           DECLARE SUB MOUSELOCSET (BYVAL Xloc%, BYVAL Yloc%)
  6046.           DECLARE SUB MOUSERANGESET (BYVAL X1%, BYVAL Y1%, BYVAL X2%,
  6047.             BYVAL Y2%)
  6048.           DECLARE SUB MOUSERESTORESTATE (SEG MouseBuf%)
  6049.           DECLARE SUB MOUSESAVESTATE (SEG MouseBuf%)
  6050.           DECLARE SUB MOUSESENSSET (BYVAL Xsens%, BYVAL Ysens%)
  6051.           DECLARE SUB MOUSESHOW ()
  6052.           DECLARE SUB MOUSESTATUS (X%, Y%, MButs%)
  6053.           DECLARE FUNCTION MOUSESTORAGESIZE% ()
  6054.           DECLARE SUB OVERSCANSET (BYVAL Colr%)
  6055.           DECLARE SUB PALCHGAUTO (PalString$, NewPalString$, BYVAL
  6056.             FirstColr%, BYVAL LastColr%, BYVAL Speed%)
  6057.           DECLARE SUB PALCHGSTEP (PalString$, NewPalString$, BYVAL
  6058.             FirstColr%, BYVAL LastColr%, BYVAL Percent%)
  6059.           DECLARE SUB PALDIMSTEP (PalString$, BYVAL FirstColr%, BYVAL
  6060.             LastColr%, BYVAL Percent%)
  6061.           DECLARE SUB PALGET (PalString$, BYVAL FirstColr%, BYVAL
  6062.             LastColr%)
  6063.           DECLARE SUB PALIOAUTO (PalString$, BYVAL FirstColr%, BYVAL
  6064.             LastColr%, BYVAL Speed%)
  6065.           DECLARE SUB PALROTATE (PalString$, BYVAL FirstColr%, BYVAL
  6066.             LastColr%, BYVAL Shift%)
  6067.           DECLARE SUB PALSET (PalString$, BYVAL FirstColr%, BYVAL
  6068.             LastColr%)
  6069.           DECLARE SUB RES320 ()
  6070.           
  6071.  
  6072.  
  6073.  
  6074.  
  6075.   
  6076.           DECLARE SUB RES640 ()
  6077.           DECLARE SUB RES800 ()
  6078.           DECLARE SUB RES1024 ()
  6079.           DECLARE SUB RESTEXT ()
  6080.           DECLARE SUB SCROLLDN (BYVAL X1%, BYVAL Y1%, BYVAL X2%, BYVAL
  6081.             Y2%, BYVAL NUM%, BYVAL Colr%)
  6082.           DECLARE SUB SCROLLLT (BYVAL X1%, BYVAL Y1%, BYVAL X2%, BYVAL
  6083.             Y2%, BYVAL NUM%, BYVAL Colr%)
  6084.           DECLARE SUB SCROLLRT (BYVAL X1%, BYVAL Y1%, BYVAL X2%, BYVAL
  6085.             Y2%, BYVAL NUM%, BYVAL Colr%)
  6086.           DECLARE SUB SCROLLUP (BYVAL X1%, BYVAL Y1%, BYVAL X2%, BYVAL
  6087.             Y2%, BYVAL NUM%, BYVAL Colr%)
  6088.           DECLARE SUB SDELAY (BYVAL Count%)
  6089.           DECLARE SUB SETCARD (BYVAL CHIP%, BYVAL MEM%)
  6090.           DECLARE SUB SETVIEW (BYVAL X1%, BYVAL Y1%, BYVAL X2%, BYVAL
  6091.             Y2%)
  6092.           DECLARE SUB SPRITEGET (BYVAL TransColr%, BYVAL X%, BYVAL Y%,
  6093.             SEG SPRITEGFXBLK%, SEG BKGNDGFXBLK%)
  6094.           DECLARE SUB SPRITEPUT (BYVAL TransColr%, BYVAL X%, BYVAL Y%,
  6095.             SEG SPRITEGFXBLK%)
  6096.           DECLARE FUNCTION VIDEOMODEGET% ()
  6097.           DECLARE SUB VIDEOMODESET (BYVAL Mode%)
  6098.           DECLARE SUB VIDEOOFF ()
  6099.           DECLARE SUB VIDEOON ()
  6100.           DECLARE FUNCTION WHICHCPU% ()
  6101.           DECLARE FUNCTION WHICHJOYSTICK% ()
  6102.           DECLARE FUNCTION WHICHMEM% ()
  6103.           DECLARE FUNCTION WHICHMOUSE% ()
  6104.           DECLARE FUNCTION WHICHVGA% ()
  6105.           
  6106.           TYPE P2DType
  6107.             X AS INTEGER
  6108.             Y AS INTEGER
  6109.           END TYPE
  6110.           
  6111.           TYPE P3Dtype
  6112.             X AS INTEGER
  6113.             Y AS INTEGER
  6114.             Z AS INTEGER
  6115.           END TYPE
  6116.           
  6117.           TYPE PROJType
  6118.             EYEX AS INTEGER
  6119.             EYEY AS INTEGER
  6120.             EYEZ AS INTEGER
  6121.             SCRD AS INTEGER
  6122.             THETA AS INTEGER
  6123.             PHI AS INTEGER
  6124.           END TYPE
  6125.           
  6126.           
  6127.