BBS: Inland Empire Archive Date: 10-27-93 (14:52) Number: 357 From: JOHN WOODGATE Refer#: NONE To: CHRIS MENNIE Recvd: NO Subj: Fading VGA (1 of 2) Conf: (2) Quik_Bas
Here ya go Chris... '>>> Page 1 of VGAFADE.BAS begins here. TYPE:BAS ' VGA Fade In/Out routines ' ' This code is public domain, but I'd appreciate it if you'd give ' credit where it's due... ' DEFINT A-Z DECLARE SUB VGAFadeOut () DECLARE SUB VGAFadeIn () DECLARE SUB ScreenOut () DECLARE SUB ScreenIn () DIM SHARED Pal&(0 TO 15) SCREEN 12 ' VGA Required X = 1: Y = 20 FOR a = 0 TO 7 LINE (X, Y)-(X + 50, Y + 70), a, BF X = X + 65 NEXT a X = 1: Y = 120 FOR a = 8 TO 15 LINE (X, Y)-(X + 50, Y + 70), a, BF X = X + 65 NEXT a LOCATE 15, 20: PRINT "You can set all the colors to black, Draw"+_ " Somthing" SLEEP 2 CALL ScreenOut LOCATE 15, 20: PRINT "and then set the colors back to normal. "+_ " " SLEEP 2 CALL ScreenIn SLEEP 4 LOCATE 15, 20: PRINT "You can also fade out the screen, draw somthing "+_ " " SLEEP 2 CALL VGAFadeOut LOCATE 15, 20: PRINT "And then fade back in "+_ " " SLEEP 2 CALL VGAFadeIn SLEEP 1 SUB ScreenIn PALETTE END SUB SUB ScreenOut PALETTE USING Pal&(0) END SUB SUB VGAFadeIn FOR a = 1 TO 63 IF a <= 43 THEN clr& = 65536 * 0 + 256 * 0 + a PALETTE 4, clr& clr& = 65536 * a + 256 * 0 + 0 PALETTE 1, clr& clr& = 65536 * 0 + 256 * a + 0 PALETTE 2, clr& clr& = 65536 * a + 256 * a + a PALETTE 7, clr& clr& = 65536 * a + 256 * a + 0 PALETTE 3, clr& clr& = 65536 * a + 256 * 0 + a PALETTE 5, clr& END IF IF a <= 21 THEN clr& = 65536 * a + 256 * a + a PALETTE 8, clr& END IF IF a <= 41 THEN IF a <= 20 THEN clr& = 65536 * a + 256 * a + a PALETTE 6, clr& ELSE '>>> Page 1 of VGAFADE.BAS ends here. Continued on next page. * JABBER v1.1 * Clap On (clap clap), Clap Off (clap clap) #%^$ NO CARRIER --- GEcho 1.01+ * Origin: WALK in the SHADOWs of the NIGHT 612-825-0595 (1:282/105)
Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET