home *** CD-ROM | disk | FTP | other *** search
/ Best Objectech Shareware Selections / UNTITLED.iso / boss / grap / util / 021 / svgademo.bas < prev    next >
BASIC Source File  |  1993-06-11  |  34KB  |  884 lines

  1. '****************************************************************************
  2. '*     
  3. '*      'SVGAQB10' A Super Vga Graphics Library for use with MS
  4. '*      QuickBasic 4.X
  5. '*      Copyright 1993 by Stephen L. Balkum and Daniel A. Sill
  6. '*
  7. '*      MS and QuickBasic are registered trademarks of Microsoft Corporation.
  8. '*      GIF and 'Graphics Intechange Format' are trademarks (tm) of
  9. '*      Compuserve, Incorporated, an H&R Block Company.
  10. '*
  11. '*    **************** UNREGISTERD SHAREWARE VERSION ***********************
  12. '*    * FOR EVUALATION ONLY. NOT FOR RESALE IN ANY FORM. SOFTWARE WRITTEN  *
  13. '*    * USING THIS UNREGISTERED SHAREWARE GRAPHICS LIBRARY MAY NOT BY SOLD *
  14. '*    * OR USED FOR ANY PURPOSE OTHER THAN THE EVUALTION OF THIS LIBRARY.  *
  15. '*    **********************************************************************
  16. '*
  17. '*    **************** NO WARRANTIES AND NO LIABILITY **********************
  18. '*    * Stephen L. Balkum and Daniel A. Sill provide no warranties, either *
  19. '*    * expressed or implied, of merchantability, or fitness, for a        *
  20. '*    * particular use or purpose of this SOFTWARE and documentation.      *
  21. '*    * In no event shall Stephen L. Balkum or Daniel A. Sill be held      *
  22. '*    * liable for any damages resulting from the use or misuse of the     * 
  23. '*    * SOFTWARE and documentation.                                        *
  24. '*    **********************************************************************
  25. '*
  26. '*    ************** U.S. GOVERNMENT RESTRICTED RIGHTS *********************
  27. '*    * Use, duplication, or disclosure of the SOFTWARE and documentation  *
  28. '*    * by the U.S. Government is subject to the restictions as set forth  *
  29. '*    * in subparagraph (c)(1)(ii) of the Rights in Technical Data and     *
  30. '*    * Computer Software cluse at DFARS 252.227-7013.                     *
  31. '*    * Contractor/manufacturer is Stephen L. Balkum and Daniel A. Sill,   *
  32. '*    * P.O. Box 7704, Austin, Texas 78713-7704                            *
  33. '*    **********************************************************************
  34. '*
  35. '*    **********************************************************************
  36. '*    * By using this SOFTWARE or documentation, you agree to the above    *
  37. '*    * terms and conditions.                                              *
  38. '*    **********************************************************************
  39. '*
  40. '****************************************************************************
  41.     
  42.  
  43.     REM $INCLUDE: 'SVGAQB10.BI'
  44.     REM $INCLUDE: 'SVGADEMO.BI'
  45.  
  46.     DIM POINTARRY3D(0 TO 13) AS P3Dtype
  47.     DIM PLAYARRY(0 TO 13) AS P3Dtype
  48.     DIM PLOTARRY(0 TO 13) AS P2DType
  49.     DIM OPLOTARRY(0 TO 13) AS P2DType
  50.     DIM GFXBLK(0 TO 10000) AS INTEGER
  51.     DIM SPRITEDATA(0 TO 1040) AS INTEGER
  52.     DIM SPRITEBKGND(0 TO 130) AS INTEGER
  53.    
  54.  
  55.     '*************************************************************************
  56.     '* SAVE THE STARTING VIDEOMODE AND SET IT TO MODE 3.
  57.     '*************************************************************************
  58.     STARTVIDEOMODE = VIDEOMODEGET
  59.     RESTEXT
  60.     CLS
  61.  
  62.     FOR A = 0 TO 33
  63.         Dummy$ = INKEY$  '* CLEAR THE KEYBOARD BUFFER
  64.     NEXT A
  65.     '*************************************************************************
  66.     '* MOVE THE DOS CURSOR TO THE TOP LEFT TO START THE PROGRAM AND SAY HELLO
  67.     '*************************************************************************
  68.     LOCATE 1, 1
  69.     PRINT "'SVGAQB10.LIB' A SuperVGA Graphics Library For Use With MS QuickBASIC 4.5"
  70.     LOCATE 2, 10
  71.     PRINT "Copyright 1993 by Stephen L. Balkum and Daniel A. Sill"
  72.     LOCATE 12, 25
  73.     PRINT "Demonstration/Example Program"
  74.     LOCATE 23, 1
  75.     PRINT "Press a key to begin the demo..."
  76.     GETKEY (RET$)
  77.     CLS
  78.    
  79.     '*************************************************************************
  80.     '* LET'S ID THE PROCESSOR FIRST AS THE LIBRARY REQUIRES A 386 OR BETTER.
  81.     '*************************************************************************
  82.     LOCATE 1, 1
  83.     CPU = WHICHCPU
  84.     CPU$ = STR$(CPU)
  85.     L = LEN(CPU$)
  86.     CPU$ = RIGHT$(CPU$, L - 1)
  87.     IF CPU < 386 THEN
  88.         PRINT "Sorry, this library requires a 80386 or better processor."
  89.         PRINT "Processor is identified as a 80"; CPU$; "."
  90.         PRINT "Demo program will be terminated."
  91.         PRINT
  92.         PRINT "Press a key..."
  93.         SOUND 100, 5
  94.         WHILE INKEY$ = ""
  95.         WEND
  96.         VIDEOMODESET (STARTVIDEOMODE)
  97.         END
  98.     ELSE
  99.         PRINT "Microprocessor is identified as a 80"; CPU$; "."
  100.     END IF
  101.     PRINT
  102.  
  103.     '*************************************************************************
  104.     '* LET'S ID THE VIDEO CARD/CHIP AS THE LIBRARY REQUIRES A SUPERVGA ADAPTER.
  105.     '*************************************************************************
  106.     VGA = WHICHVGA
  107.     SELECT CASE VGA
  108.         CASE IS = 1
  109.             VGA$ = "Acumos SuperVGA"
  110.         CASE IS = 2
  111.             VGA$ = "ATI Technologies SuperVGA"
  112.         CASE IS = 3
  113.             VGA$ = "Ahead V5000 ver A SuperVGA"
  114.         CASE IS = 4
  115.             VGA$ = "Ahead V5000 ver B SuperVGA"
  116.         CASE IS = 5
  117.             VGA$ = "Chips and Technologies SuperVGA"
  118.         CASE IS = 6
  119.             VGA$ = "Cirrus Logic CL-GD 500/600 SuperVGA"
  120.         CASE IS = 7
  121.             VGA$ = "Everex Micro Enhancer SuperVGA"
  122.         CASE IS = 8
  123.             VGA$ = "Genoa SuperVGA"
  124.         CASE IS = 9
  125.             VGA$ = "NCR 77C22E SuperVGA"
  126.         CASE IS = 10
  127.             VGA$ = "Oak Technologies OTI-067/037C SuperVGA"
  128.         CASE IS = 11
  129.             VGA$ = "Paridise/Western Digital SuperVGA"
  130.         CASE IS = 13
  131.             VGA$ = "Trident 8800/8900 SuperVGA"
  132.         CASE IS = 14
  133.             VGA$ = "Tseng Labs 3000 SuperVGA"
  134.         CASE IS = 15
  135.             VGA$ = "Tseng Labs 4000 SuperVGA"
  136.         CASE IS = 16
  137.             VGA$ = "VESA compatable SuperVGA"
  138.         CASE IS = 17
  139.             VGA$ = "Video 7 SuperVGA"
  140.         CASE ELSE
  141.             VGA$ = "Unidentified"
  142.             VGA = 0
  143.     END SELECT
  144.     IF VGA < 1 THEN
  145.         PRINT "Sorry, unable to identify video card or it is not a SuperVGA video adapter."
  146.         PRINT "Demo program will be terminated."
  147.         PRINT
  148.         PRINT "Press a key..."
  149.         SOUND 100, 5
  150.         WHILE INKEY$ = ""
  151.         WEND
  152.         VIDEOMODESET (STARTVIDEOMODE)
  153.         END
  154.     ELSE
  155.         PRINT "Video card/chip is identified as a "; VGA$; "."
  156.     END IF
  157.    
  158.     '*************************************************************************
  159.     '* LET'S SEE THE HOW MUCH MEMORY IS INSTALLED ON THE SUPER VGA ADAPTER.
  160.     '*************************************************************************
  161.     VIDEOMEMORY = WHICHMEM
  162.     MEM$ = STR$(VIDEOMEMORY)
  163.     MEM$ = RIGHT$(MEM$, LEN(MEM$) - 1) + " kB"
  164.     IF VIDEOMEMORY < 1 THEN
  165.         PRINT "Sorry, unable to identify the amount of installed video memory."
  166.         PRINT "Demo program will be terminated."
  167.         PRINT
  168.         PRINT "Press a key..."
  169.         SOUND 100, 5
  170.         WHILE INKEY$ = ""
  171.         WEND
  172.         VIDEOMODESET (STARTVIDEOMODE)
  173.         END
  174.     ELSE
  175.         PRINT "Installed video memory identified as "; MEM$; "."
  176.     END IF
  177.    
  178.     '*************************************************************************
  179.     '* LET'S TELL THE USER WHAT THE HIGHEST RESOLUTION THAT THE VIDEO CARD
  180.     '* AND ITS INSTALLED MEMORY CARD IS CABABLE OF. THE MONITOR MUST BE ABLE
  181.     '* TO SUPPORT THOSE MODES TOO !
  182.     '*************************************************************************
  183.     PRINT "Video card and installed memory is capable of the following resolutions:"
  184.     SELECT CASE VIDEOMEMORY
  185.         CASE IS > 1023
  186.             PRINT TAB(4); "320x200 in 256 colors"
  187.             PRINT TAB(4); "640x480 in 256 colors"
  188.             PRINT TAB(4); "800x600 in 256 colors"
  189.             PRINT TAB(4); "1024x768 in 256 colors"
  190.             MAX = 4
  191.         CASE IS > 511
  192.             PRINT TAB(4); "320x200 in 256 colors"
  193.             PRINT TAB(4); "640x480 in 256 colors"
  194.             PRINT TAB(4); "800x600 in 256 colors"
  195.