home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Best Objectech Shareware Selections
/
UNTITLED.iso
/
boss
/
grap
/
util
/
021
/
svgademo.bas
< prev
next >
Wrap
BASIC Source File
|
1993-06-11
|
34KB
|
884 lines
'****************************************************************************
'*
'* 'SVGAQB10' A Super Vga Graphics Library for use with MS
'* QuickBasic 4.X
'* Copyright 1993 by Stephen L. Balkum and Daniel A. Sill
'*
'* MS and QuickBasic are registered trademarks of Microsoft Corporation.
'* GIF and 'Graphics Intechange Format' are trademarks (tm) of
'* Compuserve, Incorporated, an H&R Block Company.
'*
'* **************** UNREGISTERD SHAREWARE VERSION ***********************
'* * FOR EVUALATION ONLY. NOT FOR RESALE IN ANY FORM. SOFTWARE WRITTEN *
'* * USING THIS UNREGISTERED SHAREWARE GRAPHICS LIBRARY MAY NOT BY SOLD *
'* * OR USED FOR ANY PURPOSE OTHER THAN THE EVUALTION OF THIS LIBRARY. *
'* **********************************************************************
'*
'* **************** NO WARRANTIES AND NO LIABILITY **********************
'* * Stephen L. Balkum and Daniel A. Sill provide no warranties, either *
'* * expressed or implied, of merchantability, or fitness, for a *
'* * particular use or purpose of this SOFTWARE and documentation. *
'* * In no event shall Stephen L. Balkum or Daniel A. Sill be held *
'* * liable for any damages resulting from the use or misuse of the *
'* * SOFTWARE and documentation. *
'* **********************************************************************
'*
'* ************** U.S. GOVERNMENT RESTRICTED RIGHTS *********************
'* * Use, duplication, or disclosure of the SOFTWARE and documentation *
'* * by the U.S. Government is subject to the restictions as set forth *
'* * in subparagraph (c)(1)(ii) of the Rights in Technical Data and *
'* * Computer Software cluse at DFARS 252.227-7013. *
'* * Contractor/manufacturer is Stephen L. Balkum and Daniel A. Sill, *
'* * P.O. Box 7704, Austin, Texas 78713-7704 *
'* **********************************************************************
'*
'* **********************************************************************
'* * By using this SOFTWARE or documentation, you agree to the above *
'* * terms and conditions. *
'* **********************************************************************
'*
'****************************************************************************
REM $INCLUDE: 'SVGAQB10.BI'
REM $INCLUDE: 'SVGADEMO.BI'
DIM POINTARRY3D(0 TO 13) AS P3Dtype
DIM PLAYARRY(0 TO 13) AS P3Dtype
DIM PLOTARRY(0 TO 13) AS P2DType
DIM OPLOTARRY(0 TO 13) AS P2DType
DIM GFXBLK(0 TO 10000) AS INTEGER
DIM SPRITEDATA(0 TO 1040) AS INTEGER
DIM SPRITEBKGND(0 TO 130) AS INTEGER
'*************************************************************************
'* SAVE THE STARTING VIDEOMODE AND SET IT TO MODE 3.
'*************************************************************************
STARTVIDEOMODE = VIDEOMODEGET
RESTEXT
CLS
FOR A = 0 TO 33
Dummy$ = INKEY$ '* CLEAR THE KEYBOARD BUFFER
NEXT A
'*************************************************************************
'* MOVE THE DOS CURSOR TO THE TOP LEFT TO START THE PROGRAM AND SAY HELLO
'*************************************************************************
LOCATE 1, 1
PRINT "'SVGAQB10.LIB' A SuperVGA Graphics Library For Use With MS QuickBASIC 4.5"
LOCATE 2, 10
PRINT "Copyright 1993 by Stephen L. Balkum and Daniel A. Sill"
LOCATE 12, 25
PRINT "Demonstration/Example Program"
LOCATE 23, 1
PRINT "Press a key to begin the demo..."
GETKEY (RET$)
CLS
'*************************************************************************
'* LET'S ID THE PROCESSOR FIRST AS THE LIBRARY REQUIRES A 386 OR BETTER.
'*************************************************************************
LOCATE 1, 1
CPU = WHICHCPU
CPU$ = STR$(CPU)
L = LEN(CPU$)
CPU$ = RIGHT$(CPU$, L - 1)
IF CPU < 386 THEN
PRINT "Sorry, this library requires a 80386 or better processor."
PRINT "Processor is identified as a 80"; CPU$; "."
PRINT "Demo program will be terminated."
PRINT
PRINT "Press a key..."
SOUND 100, 5
WHILE INKEY$ = ""
WEND
VIDEOMODESET (STARTVIDEOMODE)
END
ELSE
PRINT "Microprocessor is identified as a 80"; CPU$; "."
END IF
PRINT
'*************************************************************************
'* LET'S ID THE VIDEO CARD/CHIP AS THE LIBRARY REQUIRES A SUPERVGA ADAPTER.
'*************************************************************************
VGA = WHICHVGA
SELECT CASE VGA
CASE IS = 1
VGA$ = "Acumos SuperVGA"
CASE IS = 2
VGA$ = "ATI Technologies SuperVGA"
CASE IS = 3
VGA$ = "Ahead V5000 ver A SuperVGA"
CASE IS = 4
VGA$ = "Ahead V5000 ver B SuperVGA"
CASE IS = 5
VGA$ = "Chips and Technologies SuperVGA"
CASE IS = 6
VGA$ = "Cirrus Logic CL-GD 500/600 SuperVGA"
CASE IS = 7
VGA$ = "Everex Micro Enhancer SuperVGA"
CASE IS = 8
VGA$ = "Genoa SuperVGA"
CASE IS = 9
VGA$ = "NCR 77C22E SuperVGA"
CASE IS = 10
VGA$ = "Oak Technologies OTI-067/037C SuperVGA"
CASE IS = 11
VGA$ = "Paridise/Western Digital SuperVGA"
CASE IS = 13
VGA$ = "Trident 8800/8900 SuperVGA"
CASE IS = 14
VGA$ = "Tseng Labs 3000 SuperVGA"
CASE IS = 15
VGA$ = "Tseng Labs 4000 SuperVGA"
CASE IS = 16
VGA$ = "VESA compatable SuperVGA"
CASE IS = 17
VGA$ = "Video 7 SuperVGA"
CASE ELSE
VGA$ = "Unidentified"
VGA = 0
END SELECT
IF VGA < 1 THEN
PRINT "Sorry, unable to identify video card or it is not a SuperVGA video adapter."
PRINT "Demo program will be terminated."
PRINT
PRINT "Press a key..."
SOUND 100, 5
WHILE INKEY$ = ""
WEND
VIDEOMODESET (STARTVIDEOMODE)
END
ELSE
PRINT "Video card/chip is identified as a "; VGA$; "."
END IF
'*************************************************************************
'* LET'S SEE THE HOW MUCH MEMORY IS INSTALLED ON THE SUPER VGA ADAPTER.
'*************************************************************************
VIDEOMEMORY = WHICHMEM
MEM$ = STR$(VIDEOMEMORY)
MEM$ = RIGHT$(MEM$, LEN(MEM$) - 1) + " kB"
IF VIDEOMEMORY < 1 THEN
PRINT "Sorry, unable to identify the amount of installed video memory."
PRINT "Demo program will be terminated."
PRINT
PRINT "Press a key..."
SOUND 100, 5
WHILE INKEY$ = ""
WEND
VIDEOMODESET (STARTVIDEOMODE)
END
ELSE
PRINT "Installed video memory identified as "; MEM$; "."
END IF
'*************************************************************************
'* LET'S TELL THE USER WHAT THE HIGHEST RESOLUTION THAT THE VIDEO CARD
'* AND ITS INSTALLED MEMORY CARD IS CABABLE OF. THE MONITOR MUST BE ABLE
'* TO SUPPORT THOSE MODES TOO !
'*************************************************************************
PRINT "Video card and installed memory is capable of the following resolutions:"
SELECT CASE VIDEOMEMORY
CASE IS > 1023
PRINT TAB(4); "320x200 in 256 colors"
PRINT TAB(4); "640x480 in 256 colors"
PRINT TAB(4); "800x600 in 256 colors"
PRINT TAB(4); "1024x768 in 256 colors"
MAX = 4
CASE IS > 511
PRINT TAB(4); "320x200 in 256 colors"
PRINT TAB(4); "640x480 in 256 colors"
PRINT TAB(4); "800x600 in 256 colors"